[m-rev.] trivial diff: compile with -fPIC on x86_64

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Nov 28 01:56:58 AEDT 2006


Estimated hours taken: 0.1
Branches: main, release

configure.in:
 	On x86_64-*-linux* compile position independent code with -fPIC
 	rather than -fpic.  This avoids limits on the size of the global
 	offset table.

Julien.

Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.478
diff -u -r1.478 configure.in
--- configure.in	24 Nov 2006 03:47:46 -0000	1.478
+++ configure.in	27 Nov 2006 07:09:18 -0000
@@ -3359,6 +3359,16 @@
  				DEFAULT_LINKAGE=shared
  				;;
  		esac
+ 
+		# On x86_64 machines we use -fPIC rather than -fpic
+		# in order to avoid limits on the size of the global
+		# offset table implied by the latter.
+		case "$host" in
+			x86_64-*-linux*)
+				CFLAGS_FOR_PIC="-fPIC -DMR_PIC"
+				EXT_FOR_LINK_WITH_PIC_OBJECTS=o
+			;;
+		esac
  		;;
  	m68*-linux|m68*-linux-gnu)
  		AC_MSG_RESULT(yes)

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list