This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Build libiberty with -fPIC on Linux/MIPS hosts


Starting with gcc 4.3, -mshared is the default on Linux/MIPS hosts. This
means that libraries should now be built with -fPIC, which implies
-mno-shared.

The patch below, switch libiberty to -fPIC on Linux/MIPS hosts. It is
needed for binutils when build with --enable-shared.


2008-04-21  Aurelien Jarno  <aurelien@aurel32.net>

	* libiberty/configure.ac: use -fPIC on Linux/MIPS hosts.
	* libiberty/configure: Regenerate.

Index: libiberty/configure.ac
===================================================================
--- libiberty/configure.ac	(révision 134503)
+++ libiberty/configure.ac	(copie de travail)
@@ -208,6 +208,7 @@
     i[[34567]]86-*-* | x86_64-*-*)
 			PICFLAG=-fpic ;;
     m68k-*-*)		PICFLAG=-fpic ;;
+    mips*-*-linux)	PICFLAG=-fPIC ;;
     powerpc*-*-aix*)	;;
     powerpc*-*-*)	PICFLAG=-fPIC ;;
     sparc*-*-*)		case "${CFLAGS}" in
Index: libiberty/configure
===================================================================
--- libiberty/configure	(révision 134503)
+++ libiberty/configure	(copie de travail)
@@ -3729,6 +3729,7 @@
     i[34567]86-*-* | x86_64-*-*)
 			PICFLAG=-fpic ;;
     m68k-*-*)		PICFLAG=-fpic ;;
+    mips*-*-linux)	PICFLAG=-fPIC ;;
     powerpc*-*-aix*)	;;
     powerpc*-*-*)	PICFLAG=-fPIC ;;
     sparc*-*-*)		case "${CFLAGS}" in

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]