[PATCH 2/4] x86: drop iamcu as default secondary target
Jan Beulich
jbeulich@suse.com
Fri Mar 13 09:40:01 GMT 2026
It's not clear why this would have been forced onto about everyone
x86-ish. People wanting this as secondary target can specify it via the
--enable-targets= configure option.
Obviously a few tests cannot be run then anymore by default, but only when
IAMCU is actually the/a configured target.
While there also consolidate bfd/config.bfd entries doing identical
selections.
---
There are other oddities, e.g.: Why does pjl-*-* have i386_elf32_vec as
secondary target?
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -573,9 +573,14 @@ case "${targ}" in
targ_selvecs=hppa_elf32_vec
;;
- i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
+ i[3-7]86-*-elfiamcu*)
+ targ_defvec=iamcu_elf32_vec
+ targ_selvecs="i386_elf32_vec i386_coff_vec"
+ targ_archs="$targ_archs bfd_iamcu_arch"
+ ;;
+ i[3-7]86-*-elf* | i[3-7]86-*-genode* | i[3-7]86-*-nto* | i[3-7]86-*-rtems*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_coff_vec"
+ targ_selvecs="i386_coff_vec"
;;
i[3-7]86-*-solaris2*)
targ_defvec=i386_elf32_sol2_vec
@@ -588,17 +593,8 @@ case "${targ}" in
targ_defvec=i386_elf32_sol2_vec
targ_selvecs=i386_elf32_vec
;;
- i[3-7]86-*-nto*)
- targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_coff_vec"
- ;;
- i[3-7]86-*-aros*)
- targ_defvec=i386_elf32_vec
- targ_selvecs=iamcu_elf32_vec
- ;;
- i[3-7]86-*-dicos*)
+ i[3-7]86-*-dicos* | i[3-7]86-*-dragonfly* | i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-redox*)
targ_defvec=i386_elf32_vec
- targ_selvecs=iamcu_elf32_vec
targ64_selvecs="x86_64_elf64_vec"
;;
*-*-msdosdjgpp* | *-*-go32* )
@@ -615,14 +611,9 @@ case "${targ}" in
targ_defvec=i386_aout_bsd_vec
targ_underscore=yes
;;
- i[3-7]86-*-dragonfly*)
- targ_defvec=i386_elf32_vec
- targ_selvecs=iamcu_elf32_vec
- targ64_selvecs="x86_64_elf64_vec"
- ;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
targ_defvec=i386_elf32_fbsd_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_pei_vec i386_coff_vec"
+ targ_selvecs="i386_elf32_vec i386_pei_vec i386_coff_vec"
targ64_selvecs="x86_64_elf64_fbsd_vec x86_64_elf64_vec x86_64_pe_vec x86_64_pei_vec"
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
case "${targ}" in
@@ -630,32 +621,17 @@ case "${targ}" in
targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
esac
;;
- i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu)
- targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec"
- targ64_selvecs="x86_64_elf64_vec"
- ;;
- i[3-7]86-*-openbsd*)
- targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec"
- ;;
i[3-7]86-*-linux-*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_pei_vec"
+ targ_selvecs="i386_pei_vec"
targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pe_vec x86_64_pei_vec"
;;
- i[3-7]86-*-redox*)
- targ_defvec=i386_elf32_vec
- targ_selvecs=
- targ64_selvecs=x86_64_elf64_vec
- ;;
i[3-7]86-*-lynxos*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_coff_lynx_vec i386_aout_lynx_vec"
+ targ_selvecs="i386_coff_lynx_vec i386_aout_lynx_vec"
;;
- i[3-7]86-*-gnu*)
+ i[3-7]86-*-aros* | i[3-7]86-*-gnu* | i[3-7]86-*-openbsd*)
targ_defvec=i386_elf32_vec
- targ_selvecs=iamcu_elf32_vec
;;
i[3-7]86-*-msdos*)
targ_defvec=i386_aout_vec
@@ -663,7 +639,7 @@ case "${targ}" in
;;
i[3-7]86-*-moss*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_msdos_vec i386_aout_vec"
+ targ_selvecs="i386_msdos_vec i386_aout_vec"
;;
i[3-7]86-*-beospe*)
targ_defvec=i386_pe_vec
@@ -671,7 +647,7 @@ case "${targ}" in
;;
i[3-7]86-*-beos*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_pe_vec i386_pei_vec"
+ targ_selvecs="i386_pe_vec i386_pei_vec"
;;
i[3-7]86-*-haiku*)
targ_defvec=i386_elf32_vec
@@ -685,11 +661,11 @@ case "${targ}" in
;;
i[3-7]86-*-rdos*)
targ_defvec=i386_elf32_vec
- targ_selvecs="iamcu_elf32_vec i386_coff_vec"
+ targ_selvecs="i386_coff_vec"
;;
i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
targ_defvec=i386_pe_vec
- targ_selvecs="i386_pe_vec i386_pe_big_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec pdb_vec"
+ targ_selvecs="i386_pe_vec i386_pe_big_vec i386_pei_vec i386_elf32_vec pdb_vec"
targ_underscore=yes
;;
i[3-7]86-*-vxworks*)
@@ -1040,7 +1016,7 @@ case "${targ}" in
pjl-*-*)
targ_defvec=pj_elf32_le_vec
- targ_selvecs="pj_elf32_le_vec pj_elf32_vec i386_elf32_vec iamcu_elf32_vec"
+ targ_selvecs="pj_elf32_le_vec pj_elf32_vec i386_elf32_vec"
;;
powerpc-*-aix5.[01] | rs6000-*-aix5.[01])
@@ -1405,48 +1381,29 @@ case "${targ}" in
targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
want64=true
;;
- x86_64-*-dicos*)
+ x86_64-*-dicos* | x86_64-*-dragonfly* | x86_64-*-haiku* | x86_64-*-redox*)
targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
- want64=true
- ;;
- x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia | x86_64-*-genode*)
- targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec"
- case "${targ}" in
- x86_64-*-rtems*)
- targ_selvecs="${targ_selvecs} x86_64_pe_vec x86_64_pei_vec"
- esac
- want64=true
- ;;
- x86_64-*-dragonfly*)
- targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
+ targ_selvecs="i386_elf32_vec"
want64=true
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_defvec=x86_64_elf64_fbsd_vec
- targ_selvecs="i386_elf32_fbsd_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec i386_elf32_vec x86_64_elf64_vec"
- want64=true
- ;;
- x86_64-*-haiku*)
- targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec"
+ targ_selvecs="i386_elf32_fbsd_vec i386_coff_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec i386_elf32_vec x86_64_elf64_vec"
want64=true
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec"
+ targ_selvecs="i386_elf32_vec i386_coff_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec"
want64=true
;;
x86_64-*-linux-*)
targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec"
+ targ_selvecs="i386_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec"
want64=true
;;
x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
targ_defvec=x86_64_pe_vec
- targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_big_vec x86_64_elf64_vec i386_pe_vec i386_pe_big_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec pdb_vec"
+ targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_big_vec x86_64_elf64_vec i386_pe_vec i386_pe_big_vec i386_pei_vec i386_elf32_vec pdb_vec"
want64=true
targ_underscore=no
;;
@@ -1454,9 +1411,9 @@ case "${targ}" in
targ_defvec=x86_64_elf64_vec
want64=true
;;
- x86_64-*-redox*)
+ x86_64-*-rtems*)
targ_defvec=x86_64_elf64_vec
- targ_selvecs=i386_elf32_vec
+ targ_selvecs="i386_elf32_vec x86_64_elf32_vec x86_64_pe_vec x86_64_pei_vec"
want64=true
;;
x86_64-*-solaris2*)
@@ -1464,9 +1421,9 @@ case "${targ}" in
targ_selvecs="i386_elf32_sol2_vec x86_64_elf64_vec i386_elf32_vec"
want64=true
;;
- x86_64-*-gnu*)
+ x86_64-*-elf* | x86_64-*-fuchsia | x86_64-*-genode* | x86_64-*-gnu*)
targ_defvec=x86_64_elf64_vec
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec"
+ targ_selvecs="i386_elf32_vec x86_64_elf32_vec"
want64=true
;;
#endif
@@ -1540,13 +1497,6 @@ case "${targ_defvec} ${targ_selvecs}" in
;;
esac
-# If we support Intel MCU target, then add support for bfd_iamcu_arch.
-case "${targ_defvec} ${targ_selvecs}" in
- *iamcu_elf32*)
- targ_archs="$targ_archs bfd_iamcu_arch"
- ;;
-esac
-
case "${targ}" in
mipsisa32r6* | mipsisa64r6* | mips*-img-*)
targ_cflags="$targ_cflags -DMIPS_DEFAULT_R6=1"
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -812,7 +812,7 @@ if [gas_32_check] then {
run_list_test "code64-inval" "-I${srcdir}/$subdir -al"
}
- if {!([istarget "*-*-solaris2*"] || [istarget "*-*-vxworks*"])} then {
+ if { [istarget "i*86-*-elfiamcu"] } then {
run_dump_test "iamcu-1"
run_dump_test "iamcu-2"
run_dump_test "iamcu-3"
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -342,10 +342,8 @@ i[3-7]86-*-msdosdjgpp*) targ_emul=i386go
i[3-7]86-*-lynxos*) targ_emul=i386lynx
;;
i[3-7]86-*-aros*) targ_emul=elf_i386
- targ_extra_emuls=elf_iamcu
;;
i[3-7]86-*-rdos*) targ_emul=elf_i386
- targ_extra_emuls=elf_iamcu
;;
i[3-7]86-*-bsd) targ_emul=i386bsd
targ_extra_ofiles=
@@ -357,7 +355,6 @@ i[3-7]86-*-bsdi*) targ_emul=i386bsd
targ_extra_ofiles=
;;
i[3-7]86-*-linux-*) targ_emul=elf_i386
- targ_extra_emuls="elf_iamcu"
targ64_extra_libpath="elf_x86_64 elf32_x86_64"
;;
i[3-7]86-*-redox*) targ_emul=elf_i386
@@ -378,24 +375,21 @@ i[3-7]86-*-netbsd*-gnu* | \
i[3-7]86-*-knetbsd*-gnu | \
i[3-7]86-*-openbsd*)
targ_emul=elf_i386
- targ_extra_emuls="elf_iamcu"
;;
i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
targ_extra_emuls=elf_i386
;;
i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
targ_emul=elf_i386
- targ_extra_emuls=elf_iamcu
;;
i[3-7]86-*-dragonfly*) targ_emul=elf_i386
- targ_extra_emuls="elf_iamcu i386bsd"
+ targ_extra_emuls="i386bsd"
;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
targ_emul=elf_i386_fbsd
- targ_extra_emuls="elf_i386 elf_iamcu i386bsd"
+ targ_extra_emuls="elf_i386 i386bsd"
;;
i[3-7]86-*-gnu*) targ_emul=elf_i386
- targ_extra_emuls=elf_iamcu
;;
i[3-7]86-*-msdos*) targ_emul=i386msdos
targ_extra_emuls=i386aout
@@ -653,7 +647,7 @@ pdp11-*-*) targ_emul=pdp11
targ_extra_ofiles=
;;
pjl*-*-*) targ_emul=pjlelf
- targ_extra_emuls="elf_i386 elf_iamcu"
+ targ_extra_emuls="elf_i386"
;;
pj*-*-*) targ_emul=pjelf
targ_extra_ofiles=ldelfgen.o
@@ -953,12 +947,10 @@ x86_64-*-haiku*) targ_emul=elf_x86_64_ha
targ_extra_emuls="elf_x86_64 elf_i386_haiku"
;;
x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
- targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"
- tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
+ targ_extra_libpath="elf_i386 elf_x86_64"
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
;;
x86_64-*-linux-*) targ_emul=elf_x86_64
- targ_extra_emuls=elf_iamcu
targ_extra_libpath="elf_i386 elf32_x86_64"
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
;;
@@ -972,28 +964,24 @@ x86_64-*-solaris2*)
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_emul=elf_x86_64
- targ_extra_emuls="elf_i386 elf_iamcu"
- tdir_elf_iamcu=`echo ${targ_alias} | \
- sed -e 's/x86_64/i386/' -e 's/aout//'`
+ targ_extra_emuls="elf_i386"
tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/' -e 's/aout//'`
;;
x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
targ_emul=elf_x86_64
- targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
+ targ_extra_libpath="elf_i386 elf32_x86_64"
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
;;
x86_64-*-dragonfly*) targ_emul=elf_x86_64
- targ_extra_emuls="elf_i386 elf_iamcu"
+ targ_extra_emuls="elf_i386"
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd
- targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
+ targ_extra_emuls="elf_x86_64 elf_i386"
targ_extra_libpath="elf_i386_fbsd"
tdir_elf_i386_fbsd=`echo ${targ_alias} \
| sed -e 's/x86_64/i386/'`
- tdir_elf_iamcu=`echo ${targ_alias} \
- | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} \
| sed -e 's/x86_64/i386/'`
;;
@@ -1011,7 +999,6 @@ x86_64-*-mingw*) targ_emul=i386pep ;
targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
;;
x86_64-*-gnu*) targ_emul=elf_x86_64
- targ_extra_emuls=elf_iamcu
targ_extra_libpath="elf_i386 elf32_x86_64"
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
;;
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -283,7 +283,10 @@ proc iamcu_tests {} {
run_dump_test "iamcu-4"
}
-iamcu_tests
+set status [catch "exec $LD -V -melf_iamcu" got]
+if { $status == 0 } {
+ iamcu_tests
+}
run_ld_link_tests $i386tests
More information about the Binutils
mailing list