[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
binutils porting
From: |
Roland McGrath |
Subject: |
binutils porting |
Date: |
Thu, 22 Nov 2001 17:28:56 -0500 (EST) |
The Hurd-target porting work for binutils and gcc are sufficiently
different that I've decided we should address them in separate threads.
> Filling in the missing bits in bfd/config.bfd, gas/configure.in and
> ld/configure.tgt is probably enough. Take the existing i386-*-gnu*
> and *-*-linux-gnu* targets as a model. Be careful to make sure that
> *-*-gnu* comes after *-*-linux-gnu* to avoid breaking linux targets.
>
> Since I have a bit of experience with adding new targets to binutils,
> feel free to send any patches to me for review: address@hidden
Those three files did indeed seem to be all that needed to be touched,
at least for the target concerns. (I haven't tried any native builds.
I presume that all the host-side issues just dtrt via autoconf feature tests.)
I believe I sent these same patches to Mark before, but I didn't post them
here. I was hoping for some comment from Mark, but haven't gotten any yet.
It's occurred to me that rather than adding GNU/Hurd targets for each CPU
that happen to be just the same as the GNU/Linux targets for the CPU, we
should more formally have in binutils a single GNU target for each CPU.
For each CPU, the canonical object format is ELF for both GNU/Linux and
GNU/Hurd, and I expect would be for any other GNU/some-kernel system. We
want to be compatible with whatever format quirks are used on that CPU with
GNU/Linux, because we will eventually be sharing binaries and in practice
already share GNU/Linux native tools as GNU/Hurd cross tools. (There are a
couple of CPUs for which the GNU/Linux binutils targets use slightly
different format details within ELF than what the "generic" ELF target for
that CPU uses. Whatever the reasons for the differences, the most
important tool and loader compatibility for us is with GNU/Linux). Aside
from native gdb, I think the only actual target OS dependencies in the
binutils/bfd world are a few places in the ld testsuite where it replicates
information that is actually part of the compiler target specs.
Moreover, I think this is the right way to think about targets in the tool
chain. That is, "GNU on CPU foobar" is a coherent target platform for
object files, in particular ELF and all the tools that work on it. Within
that, the "OS_ABI" PT_NOTE values and the DT_NEEDED sonames indicate
specific ABI dependencies that might be satisfied by any number of
different binary-compatible implementations.
In pragmatic terms, it is also by far the most convenient and least error
prone way I can think of to ensure that we wind up compatible with extant
GNU/Linux systems when we have new GNU/Hurd ports. The following patches
change all the `...-*-linux-gnu*' patterns into `...-*-gnu*' so that
they'll match CPU-VENDOR-linux-gnu as well as CPU-VENDOR-gnu. These
targets include support for some obsolete non-ELF formats once used on old
Linux systems, but it seems desireable to make it easy to operate from any
GNU system on all the file formats that anyone on any GNU system finds useful.
I'd like to get these changes put into binutils, and also have the binutils
maintainers made aware that any future GNU/Linux ports for new platforms
should be considered general GNU ports and use the broader target patterns.
Do you think this is a good plan? Do you think the binutils maintainers
will like it?
Thanks,
Roland
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.71
diff -u -r1.71 config.bfd
--- config.bfd 2001/10/31 09:50:05 1.71
+++ config.bfd 2001/11/22 21:54:05
@@ -80,7 +80,7 @@
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
;;
- alpha*-*-linux-gnu* | alpha*-*-elf*)
+ alpha*-*-gnu* | alpha*-*-elf*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
;;
@@ -94,7 +94,7 @@
targ_defvec=bfd_elf64_ia64_aix_little_vec
targ_selvecs="bfd_elf64_ia64_aix_big_vec bfd_efi_app_ia64_vec"
;;
- ia64*-*-freebsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
+ ia64*-*-freebsd* | ia64*-*-gnu* | ia64*-*-elf*)
targ_defvec=bfd_elf64_ia64_little_vec
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
;;
@@ -160,11 +160,11 @@
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- armeb-*-elf | arm*b-*-linux-gnu*)
+ armeb-*-elf | arm*b-*-gnu*)
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs=bfd_elf32_littlearm_vec
;;
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* |
arm*-*-uclinux*)
+ arm-*-elf | arm-*-freebsd* | arm*-*-gnu* | arm*-*-conix* | arm*-*-uclinux*)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
@@ -282,7 +282,7 @@
;;
#ifdef BFD64
- hppa*64*-*-linux-gnu*)
+ hppa*64*-*-gnu*)
targ_defvec=bfd_elf64_hppa_linux_vec
targ_selvecs=bfd_elf64_hppa_vec
;;
@@ -293,7 +293,7 @@
;;
#endif
- hppa*-*-linux-gnu*)
+ hppa*-*-gnu*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
@@ -316,7 +316,7 @@
;;
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined
(HOST_HPPAOSF) */
- i370-*-*)
+ i370-*-*)
targ_defvec=bfd_elf32_i370_vec
targ_selvecs="bfd_elf32_i370_vec"
;;
@@ -367,7 +367,7 @@
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
- i[3456]86-*-netbsdelf*)
+ i[3456]86-*-netbsdelf*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@@ -385,16 +385,16 @@
targ_selvecs=bfd_elf32_i386_vec
targ_underscore=yes
;;
- i[3456]86-*-linux-gnu*)
+ i[3456]86-*-gnu*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
;;
-#ifdef BFD64
+#ifdef BFD64
x86_64-*-freebsd*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
;;
- x86_64-*-linux-gnu*)
+ x86_64-*-gnu*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
;;
@@ -403,9 +403,6 @@
targ_defvec=i386lynx_coff_vec
targ_selvecs=i386lynx_aout_vec
;;
- i[3456]86-*-gnu*)
- targ_defvec=bfd_elf32_i386_vec
- ;;
i[3456]86-*-mach* | i[3456]86-*-osf1mk*)
targ_defvec=i386mach3_vec
targ_cflags=-DSTAT_FOR_EXEC
@@ -546,14 +543,9 @@
targ_selvecs=bfd_elf32_m68k_vec
targ_underscore=yes
;;
- m68*-*-linux-gnu*)
- targ_defvec=bfd_elf32_m68k_vec
- targ_selvecs=m68klinux_vec
- ;;
m68*-*-gnu*)
targ_defvec=bfd_elf32_m68k_vec
- # targ_selvecs=m68kmach3_vec
- # targ_cflags=-DSTAT_FOR_EXEC
+ targ_selvecs=m68klinux_vec
;;
m68*-*-lynxos*)
targ_defvec=m68klynx_coff_vec
@@ -695,19 +687,19 @@
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec
bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
- mips64*el-*-linux*)
+ mips64*el-*-gnu*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec
bfd_elf64_tradbigmips_vec"
;;
- mips*el-*-linux*)
+ mips*el-*-gnu*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec
bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
;;
- mips64*-*-linux*)
+ mips64*-*-gnu*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec
bfd_elf64_tradlittlemips_vec"
;;
- mips*-*-linux*)
+ mips*-*-gnu*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec
bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
@@ -766,7 +758,7 @@
targ_defvec=rs6000coff64_vec
targ_selvecs=rs6000coff_vec
;;
- powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux*)
+ powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-gnu*)
targ_defvec=bfd_elf64_powerpc_vec
targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec
bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
;;
@@ -776,8 +768,8 @@
;;
#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
- powerpc-*-chorus* | powerpc-*-vxworks*)
+ powerpc-*-solaris2* | powerpc-*-gnu* | \
+ powerpc-*-rtems* | powerpc-*-chorus* | powerpc-*-vxworks*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
@@ -790,8 +782,8 @@
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
- powerpcle-*-rtems*)
+ powerpcle-*-solaris2* | powerpcle-*-gnu* | \
+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
@@ -802,23 +794,23 @@
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec
bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
- s390-*-linux*)
+ s390-*-gnu*)
targ_defvec=bfd_elf32_s390_vec
;;
#ifdef BFD64
- s390x-*-linux*)
+ s390x-*-gnu*)
targ_defvec=bfd_elf64_s390_vec
;;
#endif
- sh-*-linux*)
+ sh-*-gnu*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
;;
- sh*eb-*-linux*)
+ sh*eb-*-gnu*)
targ_defvec=bfd_elf32_shblin_vec
;;
- sh*-*-linux*)
+ sh*-*-gnu*)
targ_defvec=bfd_elf32_shlin_vec
;;
@@ -858,7 +850,7 @@
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
targ_underscore=yes
;;
- sparc-*-linux-gnu*)
+ sparc-*-gnu*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
;;
@@ -901,7 +893,7 @@
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
- sparc64-*-linux-gnu*)
+ sparc64-*-gnu*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
;;
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.84
diff -u -r1.84 configure.in
--- configure.in 2001/11/04 19:06:38 1.84
+++ configure.in 2001/11/22 21:54:06
@@ -180,7 +180,6 @@
alpha*-*-openbsd*) fmt=ecoff ;;
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
arc-*-elf*) fmt=elf bfd_gas=yes ;;
@@ -191,7 +190,7 @@
arm-*-elf | thumb-*-elf) fmt=elf ;;
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu* | arm*-*-uclinux*)
+ arm*-*-gnu* | arm*-*-uclinux*)
fmt=elf em=linux ;;
arm-*-netbsd* | arm-*-openbsd*) fmt=aout em=nbsd ;;
arm-*-oabi | thumb-*-oabi) fmt=elf ;;
@@ -211,7 +210,7 @@
fr30-*-*) fmt=elf bfd_gas=yes ;;
- hppa-*-linux-gnu*) case ${cpu} in
+ hppa-*-gnu*) case ${cpu} in
hppa*64*)
fmt=elf em=hppalinux64;;
hppa*)
@@ -238,7 +237,7 @@
h8500-*-rtems*) fmt=coff ;;
h8500-*-coff) fmt=coff ;;
- i370-*-elf* | i370-*-linux*) fmt=elf ;;
+ i370-*-elf* | i370-*-gnu*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
@@ -250,8 +249,8 @@
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
- x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
+ i386-*-gnu*) fmt=elf em=linux bfd_gas=yes ;;
+ x86_64-*-gnu*) fmt=elf em=linux bfd_gas=yes ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
changequote(,)dnl
i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf)
@@ -276,7 +275,6 @@
i386-*-rtemself*) fmt=elf ;;
i386-*-rtemscoff*) fmt=coff ;;
i386-*-rtems*) fmt=elf ;;
- i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
fmt=aout em=mach bfd_gas=yes ;;
i386-*-msdos*) fmt=aout ;;
@@ -303,7 +301,7 @@
ia64-*-elf*) fmt=elf ;;
ia64-*-aix*) fmt=elf em=ia64aix ;;
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
+ ia64-*-gnu*) fmt=elf em=linux ;;
ia64-*-hpux*) fmt=elf em=hpux ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
@@ -323,8 +321,7 @@
m68k-*-rtems*) fmt=elf ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
- m68k-*-gnu*) fmt=elf ;;
+ m68k-*-gnu*) fmt=elf em=linux ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
@@ -352,7 +349,7 @@
mips-*-irix*) fmt=ecoff ;;
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
- mips*-*-linux*) fmt=elf em=tmips mips_stabs_elf=y ;;
+ mips*-*-gnu*) fmt=elf em=tmips mips_stabs_elf=y ;;
mips-*-sysv4*MP* | mips-*-gnu*)
fmt=elf em=tmips ;;
mips-*-sysv*) fmt=ecoff ;;
@@ -376,6 +373,7 @@
*) AC_MSG_ERROR(GNU/Linux must be configured big
endian) ;;
esac
;;
+ ppc-*-gnu*) fmt=elf ;;
ppc-*-solaris*) fmt=elf
if test ${this_target} = $target; then
AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
@@ -391,11 +389,11 @@
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-*-vxworks*) fmt=elf ;;
- s390x-*-linux-gnu*) fmt=elf em=linux ;;
- s390-*-linux-gnu*) fmt=elf em=linux ;;
+ s390x-*-gnu*) fmt=elf em=linux ;;
+ s390-*-gnu*) fmt=elf em=linux ;;
- sh*eb-*-linux*) fmt=elf em=linux endian=big ;;
- sh*-*-linux*) fmt=elf em=linux endian=little ;;
+ sh*eb-*-gnu*) fmt=elf em=linux endian=big ;;
+ sh*-*-gnu*) fmt=elf em=linux endian=little ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff bfd_gas=yes;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
@@ -414,7 +412,7 @@
fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
+ sparc-*-gnu*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
@@ -549,17 +547,17 @@
;;
mips)
- echo ${extra_objects} | grep -s "itbl-parse.o"
+ echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-parse.o"
fi
- echo ${extra_objects} | grep -s "itbl-lex.o"
+ echo ${extra_objects} | grep -s "itbl-lex.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-lex.o"
fi
- echo ${extra_objects} | grep -s "itbl-ops.o"
+ echo ${extra_objects} | grep -s "itbl-ops.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-ops.o"
fi
@@ -601,7 +599,7 @@
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff
mipslecoff mipsecoff" ;;
- mips*-*-linux*-*) case "$endian" in
+ mips*-*-gnu*-*) case "$endian" in
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
esac ;;
@@ -878,7 +876,7 @@
# do we need the math library?
case "${need_libm}" in
-yes)
+yes)
AC_CHECK_LIBM
AC_SUBST(LIBM)
;;
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.68
diff -u -r1.68 configure.tgt
--- configure.tgt 2001/11/04 19:06:38 1.68
+++ configure.tgt 2001/11/22 21:54:06
@@ -54,14 +54,14 @@
tdir_elf32_sparc=`echo ${targ_alias} | sed -e
's/aout//'`
tdir_sun4=sparc-sun-sunos4
;;
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
+sparc64-*-gnu*) targ_emul=elf64_sparc
targ_extra_emuls="elf32_sparc sparclinux sun4"
targ_extra_libpath=elf32_sparc
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
tdir_sparclinux=${tdir_elf32_sparc}aout
tdir_sun4=sparc-sun-sunos4
;;
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
+sparc*-*-gnu*) targ_emul=elf32_sparc
targ_extra_emuls="sparclinux elf64_sparc sun4"
targ_extra_libpath=elf64_sparc
tdir_sparclinux=${targ_alias}aout
@@ -101,19 +101,19 @@
i960-*-elf*) targ_emul=elf32_i960 ;;
ia64-*-elf*) targ_emul=elf64_ia64 ;;
ia64-*-freebsd*) targ_emul=elf64_ia64 ;;
-ia64-*-linux*) targ_emul=elf64_ia64 ;;
+ia64-*-gnu*) targ_emul=elf64_ia64 ;;
ia64-*-aix*) targ_emul=elf64_aix ;;
m32r-*-*) targ_emul=m32relf ;;
-m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
+m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
-m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
+m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
m68*-sun-sunos[34]*) targ_emul=sun3 ;;
m68*-wrs-vxworks*) targ_emul=sun3 ;;
m68*-ericsson-ose) targ_emul=sun3 ;;
m68*-apple-aux*) targ_emul=m68kaux ;;
*-tandem-none) targ_emul=st2000 ;;
-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
+i370-*-elf* | i370-*-gnu*) targ_emul=elf32i370 ;;
i[3456]86-*-vsta) targ_emul=vsta ;;
i[3456]86-go32-rtems*) targ_emul=i386go32 ;;
i[3456]86-*-go32) targ_emul=i386go32 ;;
@@ -135,11 +135,11 @@
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
;;
i[3456]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386
;;
-i[3456]86-*-linux-gnu*) targ_emul=elf_i386
+i[3456]86-*-gnu*) targ_emul=elf_i386
targ_extra_emuls=i386linux
tdir_i386linux=${targ_alias}aout
;;
-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
+x86_64-*-gnu*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
tdir_i386linux=${targ_alias}aout
;;
@@ -202,10 +202,10 @@
arm-*-elf) targ_emul=armelf ;;
arm9e-*-elf) targ_emul=armelf ;;
arm-*-oabi) targ_emul=armelf_oabi ;;
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*-*-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
arm*-*-conix*) targ_emul=armelf ;;
-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux;
targ_extra_emuls=armelf ;;
+thumb-*-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux;
targ_extra_emuls=armelf ;;
strongarm-*-coff) targ_emul=armcoff ;;
strongarm-*-elf) targ_emul=armelf ;;
thumb-*-coff) targ_emul=armcoff ;;
@@ -228,15 +228,15 @@
targ_emul=h8500
targ_extra_emuls="h8500s h8500b h8500m h8500c"
;;
-sh-*-linux*)
+sh-*-gnu*)
targ_emul=shlelf_linux
targ_extra_emuls=shelf_linux
targ_extra_libpath=shelf_linux
;;
-sh*eb-*-linux*)
+sh*eb-*-gnu*)
targ_emul=shelf_linux
;;
-sh*-*-linux*)
+sh*-*-gnu*)
targ_emul=shlelf_linux
;;
sh-*-elf* | sh-*-rtemself*)
@@ -257,7 +257,7 @@
targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
;;
-m68k-*-linux-gnu*) targ_emul=m68kelf
+m68k-*-gnu*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e
's/linux/linuxaout/'`
;;
@@ -268,9 +268,9 @@
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
m68*-*-rtems*) targ_emul=m68kelf ;;
-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
+hppa*64*-*-gnu*) targ_emul=hppa64linux ;;
hppa*64*-*) targ_emul=elf64hppa ;;
-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
+hppa*-*-gnu*) targ_emul=hppalinux ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-rtems*) targ_emul=hppaelf ;;
@@ -307,10 +307,10 @@
mips*-*-rtems*) targ_emul=elf32ebmip ;;
mips*el-*-vxworks*) targ_emul=elf32elmip ;;
mips*-*-vxworks*) targ_emul=elf32ebmip ;;
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
+mips*el-*-gnu*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
+mips*-*-gnu*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
@@ -327,7 +327,7 @@
alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
tdir_elf64alpha=`echo ${targ_alias} | sed -e
's/ecoff//'`
;;
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
+alpha*-*-linux*) targ_emul=elf64alpha targ_extra_emuls=alpha
tdir_alpha=`echo ${targ_alias} | sed -e
's/linux/linuxecoff/'`
;;
alpha*-*-osf*) targ_emul=alpha ;;
@@ -346,7 +346,7 @@
targ_extra_libpath=elf32ppc;
tdir_elf32ppcsim=`echo ${targ_alias} | sed -e
's/ppc/ppcsim/'`
;;
-powerpc*-*-linux*)
+powerpc*-*-gnu* | powerpc-*-gnu*)
case "${targ}" in
*64*) targ_emul=elf64ppc
targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim" ;;
@@ -378,8 +378,8 @@
powerpcle-*-winnt*) targ_emul=ppcpe ;;
powerpcle-*-cygwin*) targ_emul=ppcpe ;;
-powerpc-*-aix*) targ_emul=aixppc
- targ_extra_emuls="aixppc64"
+powerpc-*-aix*) targ_emul=aixppc
+ targ_extra_emuls="aixppc64"
tdir_aixppc64=${targ_alias}
;;
powerpc-*-beos*) targ_emul=aixppc ;;
@@ -396,8 +396,8 @@
mcore-*-pe) targ_emul=mcorepe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mcore-*-elf) targ_emul=elf32mcore ;;
-s390x-*-linux*) targ_emul=elf64_s390 ;;
-s390-*-linux*) targ_emul=elf_s390 ;;
+s390x-*-gnu*) targ_emul=elf64_s390 ;;
+s390-*-gnu*) targ_emul=elf_s390 ;;
*-*-ieee*) targ_emul=vanilla ;;
*)
- binutils porting, Roland McGrath, 2001/11/01
- binutils porting,
Roland McGrath <=