3 # Copyright (C) 2012-2018 Free Software Foundation, Inc.
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # Convert a canonical host type into a BFD host type.
20 # Set shell variable targ to canonical target name, and run
21 # using ``. config.bfd''.
22 # Sets the following shell variables:
23 # targ_defvec Default vector for this target
24 # targ_selvecs Vectors to build for this target
25 # targ64_selvecs Vectors to build if --enable-64-bit-bfd is given
26 # or if host is 64 bit.
27 # targ_archs Architectures for this target
28 # targ_cflags $(CFLAGS) for this target (FIXME: pretty bogus)
29 # targ_underscore Whether underscores are used: yes or no
31 # Part of this file is processed by targmatch.sed to generate the
32 # targmatch.h file. The #ifdef and #endif lines that appear below are
33 # copied directly into targmatch.h.
35 # The binutils c++filt program wants to know whether underscores are
36 # stripped or not. That is why we set targ_underscore. c++filt uses
37 # this information to choose a default. This information is
38 # duplicated in the symbol_leading_char field of the BFD target
39 # vector, but c++filt does not deal with object files and is not
40 # linked against libbfd.a. It is not terribly important that c++filt
41 # get this right; it is just convenient.
49 # Catch obsolete configurations.
51 openrisc-*-* | or32-*-*)
52 echo "*** Configuration $targ is obsolete." >&2
53 echo "*** Use or1k-*-elf or or1k-*-linux as the target instead" >&2
56 i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu | \
57 mips*-*-irix5* | mips*-*-irix6*)
63 i[3-7]86-*-sco3.2v5*coff | \
64 i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
65 i[3-7]86-*-sco3.2v5* | \
66 i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | \
67 i[3-7]86-*-chorus* | \
68 i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
70 i[3-7]86-sequent-bsd* | \
71 i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
72 i[3-7]86-*-freebsd[12] | \
73 i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
74 i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3] | \
75 i[3-7]86-*-linux*aout* | \
76 i[3-7]86-*-mach* | i[3-7]86-*-osf1mk* | \
79 i[3-7]86-*-aout* | i[3-7]86*-*-vsta* | \
80 m68*-motorola-sysv* | m68*-hp-bsd* | m68*-*-aout* | \
81 m68*-*-coff* | m68*-*-sysv* | \
83 m68*-*-linux*aout* | \
85 m68*-*-netbsdaout* | \
86 m68*-*-sunos* | m68*-*-os68k* | m68*-*-vxworks* | m68*-netx-* | \
87 m68*-*-bsd* | m68*-*-vsta* | \
91 mips*-dec-* | mips*el-*-ecoff* | \
93 mips*-sgi-* | mips*-*-bsd* | \
95 mips*-*-sysv* | mips*-*-riscos* | \
96 powerpc-*-lynxos* | powerpc-*-windiss* | \
101 sparc-*-linux*aout* | \
102 sparc-*-netbsdaout* | \
103 sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
106 sh5*-*-* | sh64*-*-* | \
108 if test "x$enable_obsolete" != xyes; then
109 echo "*** Configuration $targ is obsolete." >&2
110 echo "*** Specify --enable-obsolete to build it anyway." >&2
111 echo "*** Support will be REMOVED in the next major release of BINUTILS," >&2
112 echo "*** unless a maintainer comes forward." >&2
143 vax-*-bsd* | vax-*-ultrix* | vax-*-vms* | \
147 echo "*** Configuration $targ is obsolete." >&2
148 echo "*** Support has been REMOVED." >&2
153 targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
154 case "${targ_cpu}" in
155 aarch64*) targ_archs="bfd_aarch64_arch bfd_arm_arch";;
156 alpha*) targ_archs=bfd_alpha_arch ;;
157 am33_2.0*) targ_archs=bfd_mn10300_arch ;;
158 arc*) targ_archs=bfd_arc_arch ;;
159 arm*) targ_archs=bfd_arm_arch ;;
160 bfin*) targ_archs=bfd_bfin_arch ;;
161 c30*) targ_archs=bfd_tic30_arch ;;
162 c4x*) targ_archs=bfd_tic4x_arch ;;
163 c54x*) targ_archs=bfd_tic54x_arch ;;
164 cr16*) targ_archs=bfd_cr16_arch ;;
165 crisv32) targ_archs=bfd_cris_arch ;;
166 crx*) targ_archs=bfd_crx_arch ;;
167 dlx*) targ_archs=bfd_dlx_arch ;;
168 fido*) targ_archs=bfd_m68k_arch ;;
169 hppa*) targ_archs=bfd_hppa_arch ;;
170 i[3-7]86) targ_archs=bfd_i386_arch ;;
171 ia16) targ_archs=bfd_i386_arch ;;
172 lm32) targ_archs=bfd_lm32_arch ;;
173 m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
174 m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
175 m68*) targ_archs=bfd_m68k_arch ;;
176 microblaze*) targ_archs=bfd_microblaze_arch ;;
177 mips*) targ_archs=bfd_mips_arch ;;
178 nds32*) targ_archs=bfd_nds32_arch ;;
179 nios2*) targ_archs=bfd_nios2_arch ;;
180 or1k*|or1knd*) targ_archs=bfd_or1k_arch ;;
181 pdp11*) targ_archs=bfd_pdp11_arch ;;
182 pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
183 powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
184 pru*) targ_archs=bfd_pru_arch ;;
185 riscv*) targ_archs=bfd_riscv_arch ;;
186 rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
187 s390*) targ_archs=bfd_s390_arch ;;
188 sh*) targ_archs=bfd_sh_arch ;;
189 sparc*) targ_archs=bfd_sparc_arch ;;
190 spu*) targ_archs=bfd_spu_arch ;;
191 tilegx*) targ_archs=bfd_tilegx_arch ;;
192 tilepro*) targ_archs=bfd_tilepro_arch ;;
193 v850*) targ_archs="bfd_v850_arch bfd_v850_rh850_arch" ;;
194 visium*) targ_archs=bfd_visium_arch ;;
195 wasm32) targ_archs=bfd_wasm32_arch ;;
196 x86_64*) targ_archs=bfd_i386_arch ;;
197 xtensa*) targ_archs=bfd_xtensa_arch ;;
198 xgate) targ_archs=bfd_xgate_arch ;;
199 z80|r800) targ_archs=bfd_z80_arch ;;
200 z8k*) targ_archs=bfd_z8k_arch ;;
201 *) targ_archs=bfd_${targ_cpu}_arch ;;
205 # WHEN ADDING ENTRIES TO THIS MATRIX:
206 # Make sure that the left side always has two dashes. Otherwise you
207 # can get spurious matches. Even for unambiguous cases, do this as a
208 # convention, else the table becomes a real mess to understand and maintain.
210 # Keep obsolete entries above the START comment, to keep them out of
215 echo "This target is obsolete and has been removed."
220 echo "This target is obsolete and has been removed."
225 echo "This target is obsolete and has been removed."
230 targ_defvec=plugin_vec
231 targ_selvecs="plugin_vec"
234 # START OF targmatch.h
237 targ_defvec=aarch64_mach_o_vec
238 targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
239 targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
242 aarch64-*-elf | aarch64-*-rtems*)
243 targ_defvec=aarch64_elf64_le_vec
244 targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
248 targ_defvec=aarch64_elf64_be_vec
249 targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
253 targ_defvec=aarch64_elf64_le_vec
254 targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
258 targ_defvec=aarch64_elf64_le_vec
259 targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
263 targ_defvec=aarch64_elf64_le_cloudabi_vec
264 targ_selvecs=aarch64_elf64_be_cloudabi_vec
268 targ_defvec=aarch64_elf64_le_vec
269 targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
273 targ_defvec=aarch64_elf64_be_vec
274 targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
277 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
278 targ_defvec=alpha_elf64_fbsd_vec
279 targ_selvecs="alpha_elf64_vec alpha_ecoff_le_vec"
281 # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
283 alpha*-*-freebsd3* | alpha*-*-freebsd4 | alpha*-*-freebsd4.0*)
284 targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
287 alpha*-*-netbsd* | alpha*-*-openbsd*)
288 targ_defvec=alpha_elf64_vec
289 targ_selvecs=alpha_ecoff_le_vec
292 alpha*-*-linux*ecoff*)
293 targ_defvec=alpha_ecoff_le_vec
294 targ_selvecs=alpha_elf64_vec
297 alpha*-*-linux-* | alpha*-*-elf*)
298 targ_defvec=alpha_elf64_vec
299 targ_selvecs=alpha_ecoff_le_vec
303 targ_defvec=alpha_vms_vec
304 targ_selvecs=alpha_vms_lib_txt_vec
308 targ_defvec=alpha_ecoff_le_vec
311 ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
312 targ_defvec=ia64_elf64_le_vec
313 targ_selvecs="ia64_elf64_be_vec ia64_pei_vec"
317 targ_defvec=ia64_elf32_hpux_be_vec
318 targ_selvecs="ia64_elf64_hpux_be_vec"
322 targ_defvec=ia64_elf64_vms_vec
323 targ_selvecs=alpha_vms_lib_txt_vec
326 sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
327 targ_defvec=sparc_elf64_fbsd_vec
328 targ_selvecs="sparc_elf64_vec sparc_elf32_vec sparc_aout_sunos_be_vec"
330 sparc64-*-netbsd* | sparc64-*-openbsd*)
331 targ_defvec=sparc_elf64_vec
332 targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
338 targ_defvec=am33_elf32_linux_vec
341 arc*eb-*-elf* | arc*eb-*-linux*)
342 targ_defvec=arc_elf32_be_vec
343 targ_selvecs=arc_elf32_le_vec
346 arc*-*-elf* | arc*-*-linux*)
347 targ_defvec=arc_elf32_le_vec
348 targ_selvecs=arc_elf32_be_vec
352 targ_defvec=arm_mach_o_vec
353 targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
354 targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
357 targ_defvec=arm_elf32_le_vec
358 targ_selvecs="arm_elf32_be_vec"
361 targ_defvec=arm_elf32_nacl_le_vec
362 targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
363 targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
364 targ_archs="$targ_archs bfd_i386_arch"
367 targ_defvec=arm_elf32_nacl_be_vec
368 targ_selvecs="arm_elf32_nacl_le_vec i386_elf32_nacl_vec"
369 targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
370 targ_archs="$targ_archs bfd_i386_arch"
373 targ_defvec=arm_elf32_be_vec
374 targ_selvecs="arm_elf32_le_vec arm_aout_nbsd_vec"
377 targ_defvec=arm_elf32_le_vec
378 targ_selvecs="arm_elf32_be_vec arm_aout_nbsd_vec"
380 arm-*-netbsd* | arm-*-openbsd*)
381 targ_defvec=arm_aout_nbsd_vec
382 targ_selvecs="arm_elf32_le_vec arm_elf32_be_vec"
385 arm-*-nto* | nto*arm*)
386 targ_defvec=arm_elf32_le_vec
387 targ_selvecs=arm_elf32_be_vec
388 targ_cflags=-D__QNXTARGET__
391 targ_defvec=arm_aout_riscix_vec
394 targ_defvec=arm_pe_epoc_le_vec
395 targ_selvecs="arm_pe_epoc_le_vec arm_pe_epoc_be_vec arm_pei_epoc_le_vec arm_pei_epoc_be_vec"
397 targ_cflags=-DARM_COFF_BUGFIX
399 arm-wince-pe | arm-*-wince | arm*-*-mingw32ce* | arm*-*-cegcc*)
400 targ_defvec=arm_pe_wince_le_vec
401 targ_selvecs="arm_pe_wince_le_vec arm_pe_wince_be_vec arm_pei_wince_le_vec arm_pei_wince_be_vec"
403 targ_cflags="-DARM_WINCE -DARM_COFF_BUGFIX"
406 targ_defvec=arm_pe_le_vec
407 targ_selvecs="arm_pe_le_vec arm_pe_be_vec arm_pei_le_vec arm_pei_be_vec"
410 arm-*-aout | armel-*-aout)
411 targ_defvec=arm_aout_le_vec
412 targ_selvecs=arm_aout_be_vec
415 targ_defvec=arm_aout_be_vec
416 targ_selvecs=arm_aout_le_vec
419 targ_defvec=arm_coff_le_vec
420 targ_selvecs=arm_coff_be_vec
424 targ_defvec=arm_elf32_le_vec
425 targ_selvecs=arm_elf32_be_vec
427 armeb-*-elf | arm*b-*-freebsd* | arm*b-*-linux-* | armeb-*-eabi*)
428 targ_defvec=arm_elf32_be_vec
429 targ_selvecs=arm_elf32_le_vec
432 targ_defvec=arm_elf32_le_vec
433 targ_selvecs=arm_elf32_be_vec
435 arm-*-elf | arm*-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
436 arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
437 arm*-*-eabi* | arm-*-rtems*)
438 targ_defvec=arm_elf32_le_vec
439 targ_selvecs=arm_elf32_be_vec
441 arm*-*-vxworks | arm*-*-windiss)
442 targ_defvec=arm_elf32_vxworks_le_vec
443 targ_selvecs=arm_elf32_vxworks_be_vec
446 targ_defvec=arm_elf32_symbian_le_vec
447 targ_selvecs=arm_elf32_symbian_be_vec
450 targ_defvec=arm_elf32_le_vec
451 targ_selvecs=arm_elf32_be_vec
455 targ_defvec=avr_elf32_vec
459 targ_defvec=bfin_elf32_vec
460 targ_selvecs=bfin_elf32_fdpic_vec
464 c30-*-*aout* | tic30-*-*aout*)
465 targ_defvec=tic30_aout_vec
467 c30-*-*coff* | tic30-*-*coff*)
468 targ_defvec=tic30_coff_vec
471 c4x-*-*coff* | tic4x-*-*coff*)
472 targ_defvec=tic4x_coff1_vec
473 targ_selvecs="tic4x_coff1_beh_vec tic4x_coff2_vec tic4x_coff2_beh_vec tic4x_coff0_vec tic4x_coff0_beh_vec"
477 c54x*-*-*coff* | tic54x-*-*coff*)
478 targ_defvec=tic54x_coff1_vec
479 targ_selvecs="tic54x_coff1_beh_vec tic54x_coff2_vec tic54x_coff2_beh_vec tic54x_coff0_vec tic54x_coff0_beh_vec"
483 cr16-*-elf* | cr16*-*-uclinux*)
484 targ_defvec=cr16_elf32_vec
489 targ_defvec=cr16c_elf32_vec
494 cris-*-* | crisv32-*-*)
495 targ_defvec=cris_aout_vec
496 targ_selvecs="cris_elf32_us_vec cris_elf32_vec"
499 *) targ_underscore=yes ;;
506 targ_defvec=crx_elf32_vec
511 targ_defvec=d10v_elf32_vec
515 targ_defvec=dlx_elf32_be_vec
516 targ_selvecs="dlx_elf32_be_vec"
520 targ_defvec=d30v_elf32_vec
524 targ_defvec=epiphany_elf32_vec
529 targ_defvec=m68k_elf32_vec
530 targ_selvecs="m68k_coff_vec"
534 targ_defvec=fr30_elf32_vec
538 targ_defvec=frv_elf32_vec
539 targ_selvecs=frv_elf32_fdpic_vec
543 targ_defvec=frv_elf32_fdpic_vec
544 targ_selvecs=frv_elf32_vec
547 moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux)
548 targ_defvec=moxie_elf32_be_vec
549 targ_selvecs=moxie_elf32_le_vec
553 targ_defvec=moxie_elf32_le_vec
556 h8300*-*-elf | h8300*-*-rtems*)
557 targ_defvec=h8300_elf32_vec
562 targ_defvec=h8300_elf32_linux_vec
567 targ_defvec=hppa_elf64_linux_vec
568 targ_selvecs=hppa_elf64_vec
572 targ_defvec=hppa_elf64_vec
573 targ_selvecs=hppa_elf64_linux_vec
574 targ_cflags=-DHPUX_LARGE_AR_IDS
580 targ_defvec=hppa_elf32_linux_vec
581 targ_selvecs=hppa_elf32_vec
584 targ_defvec=hppa_elf32_nbsd_vec
585 targ_selvecs="hppa_elf32_vec hppa_elf32_linux_vec"
587 hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-openbsd*)
588 targ_defvec=hppa_elf32_vec
589 targ_selvecs=hppa_elf32_linux_vec
593 targ_defvec=hppa_som_vec
594 targ_selvecs=hppa_elf32_vec
596 hppa*-*-hpux* | hppa*-*-hiux* | hppa*-*-mpeix*)
597 targ_defvec=hppa_som_vec
600 targ_defvec=hppa_som_vec
601 targ_selvecs=hppa_elf32_vec
604 i[3-7]86-*-sco3.2v5*coff)
605 targ_defvec=i386_coff_vec
606 targ_selvecs=i386_elf32_vec
608 i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
609 i[3-7]86-*-elf* | i[3-7]86-*-sco3.2v5* | \
610 i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | i[3-7]86-*-rtems*)
611 targ_defvec=i386_elf32_vec
612 targ_selvecs="iamcu_elf32_vec i386_coff_vec"
614 i[3-7]86-*-solaris2*)
615 targ_defvec=i386_elf32_sol2_vec
616 targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_pei_vec"
617 targ64_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec x86_64_pei_vec"
622 targ_defvec=i386_elf32_sol2_vec
623 targ_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pei_vec"
628 targ_defvec=i386_elf32_vec
629 targ_selvecs=i386_elf32_vec
632 targ_defvec=i386_elf32_vec
633 targ_selvecs="iamcu_elf32_vec i386_coff_vec"
636 targ_defvec=i386_elf32_vec
637 targ_selvecs=iamcu_elf32_vec
640 targ_defvec=i386_elf32_vec
641 targ_selvecs=iamcu_elf32_vec
644 targ_defvec=i386_elf32_vec
645 targ_selvecs=iamcu_elf32_vec
646 targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
648 *-*-msdosdjgpp* | *-*-go32* )
649 targ_defvec=i386_coff_go32_vec
650 targ_selvecs="i386_coff_go32stubbed_vec i386_aout_vec"
652 i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
654 targ_defvec=i386_coff_vec
656 i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*)
657 targ_defvec=i386_mach_o_vec
658 targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
659 targ64_selvecs=x86_64_mach_o_vec
660 targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
662 i[3-7]86-sequent-bsd*)
663 targ_defvec=i386_aout_dynix_vec
667 targ_defvec=i386_aout_bsd_vec
670 i[3-7]86-*-dragonfly*)
671 targ_defvec=i386_elf32_vec
672 targ_selvecs=iamcu_elf32_vec
673 targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
675 i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
676 i[3-7]86-*-freebsd[12])
677 targ_defvec=i386_aout_fbsd_vec
678 targ_selvecs=i386_aout_bsd_vec
681 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
682 targ_defvec=i386_elf32_fbsd_vec
683 targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_pei_vec i386_coff_vec"
684 targ64_selvecs="x86_64_elf64_fbsd_vec x86_64_elf64_vec x86_64_pei_vec l1om_elf64_vec l1om_elf64_fbsd_vec k1om_elf64_vec k1om_elf64_fbsd_vec"
685 # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
687 i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*)
688 targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
691 i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
692 targ_defvec=i386_elf32_vec
693 targ_selvecs="i386_aout_nbsd_vec iamcu_elf32_vec"
694 targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
696 i[3-7]86-*-netbsdpe*)
697 targ_defvec=i386_pe_vec
698 targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
700 i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
701 i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3])
702 targ_defvec=i386_aout_nbsd_vec
703 targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_aout_bsd_vec"
707 targ_defvec=i386_elf32_vec
708 targ_selvecs="iamcu_elf32_vec i386_aout_nbsd_vec"
710 i[3-7]86-*-linux*aout*)
711 targ_defvec=i386_aout_linux_vec
712 targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
716 targ_defvec=i386_elf32_vec
717 targ_selvecs="iamcu_elf32_vec i386_aout_linux_vec i386_pei_vec"
718 targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
721 targ_defvec=i386_elf32_nacl_vec
722 targ_selvecs="arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
723 targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec"
724 targ_archs="$targ_archs bfd_arm_arch"
727 targ_defvec=i386_elf32_vec
729 targ64_selvecs=x86_64_elf64_vec
733 targ_defvec=x86_64_elf64_cloudabi_vec
737 targ_defvec=x86_64_mach_o_vec
738 targ_selvecs="i386_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
739 targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
743 targ_defvec=x86_64_elf64_vec
744 targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
747 x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia)
748 targ_defvec=x86_64_elf64_vec
749 targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec"
753 targ_defvec=x86_64_elf64_vec
754 targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
757 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
758 targ_defvec=x86_64_elf64_fbsd_vec
759 targ_selvecs="i386_elf32_fbsd_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pei_vec i386_elf32_vec x86_64_elf64_vec l1om_elf64_vec l1om_elf64_fbsd_vec k1om_elf64_vec k1om_elf64_fbsd_vec"
762 x86_64-*-netbsd* | x86_64-*-openbsd*)
763 targ_defvec=x86_64_elf64_vec
764 targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_aout_nbsd_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
768 targ_defvec=x86_64_elf64_vec
769 targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_aout_linux_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
773 targ_defvec=x86_64_elf32_nacl_vec
774 targ_selvecs="i386_elf32_nacl_vec x86_64_elf64_nacl_vec arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
775 targ_archs="$targ_archs bfd_arm_arch"
778 x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
779 targ_defvec=x86_64_pe_vec
780 targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_be_vec x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
785 targ_defvec=x86_64_elf64_vec
789 targ_defvec=x86_64_elf64_vec
790 targ_selvecs=i386_elf32_vec
795 targ_defvec=i386_elf32_vec
796 targ_selvecs="iamcu_elf32_vec i386_coff_lynx_vec i386_aout_lynx_vec"
799 targ_defvec=i386_elf32_vec
800 targ_selvecs=iamcu_elf32_vec
802 i[3-7]86-*-mach* | i[3-7]86-*-osf1mk*)
803 targ_defvec=i386_aout_mach3_vec
804 targ_cflags=-DSTAT_FOR_EXEC
808 targ_defvec=i386_aout_os9k_vec
811 targ_defvec=i386_aout_vec
812 targ_selvecs=i386_msdos_vec
815 targ_defvec=i386_elf32_vec
816 targ_selvecs="iamcu_elf32_vec i386_msdos_vec i386_aout_vec"
819 targ_defvec=i386_pe_vec
820 targ_selvecs="i386_pe_vec i386_pei_vec"
822 i[3-7]86-*-beoself* | i[3-7]86-*-beos*)
823 targ_defvec=i386_elf32_vec
824 targ_selvecs="iamcu_elf32_vec i386_pe_vec i386_pei_vec"
827 targ_defvec=i386_pei_vec
828 targ_selvecs="i386_pe_vec"
829 # FIXME: This should eventually be checked at runtime.
830 targ_cflags=-DSTRICT_PE_FORMAT
833 targ_defvec=i386_elf32_vec
834 targ_selvecs="iamcu_elf32_vec i386_coff_vec"
836 i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
837 targ_defvec=i386_pe_vec
838 targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
842 targ_defvec=i386_coff_vec
844 i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
845 targ_defvec=i386_aout_vec
848 targ_defvec=i386_elf32_vxworks_vec
852 targ_defvec=i386_elf32_vec
853 targ_selfvecs="iamcu_elf32_vec i386chaos_vec"
857 targ_defvec=i386_elf32_vec
858 targ_selvecs="i386_msdos_vec i386_aout_vec"
862 targ_defvec=ip2k_elf32_vec
867 targ_defvec=iq2000_elf32_vec
870 lm32-*-elf | lm32-*-rtems*)
871 targ_defvec=lm32_elf32_vec
872 targ_selvecs=lm32_elf32_fdpic_vec
876 targ_defvec=lm32_elf32_fdpic_vec
877 targ_selvecs=lm32_elf32_vec
880 m32c-*-elf | m32c-*-rtems*)
881 targ_defvec=m32c_elf32_vec
886 targ_defvec=m32r_elf32_linux_le_vec
887 targ_selvecs="m32r_elf32_linux_vec m32r_elf32_linux_le_vec"
890 targ_defvec=m32r_elf32_linux_vec
891 targ_selvecs="m32r_elf32_linux_vec m32r_elf32_linux_le_vec"
894 targ_defvec=m32r_elf32_le_vec
895 targ_selvecs="m32r_elf32_vec m32r_elf32_le_vec"
898 targ_defvec=m32r_elf32_vec
901 m68hc11-*-* | m6811-*-*)
902 targ_defvec=m68hc11_elf32_vec
903 targ_selvecs="m68hc11_elf32_vec m68hc12_elf32_vec"
905 m68hc12-*-* | m6812-*-*)
906 targ_defvec=m68hc12_elf32_vec
907 targ_selvecs="m68hc11_elf32_vec m68hc12_elf32_vec"
911 targ_defvec=m68k_coff_sysv_vec
914 targ_defvec=m68k_aout_hp300bsd_vec
918 targ_defvec=aout0_be_vec
919 # We include core_cisco_be_vec here, rather than making a separate cisco
920 # configuration, so that cisco-core.c gets routinely tested at
921 # least for compilation.
922 targ_selvecs="core_cisco_be_vec"
925 m68*-*-elf* | m68*-*-sysv4* | m68*-*-rtems* | m68*-*-uclinux*)
926 targ_defvec=m68k_elf32_vec
927 targ_selvecs="m68k_coff_vec"
929 m68*-*-coff* | m68*-*-sysv*)
930 targ_defvec=m68k_coff_vec
931 targ_selvecs="m68k_coff_vec m68k_versados_vec"
934 targ_defvec=m68k_aout_hp300hpux_vec
938 targ_defvec=m68k_aout_linux_vec
939 targ_selvecs=m68k_elf32_vec
943 targ_defvec=m68k_elf32_vec
944 targ_selvecs=m68k_aout_linux_vec
947 targ_defvec=m68k_elf32_vec
948 # targ_selvecs=m68kmach3_vec
949 # targ_cflags=-DSTAT_FOR_EXEC
952 targ_defvec=m68k_aout_4knbsd_vec
953 targ_selvecs="m68k_aout_nbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
957 targ_defvec=m68k_elf32_vec
958 targ_selvecs="m68k_aout_nbsd_vec m68k_aout_4knbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
960 m68*-*-netbsdaout* | m68*-*-netbsd*)
961 targ_defvec=m68k_aout_nbsd_vec
962 targ_selvecs="m68k_aout_4knbsd_vec m68k_elf32_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
966 targ_defvec=m68k_aout_nbsd_vec
967 targ_selvecs="m68k_aout_4knbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
970 m68*-*-sunos* | m68*-*-os68k* | m68*-*-vxworks* | m68*-netx-* | \
971 m68*-*-bsd* | m68*-*-vsta*)
972 targ_defvec=sparc_aout_sunos_be_vec
976 targ_defvec=sparc_aout_sunos_be_vec
977 targ_selvecs="m68k_coff_vec m68k_versados_vec tekhex_vec"
981 targ_defvec=m68k_elf32_vec
982 targ_selvecs=m68k_coff_vec
985 targ_defvec=m68k_elf32_vec
990 targ_defvec=mcore_elf32_be_vec
991 targ_selvecs="mcore_elf32_be_vec mcore_elf32_le_vec"
994 targ_defvec=mcore_pe_be_vec
995 targ_selvecs="mcore_pe_be_vec mcore_pe_le_vec mcore_pei_be_vec mcore_pei_le_vec"
999 targ_defvec=mep_elf32_vec
1000 targ_selvecs=mep_elf32_le_vec
1004 targ_defvec=metag_elf32_vec
1009 targ_defvec=microblaze_elf32_le_vec
1010 targ_selvecs=microblaze_elf32_vec
1014 targ_defvec=microblaze_elf32_vec
1015 targ_selvecs=microblaze_elf32_le_vec
1019 targ_defvec=mips_ecoff_be_vec
1020 targ_selvecs=mips_ecoff_le_vec
1024 targ_defvec=mips_elf32_trad_le_vec
1025 targ_selvecs="mips_elf32_trad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
1028 targ_defvec=mips_elf32_trad_be_vec
1029 targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1032 mips*-dec-* | mips*el-*-ecoff*)
1033 targ_defvec=mips_ecoff_le_vec
1034 targ_selvecs=mips_ecoff_be_vec
1037 targ_defvec=mips_ecoff_be_vec
1038 targ_selvecs=mips_ecoff_le_vec
1042 targ_defvec=mips_elf32_n_be_vec
1043 targ_selvecs="mips_elf32_n_le_vec mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1046 targ_defvec=mips_elf32_n_le_vec
1047 targ_selvecs="mips_elf32_n_le_vec mips_elf32_n_be_vec mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1050 targ_defvec=mips_elf32_le_vec
1051 targ_selvecs="mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1054 targ_defvec=mips_elf32_be_vec
1055 targ_selvecs="mips_elf32_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1058 mips*-sgi-* | mips*-*-bsd*)
1059 targ_defvec=mips_ecoff_be_vec
1060 targ_selvecs=mips_ecoff_le_vec
1063 targ_defvec=mips_ecoff_bele_vec
1064 targ_selvecs="mips_ecoff_le_vec mips_ecoff_be_vec"
1068 targ_defvec=mips_elf32_trad_be_vec
1069 targ_selvecs="mips_elf32_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1072 mips*-*-sysv* | mips*-*-riscos*)
1073 targ_defvec=mips_ecoff_be_vec
1074 targ_selvecs=mips_ecoff_le_vec
1078 targ_defvec=mips_elf32_vxworks_le_vec
1079 targ_selvecs="mips_elf32_le_vec mips_elf32_vxworks_be_vec mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1082 targ_defvec=mips_elf32_vxworks_be_vec
1083 targ_selvecs="mips_elf32_be_vec mips_elf32_vxworks_le_vec mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1086 targ_defvec=mips_elf32_trad_le_vec
1087 targ_selvecs="mips_elf32_trad_be_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
1089 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
1090 targ_defvec=mips_elf32_trad_be_vec
1091 targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
1093 mips*el-*-elf* | mips*-*-chorus*)
1094 targ_defvec=mips_elf32_le_vec
1095 targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1097 mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
1098 targ_defvec=mips_elf32_be_vec
1099 targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1102 targ_defvec=mips_elf64_trad_be_vec
1103 targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec"
1106 targ_defvec=mips_elf32_le_vec
1107 targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
1110 targ_defvec=mips_elf32_be_vec
1111 targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1114 targ_defvec=mips_elf32_ntrad_le_vec
1115 targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
1118 targ_defvec=mips_elf32_ntrad_be_vec
1119 targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
1122 targ_defvec=mips_elf32_trad_le_vec
1123 targ_selvecs="mips_elf32_trad_be_vec mips_ecoff_le_vec mips_ecoff_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec"
1126 targ_defvec=mips_elf32_trad_be_vec
1127 targ_selvecs="mips_elf32_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec"
1129 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
1131 targ_defvec=mips_elf32_ntradfbsd_le_vec
1132 targ_selvecs="mips_elf32_ntradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf64_tradfbsd_le_vec mips_elf64_tradfbsd_be_vec"
1134 targ_selvecs="${targ_selvecs} mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
1136 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
1138 targ_defvec=mips_elf32_ntradfbsd_be_vec
1139 targ_selvecs="mips_elf32_ntradfbsd_le_vec mips_elf32_tradfbsd_be_vec mips_elf32_tradfbsd_le_vec mips_elf64_tradfbsd_be_vec mips_elf64_tradfbsd_le_vec"
1141 targ_selvecs="${targ_selvecs} mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
1143 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
1145 targ_defvec=mips_elf32_tradfbsd_le_vec
1146 targ_selvecs="mips_elf32_tradfbsd_be_vec mips_elf32_ntradfbsd_le_vec mips_elf64_tradfbsd_le_vec mips_elf32_ntradfbsd_be_vec mips_elf64_tradfbsd_be_vec"
1148 targ_selvecs="${targ_selvecs} mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec"
1150 mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
1152 targ_defvec=mips_elf32_tradfbsd_be_vec
1153 targ_selvecs="mips_elf32_tradfbsd_le_vec mips_elf32_ntradfbsd_be_vec mips_elf64_tradfbsd_be_vec mips_elf32_ntradfbsd_le_vec mips_elf64_tradfbsd_le_vec"
1155 targ_selvecs="${targ_selvecs} mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec"
1158 targ_defvec=mmix_elf64_vec
1159 targ_selvecs=mmix_mmo_vec
1164 targ_defvec=mn10200_elf32_vec
1169 targ_defvec=mn10300_elf32_vec
1174 targ_defvec=mt_elf32_vec
1178 targ_defvec=msp430_elf32_vec
1179 targ_selvecs=msp430_elf32_ti_vec
1183 targ_defvec=nds32_elf32_linux_le_vec
1184 targ_selvecs=nds32_elf32_linux_be_vec
1188 targ_defvec=nds32_elf32_linux_be_vec
1189 targ_selvecs=nds32_elf32_linux_le_vec
1193 targ_defvec=nds32_elf32_le_vec
1194 targ_selvecs=nds32_elf32_be_vec
1198 targ_defvec=nds32_elf32_be_vec
1199 targ_selvecs=nds32_elf32_le_vec
1202 ns32k-pc532-mach* | ns32k-pc532-ux*)
1203 targ_defvec=ns32k_aout_pc532mach_vec
1206 ns32k-*-netbsd* | ns32k-*-lites* | ns32k-*-openbsd*)
1207 targ_defvec=ns32k_aout_pc532nbsd_vec
1212 targ_defvec=nios2_elf32_be_vec
1213 targ_selvecs=nios2_elf32_le_vec
1217 targ_defvec=nios2_elf32_le_vec
1218 targ_selvecs=nios2_elf32_be_vec
1222 targ_defvec=nios2_elf32_le_vec
1223 targ_selvecs=nios2_elf32_be_vec
1226 or1k-*-elf | or1k-*-linux* | or1k-*-rtems*)
1227 targ_defvec=or1k_elf32_vec
1230 or1knd-*-elf | or1knd-*-linux* | or1knd-*-rtems*)
1231 targ_defvec=or1k_elf32_vec
1235 targ_defvec=pdp11_aout_vec
1240 targ_defvec=pj_elf32_vec
1241 targ_selvecs="pj_elf32_vec pj_elf32_le_vec"
1245 targ_defvec=pj_elf32_le_vec
1246 targ_selvecs="pj_elf32_le_vec pj_elf32_vec i386_elf32_vec iamcu_elf32_vec"
1249 powerpc-*-aix5.[01] | rs6000-*-aix5.[01])
1250 targ_defvec=rs6000_xcoff_vec
1251 targ_selvecs="rs6000_xcoff64_aix_vec"
1255 powerpc64-*-aix5.[01] | rs6000-*-aix5.[01])
1256 targ_defvec=rs6000_xcoff64_aix_vec
1257 targ_selvecs="rs6000_xcoff_vec"
1261 powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*)
1262 targ_cflags=-DAIX_WEAK_SUPPORT
1263 targ_defvec=rs6000_xcoff_vec
1264 targ_selvecs="rs6000_xcoff64_aix_vec"
1268 powerpc64-*-aix[5-9]* | rs6000-*-aix[5-9]*)
1269 targ_cflags=-DAIX_WEAK_SUPPORT
1270 targ_defvec=rs6000_xcoff64_aix_vec
1271 targ_selvecs="rs6000_xcoff_vec"
1276 powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*)
1277 targ_defvec=rs6000_xcoff_vec
1278 targ64_selvecs=rs6000_xcoff64_vec
1280 *-*-aix4.[3456789]* | *-*-aix[56789]*)
1283 targ_cflags=-DSMALL_ARCHIVE;;
1288 targ_defvec=rs6000_xcoff64_vec
1289 targ_selvecs=rs6000_xcoff_vec
1292 powerpc64-*-freebsd*)
1293 targ_defvec=powerpc_elf64_fbsd_vec
1294 targ_selvecs="powerpc_elf64_vec powerpc_elf32_vec powerpc_elf32_fbsd_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
1297 powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
1299 targ_defvec=powerpc_elf64_vec
1300 targ_selvecs="powerpc_elf64_le_vec powerpc_elf32_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
1303 powerpc64le-*-elf* | powerpcle-*-elf64* | powerpc64le-*-linux* | \
1304 powerpc64le-*-*bsd*)
1305 targ_defvec=powerpc_elf64_le_vec
1306 targ_selvecs="powerpc_elf64_vec powerpc_elf32_le_vec powerpc_elf32_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
1310 powerpc-*-*freebsd*)
1311 targ_defvec=powerpc_elf32_fbsd_vec
1312 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_elf32_le_vec powerpc_boot_vec"
1313 targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec powerpc_elf64_fbsd_vec"
1315 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
1316 powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
1318 targ_defvec=powerpc_elf32_vec
1319 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
1320 targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1323 targ_defvec=powerpc_elf32_vec
1324 targ_selvecs="powerpc_elf32_le_vec powerpc_boot_vec"
1325 targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1327 powerpc-*-darwin* | powerpc-*-macos10* | powerpc-*-rhapsody*)
1328 targ_defvec=mach_o_be_vec
1329 targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
1330 targ_archs="$targ_archs bfd_i386_arch"
1333 targ_defvec=powerpc_xcoff_vec
1336 targ_defvec=powerpc_elf32_vec
1337 targ_selvecs="rs6000_xcoff_vec"
1338 targ_cflags=-DSMALL_ARCHIVE
1341 targ_defvec=powerpc_elf32_vec
1342 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
1344 powerpc-*-vxworks* | powerpc-*-windiss*)
1345 targ_defvec=powerpc_elf32_vxworks_vec
1346 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_elf32_le_vec powerpc_boot_vec"
1347 targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1350 targ_defvec=powerpc_elf32_le_vec
1351 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_boot_vec"
1353 powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
1354 powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks*)
1355 targ_defvec=powerpc_elf32_le_vec
1356 targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_boot_vec"
1357 targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1359 powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
1360 targ_defvec=powerpc_pe_le_vec
1361 targ_selvecs="powerpc_pei_le_vec powerpc_pei_vec powerpc_pe_le_vec powerpc_pe_vec"
1365 targ_defvec=pru_elf32_vec
1370 targ_defvec=riscv_elf32_vec
1371 targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
1375 targ_defvec=riscv_elf64_vec
1376 targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
1382 targ_defvec=rl78_elf32_vec
1387 targ_defvec=rx_elf32_le_vec
1388 targ_selvecs="rx_elf32_be_vec rx_elf32_le_vec rx_elf32_be_ns_vec"
1393 targ_defvec=s390_elf32_vec
1394 targ64_selvecs=s390_elf64_vec
1399 targ_defvec=s390_elf64_vec
1400 targ_selvecs=s390_elf32_vec
1404 targ_defvec=s390_elf64_vec
1409 targ_defvec=score_elf32_be_vec
1410 targ_selvecs=score_elf32_le_vec
1414 targ_defvec=sh64_elf32_le_vec
1415 targ_selvecs="sh64_elf32_vec sh64_elf64_le_vec sh64_elf64_vec sh_elf32_le_vec sh_elf32_vec"
1420 targ_defvec=sh64_elf32_vec
1421 targ_selvecs="sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec sh_elf32_vec sh_elf32_le_vec"
1426 targ_defvec=sh64_elf32_linux_be_vec
1427 targ_selvecs="sh64_elf32_linux_vec sh64_elf64_linux_be_vec sh64_elf64_linux_vec sh_elf32_linux_be_vec sh_elf32_linux_vec"
1431 targ_defvec=sh64_elf32_linux_vec
1432 targ_selvecs="sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec sh_elf32_linux_vec sh_elf32_linux_be_vec"
1436 targ_defvec=sh_elf32_linux_be_vec
1437 targ_selvecs="sh_elf32_linux_vec sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
1438 targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
1444 targ_defvec=sh_elf32_linux_be_vec
1445 targ_selvecs=sh_elf32_linux_vec
1446 targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
1449 targ_defvec=sh_elf32_linux_vec
1450 targ_selvecs=sh_elf32_linux_be_vec
1451 targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
1454 sh-*-uclinux* | sh[12]-*-uclinux*)
1455 targ_defvec=sh_elf32_vec
1456 targ_selvecs="sh_elf32_le_vec sh_elf32_linux_be_vec sh_elf32_linux_vec sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
1458 targ_selvecs="${targ_selvecs} sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
1464 targ_defvec=sh64_elf32_nbsd_le_vec
1465 targ_selvecs="sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1469 targ_defvec=sh64_elf32_nbsd_vec
1470 targ_selvecs="sh64_elf32_nbsd_le_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1475 targ_defvec=sh64_elf64_nbsd_le_vec
1476 targ_selvecs="sh64_elf64_nbsd_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1480 targ_defvec=sh64_elf64_nbsd_vec
1481 targ_selvecs="sh64_elf64_nbsd_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1486 targ_defvec=sh_elf32_nbsd_le_vec
1487 targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec"
1491 targ_defvec=sh_elf32_nbsd_vec
1492 targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec"
1498 targ_defvec=sh_elf32_nbsd_vec
1499 targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec"
1502 targ_defvec=sh_elf32_symbian_le_vec
1503 targ_selvecs="sh_coff_le_vec sh_coff_small_le_vec"
1508 shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
1509 targ_defvec=sh_elf32_le_vec
1510 targ_selvecs="sh_elf32_vec sh_coff_le_vec sh_coff_vec sh_coff_small_le_vec sh_coff_small_vec sh64_elf32_vec sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec"
1517 sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*)
1518 targ_defvec=sh_elf32_vec
1519 targ_selvecs="sh_elf32_le_vec sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec sh64_elf32_vec sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec"
1526 targ_defvec=sh_elf32_vec
1527 targ_selvecs="sh_elf32_le_vec sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1531 targ_defvec=sh_elf32_nbsd_le_vec
1532 targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec"
1535 targ_defvec=sh_pe_le_vec
1536 targ_selvecs="sh_pe_le_vec sh_pei_le_vec"
1540 targ_defvec=sh_elf32_vxworks_vec
1541 targ_selvecs="sh_elf32_vxworks_le_vec"
1542 # FIXME None of the following are actually used on this target, but
1543 # they're necessary for coff-sh.c (which is unconditionally used) to be
1544 # compiled correctly.
1545 targ_selvecs="$targ_selvecs sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1549 targ_defvec=sh_coff_vec
1550 targ_selvecs="sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1555 targ_defvec=sparc_aout_sunos_be_vec
1556 targ_selvecs=sparc_aout_le_vec
1560 targ_defvec=sparc_aout_sunos_be_vec
1563 sparclite-*-elf* | sparc86x-*-elf*)
1564 targ_defvec=sparc_elf32_vec
1567 targ_defvec=sparc_elf32_vec
1569 sparc-*-linux*aout*)
1570 targ_defvec=sparc_aout_linux_vec
1571 targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
1574 sparc-*-linux-* | sparcv*-*-linux-*)
1575 targ_defvec=sparc_elf32_vec
1576 targ_selvecs="sparc_aout_linux_vec sparc_elf64_vec sparc_aout_sunos_be_vec"
1579 targ_defvec=sparc_elf32_vec
1580 targ_selvecs=sparc_aout_nbsd_vec
1582 sparc-*-netbsdaout* | sparc-*-netbsd*)
1583 targ_defvec=sparc_aout_nbsd_vec
1584 targ_selvecs=sparc_elf32_vec
1587 sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
1588 targ_defvec=sparc_aout_nbsd_vec
1592 targ_defvec=sparc_elf32_vec
1593 targ_selvecs=sparc_aout_nbsd_vec
1596 targ_defvec=sparc_elf32_vec
1597 targ_selvecs=sparc_aout_sunos_be_vec
1599 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1600 targ_defvec=sparc_elf32_sol2_vec
1601 targ_selvecs=sparc_aout_sunos_be_vec
1604 sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
1605 targ_defvec=sparc_elf32_sol2_vec
1606 targ_selvecs="sparc_elf64_sol2_vec sparc_aout_sunos_be_vec"
1611 targ_defvec=sparc_elf32_vec
1614 targ_defvec=sparc_elf32_vxworks_vec
1615 targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
1619 targ_defvec=sparc_aout_sunos_be_vec
1624 targ_defvec=sparc_elf64_vec
1625 targ_selvecs="sparc_elf32_vec sparc_aout_linux_vec sparc_aout_sunos_be_vec"
1628 sparc64-*-elf* | sparc64-*-rtems* )
1629 targ_defvec=sparc_elf64_vec
1630 targ_selvecs=sparc_elf32_vec
1635 targ_defvec=sparc_coff_vec
1638 targ_defvec=sparc_elf32_vec
1639 targ_selvecs="sparc_aout_sunos_be_vec sparc_coff_vec"
1642 targ_defvec=sparc_aout_sunos_be_vec
1647 targ_defvec=spu_elf32_vec
1652 targ_defvec=tic6x_elf32_c6000_le_vec
1653 targ_selvecs="tic6x_elf32_c6000_be_vec tic6x_elf32_le_vec tic6x_elf32_be_vec"
1657 targ_defvec=tic6x_elf32_linux_le_vec
1658 targ_selvecs="tic6x_elf32_linux_be_vec tic6x_elf32_le_vec tic6x_elf32_be_vec"
1662 targ_defvec=tic80_coff_vec
1668 targ_defvec=tilegx_elf64_le_vec
1669 targ_selvecs="tilegx_elf64_be_vec tilegx_elf32_be_vec tilegx_elf32_le_vec"
1672 targ_defvec=tilegx_elf64_be_vec
1673 targ_selvecs="tilegx_elf64_le_vec tilegx_elf32_be_vec tilegx_elf32_le_vec"
1678 targ_defvec=tilepro_elf32_vec
1682 targ_defvec=ft32_elf32_vec
1686 targ_defvec=v850_elf32_vec
1687 targ_selvecs="v800_elf32_vec"
1692 targ_defvec=vax_elf32_vec
1693 targ_selvecs="vax_aout_nbsd_vec vax_aout_1knbsd_vec"
1696 vax-*-netbsdaout* | vax-*-netbsd*)
1697 targ_defvec=vax_aout_nbsd_vec
1698 targ_selvecs="vax_elf32_vec vax_aout_1knbsd_vec"
1703 targ_defvec=vax_aout_nbsd_vec
1708 targ_defvec=vax_elf32_vec
1712 targ_defvec=visium_elf32_vec
1716 targ_defvec=wasm32_elf32_vec
1717 targ_selvecs="wasm_vec"
1721 targ_defvec=xgate_elf32_vec
1722 targ_selvecs="xgate_elf32_vec"
1726 targ_defvec=xstormy16_elf32_vec
1730 targ_defvec=xtensa_elf32_le_vec
1731 targ_selvecs=xtensa_elf32_be_vec
1734 targ_defvec=xc16x_elf32_vec
1738 targ_defvec=z80_coff_vec
1743 targ_defvec=z8k_coff_vec
1747 # END OF targmatch.h
1749 echo 1>&2 "*** BFD does not support target ${targ}."
1750 echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
1755 # All MIPS ELF targets need a 64-bit bfd_vma.
1756 case "${targ_defvec} ${targ_selvecs}" in
1762 case "${host64}${want64}" in
1764 targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
1768 # If we support any ELF target, then automatically add support for the
1769 # generic ELF targets. This permits an objdump with some ELF support
1770 # to be used on an arbitrary ELF file for anything other than
1771 # relocation information.
1772 case "${targ_defvec} ${targ_selvecs}" in
1773 *elf64* | *mips_elf32_n*)
1774 targ_selvecs="${targ_selvecs} elf64_le_vec elf64_be_vec elf32_le_vec elf32_be_vec"
1777 targ_selvecs="${targ_selvecs} elf32_le_vec elf32_be_vec"
1781 # If we support Intel MCU target, then add support for bfd_iamcu_arch.
1782 case "${targ_defvec} ${targ_selvecs}" in
1784 targ_archs="$targ_archs bfd_iamcu_arch"
1788 # If we support Intel L1OM target, then add support for bfd_l1om_arch.
1789 case "${targ_defvec} ${targ_selvecs}" in
1791 targ_archs="$targ_archs bfd_l1om_arch"
1795 # If we support Intel K1OM target, then add support for bfd_k1om_arch.
1796 case "${targ_defvec} ${targ_selvecs}" in
1798 targ_archs="$targ_archs bfd_k1om_arch"