[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: powerpc*le-linux support
From: |
Alan Modra |
Subject: |
Re: powerpc*le-linux support |
Date: |
Thu, 6 Jun 2013 14:48:22 +0930 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jun 06, 2013 at 11:31:34AM +0930, Alan Modra wrote:
> 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.
> - ppc*-*linux*|powerpc*-*linux*)
> + powerpcle*)
> + LD="${LD-ld} -m elf64lppc"
> + ;;
> + powerpc*)
> LD="${LD-ld} -m elf64ppc"
> ;;
I didn't get that quite right. 'powerpc*' in the above matches too
much, for example when your host is powerpc64-linux and target
powerpc64le-linux you'll get -melf64ppc added to LD. Since
powerpc64le-linux-ld wants -melf64lppc (or nothing) that will fail.
Revised as follows.
* 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