Patchwork libtool update for powerpc64le-linux

login
register
mail settings
Submitter Alan Modra
Date Aug. 16, 2013, 8:48 a.m.
Message ID <20130816084805.GF4024@bubble.grove.modra.org>
Download mbox | patch
Permalink /patch/267595/
State New
Headers show

Comments

Alan Modra - Aug. 16, 2013, 8:48 a.m.
I'd like to apply the following patch to the gcc repository (well,
excluding the libgo part which I'm hoping someone will apply for me to
the master go repository).  I know the normal procedure for autotools
is to submit upstream then update when the patch is in the upstream
autotools repository, but this simple libtool patch has been awaiting
review for over two months.

This adds support for building gcc on little-endian powerpc linux
hosts, and tidies the existing host match for powerpc.  config.sub
won't return ppc*-*linux* so there isn't much point in matching that.

	* libtool.m4 (ld -m flags): Remove non-canonical ppc host match.
	Support little-endian powerpc linux hosts.
libgo/
	* config/libtool.m4 (ld -m flags): Remove non-canonical ppc host
	match.  Support little-endian powerpc linux hosts.
	* libgo/configure: Regenerate.
libjava/libltdl/
	* acinclude.m4 (ld -m flags): Remove non-canonical ppc host
	match.  Support little-endian powerpc linux hosts.
	* configure: Regenerate.
gcc/
	* configure: Regenerate.
libobjc/
	* configure: Regenerate.
libgfortran/
	* configure: Regenerate.
libffi/
	* configure: Regenerate.
libssp/
	* configure: Regenerate.
libitm/
	* configure: Regenerate.
libgomp/
	* configure: Regenerate.
libquadmath/
	* configure: Regenerate.
libsanitizer/
	* configure: Regenerate.
zlib/
	* configure: Regenerate.
libstdc++-v3/
	* configure: Regenerate.
libmudflap/
	* configure: Regenerate.
boehm-gc/
	* configure: Regenerate.
lto-plugin/
	* configure: Regenerate.
libatomic/
	* configure: Regenerate.
libbacktrace/
	* configure: Regenerate.
libjava/
	* configure: Regenerate.
libjava/classpath/
	* configure: Regenerate.

Patch

Index: libtool.m4
===================================================================
--- libtool.m4	(revision 200501)
+++ libtool.m4	(working copy)
@@ -1220,7 +1220,7 @@ 
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1241,7 +1241,10 @@ 
 		;;
 	    esac
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1260,7 +1263,10 @@ 
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
Index: libgo/config/libtool.m4
===================================================================
--- libgo/config/libtool.m4	(revision 200501)
+++ libgo/config/libtool.m4	(working copy)
@@ -1225,7 +1225,7 @@ 
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1239,7 +1239,10 @@ 
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1258,7 +1261,10 @@ 
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
Index: libjava/libltdl/acinclude.m4
===================================================================
--- libjava/libltdl/acinclude.m4	(revision 200501)
+++ libjava/libltdl/acinclude.m4	(working copy)
@@ -519,7 +519,7 @@ 
   rm -rf conftest*
   ;;
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
@@ -529,7 +529,10 @@ 
         x86_64-*linux*)
           LD="${LD-ld} -m elf_i386"
           ;;
-        ppc64-*linux*|powerpc64-*linux*)
+        powerpc64le-*)
+          LD="${LD-ld} -m elf32lppclinux"
+          ;;
+        powerpc64-*)
           LD="${LD-ld} -m elf32ppclinux"
           ;;
         s390x-*linux*)
@@ -545,7 +548,10 @@ 
         x86_64-*linux*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
-        ppc*-*linux*|powerpc*-*linux*)
+        powerpcle-*)
+          LD="${LD-ld} -m elf64lppc"
+          ;;
+        powerpc-*)
           LD="${LD-ld} -m elf64ppc"
           ;;
         s390*-*linux*)