powerpc*le-linux support

Alan Modra <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
This adds support for little-endian powerpc linux, and tidies the
existing host match for powerpc.  config.sub won't return ppc*-*linux*
so there isn't much point in matching that.

	* m4/libtool.m4 (ld -m flags): Remove non-canonical ppc host match.
	Support little-endian powerpc linux host.

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index d7013c5..501246d 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1307,7 +1307,7 @@ ia64-*-hpux*)
   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
@@ -1328,7 +1328,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 		;;
 	    esac
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1347,7 +1350,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  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*)

-- 
Alan Modra
Australia Development Lab, IBM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.