1# config.bfd
2#
3#   Copyright (C) 2012-2014 Free Software Foundation, Inc.
4#
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.
9#
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.
14#
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/>.
18#
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
30
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.
34
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.
42
43targ_defvec=
44targ_selvecs=
45targ64_selvecs=
46targ_cflags=
47targ_underscore=no
48
49# Catch obsolete configurations.
50case $targ in
51 openrisc-*-* | or32-*-*)
52    echo "*** Configuration $targ is obsolete." >&2
53    echo "*** Use or1k-*-elf or or1k-*-linux as the target instead" >&2
54    exit 1
55    ;;
56 null)
57    if test "x$enable_obsolete" != xyes; then
58      echo "*** Configuration $targ is obsolete." >&2
59      echo "*** Specify --enable-obsolete to build it anyway." >&2
60      echo "*** Support will be REMOVED in the next major release of BINUTILS," >&2
61      echo "*** unless a maintainer comes forward." >&2
62      exit 1
63    fi;;
64esac
65
66case $targ in
67 *-go32-rtems* | \
68 a29k-* | \
69 arm-*-oabi | \
70 hppa*-*-rtems* | \
71 i960-*-rtems* | \
72 i[3-7]86*-*-rtemscoff* | \
73 m68*-*-lynxos* | \
74 m68*-*-rtemscoff* | \
75 m68*-apollo-* | \
76 m68*-apple-aux* | \
77 m68*-bull-sysv* | \
78 maxq-*-coff | \
79 mips*el-*-rtems* | \
80 powerpcle-*-rtems* | \
81 sparc*-*-rtemsaout* | \
82 sparc-*-lynxos* | \
83 vax-*-vms* | \
84 null)
85    echo "*** Configuration $targ is obsolete." >&2
86    echo "*** Support has been REMOVED." >&2
87    exit 1
88    ;;
89esac
90
91targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
92case "${targ_cpu}" in
93aarch64*)	 targ_archs="bfd_aarch64_arch bfd_arm_arch";;
94alpha*)		 targ_archs=bfd_alpha_arch ;;
95am34*|am33_2.0*) targ_archs=bfd_mn10300_arch ;;
96arm*)		 targ_archs=bfd_arm_arch ;;
97bfin*)		 targ_archs=bfd_bfin_arch ;;
98c30*)		 targ_archs=bfd_tic30_arch ;;
99c4x*)		 targ_archs=bfd_tic4x_arch ;;
100c54x*)		 targ_archs=bfd_tic54x_arch ;;
101cr16*)		 targ_archs=bfd_cr16_arch ;;
102crisv32)	 targ_archs=bfd_cris_arch ;;
103crx*)		 targ_archs=bfd_crx_arch ;;
104dlx*)		 targ_archs=bfd_dlx_arch ;;
105fido*)		 targ_archs=bfd_m68k_arch ;;
106hppa*)		 targ_archs=bfd_hppa_arch ;;
107i[3-7]86)	 targ_archs=bfd_i386_arch ;;
108i370)		 targ_archs=bfd_i370_arch ;;
109lm32)	         targ_archs=bfd_lm32_arch ;;
110m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
111m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
112m68*)		 targ_archs=bfd_m68k_arch ;;
113m88*)		 targ_archs=bfd_m88k_arch ;;
114microblaze*)	 targ_archs=bfd_microblaze_arch ;;
115mips*)		 targ_archs=bfd_mips_arch ;;
116nds32*)		 targ_archs=bfd_nds32_arch ;;
117nios2*)          targ_archs=bfd_nios2_arch ;;
118or1k*|or1knd*)	 targ_archs=bfd_or1k_arch ;;
119pdp11*)		 targ_archs=bfd_pdp11_arch ;;
120pj*)		 targ_archs="bfd_pj_arch bfd_i386_arch";;
121powerpc*)	 targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
122rs6000)		 targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
123s390*)		 targ_archs=bfd_s390_arch ;;
124sh*)		 targ_archs=bfd_sh_arch ;;
125sparc*)		 targ_archs=bfd_sparc_arch ;;
126spu*)            targ_archs=bfd_spu_arch ;;
127tilegx*)	 targ_archs=bfd_tilegx_arch ;;
128tilepro*)	 targ_archs=bfd_tilepro_arch ;;
129v850*)		 targ_archs="bfd_v850_arch bfd_v850_rh850_arch" ;;
130x86_64*)	 targ_archs=bfd_i386_arch ;;
131xtensa*)	 targ_archs=bfd_xtensa_arch ;;
132xgate)		 targ_archs=bfd_xgate_arch ;;
133z80|r800)	 targ_archs=bfd_z80_arch ;;
134z8k*)		 targ_archs=bfd_z8k_arch ;;
135*)		 targ_archs=bfd_${targ_cpu}_arch ;;
136esac
137
138
139# WHEN ADDING ENTRIES TO THIS MATRIX:
140#  Make sure that the left side always has two dashes.  Otherwise you
141#  can get spurious matches.  Even for unambiguous cases, do this as a
142#  convention, else the table becomes a real mess to understand and maintain.
143#
144#  Keep obsolete entries above the START comment, to keep them out of
145#  targmatch.h.
146
147case "${targ}" in
148  mips*-dec-bsd*)
149    echo "This target is obsolete and has been removed."
150    exit 1
151    ;;
152
153  mips*-*-mach3*)
154    echo "This target is obsolete and has been removed."
155    exit 1
156    ;;
157
158  mips*-*-pe*)
159    echo "This target is obsolete and has been removed."
160    exit 1
161    ;;
162
163  plugin)
164    targ_defvec=plugin_vec
165    targ_selvecs="plugin_vec"
166    ;;
167
168# START OF targmatch.h
169#ifdef BFD64
170  aarch64-*-elf)
171    targ_defvec=aarch64_elf64_le_vec
172    targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
173    want64=true
174    ;;
175  aarch64_be-*-elf)
176    targ_defvec=aarch64_elf64_be_vec
177    targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
178    want64=true
179    ;;
180  aarch64-*-linux*)
181    targ_defvec=aarch64_elf64_le_vec
182    targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
183    want64=true
184    ;;
185  aarch64_be-*-linux*)
186    targ_defvec=aarch64_elf64_be_vec
187    targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
188    want64=true
189    ;;
190  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
191    targ_defvec=alpha_elf64_fbsd_vec
192    targ_selvecs="alpha_elf64_vec alpha_ecoff_le_vec"
193    want64=true
194    # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
195    case "${targ}" in
196      alpha*-*-freebsd3* | alpha*-*-freebsd4 | alpha*-*-freebsd4.0*)
197	targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
198    esac
199    ;;
200  alpha*-*-netbsd* | alpha*-*-openbsd*)
201    targ_defvec=alpha_elf64_vec
202    targ_selvecs=alpha_ecoff_le_vec
203    want64=true
204    ;;
205  alpha*-*-netware*)
206    targ_defvec=alpha_ecoff_le_vec
207    targ_selvecs=alpha_nlm32_vec
208    want64=true
209    ;;
210  alpha*-*-linux*ecoff*)
211    targ_defvec=alpha_ecoff_le_vec
212    targ_selvecs=alpha_elf64_vec
213    want64=true
214    ;;
215  alpha*-*-linux-* | alpha*-*-elf*)
216    targ_defvec=alpha_elf64_vec
217    targ_selvecs=alpha_ecoff_le_vec
218    want64=true
219    ;;
220  alpha*-*-*vms*)
221    targ_defvec=alpha_vms_vec
222    targ_selvecs=alpha_vms_lib_txt_vec
223    want64=true
224    ;;
225  alpha*-*-*)
226    targ_defvec=alpha_ecoff_le_vec
227    want64=true
228    ;;
229  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
230    targ_defvec=ia64_elf64_le_vec
231    targ_selvecs="ia64_elf64_be_vec ia64_pei_vec"
232    want64=true
233    ;;
234  ia64*-*-hpux*)
235    targ_defvec=ia64_elf32_hpux_be_vec
236    targ_selvecs="ia64_elf64_hpux_be_vec"
237    want64=true
238    ;;
239  ia64*-*-*vms*)
240    targ_defvec=ia64_elf64_vms_vec
241    targ_selvecs=alpha_vms_lib_txt_vec
242    want64=true
243    ;;
244  sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
245    targ_defvec=sparc_elf64_fbsd_vec
246    targ_selvecs="sparc_elf64_vec sparc_elf32_vec sparc_aout_sunos_be_vec"
247    ;;
248  sparc64-*-netbsd* | sparc64-*-openbsd*)
249    targ_defvec=sparc_elf64_vec
250    targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
251    want64=true
252    ;;
253#endif /* BFD64 */
254
255  am34-*-linux* | am33_2.0-*-linux*)
256    targ_defvec=am33_elf32_linux_vec
257    ;;
258
259  arc-*-elf*)
260    targ_defvec=arc_elf32_le_vec
261    targ_selvecs=arc_elf32_be_vec
262    ;;
263
264  arm-*-nacl*)
265    targ_defvec=arm_elf32_nacl_le_vec
266    targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
267    targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
268    targ_archs="$targ_archs bfd_i386_arch"
269    ;;
270  armeb-*-nacl*)
271    targ_defvec=arm_elf32_nacl_be_vec
272    targ_selvecs="arm_elf32_nacl_le_vec i386_elf32_nacl_vec"
273    targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
274    targ_archs="$targ_archs bfd_i386_arch"
275    ;;
276  armeb-*-netbsdelf*)
277    targ_defvec=arm_elf32_be_vec
278    targ_selvecs="arm_elf32_le_vec arm_aout_nbsd_vec"
279    ;;
280  arm-*-netbsdelf*)
281    targ_defvec=arm_elf32_le_vec
282    targ_selvecs="arm_elf32_be_vec arm_aout_nbsd_vec"
283    ;;
284  arm-*-netbsd* | arm-*-openbsd*)
285    targ_defvec=arm_aout_nbsd_vec
286    targ_selvecs="arm_elf32_le_vec arm_elf32_be_vec"
287    targ_underscore=yes
288    ;;
289  arm-*-nto* | nto*arm*)
290    targ_defvec=arm_elf32_le_vec
291    targ_selvecs=arm_elf32_be_vec
292    targ_cflags=-D__QNXTARGET__
293    ;;
294  arm-*-riscix*)
295    targ_defvec=arm_aout_riscix_vec
296    ;;
297  arm-epoc-pe*)
298    targ_defvec=arm_pe_epoc_le_vec
299    targ_selvecs="arm_pe_epoc_le_vec arm_pe_epoc_be_vec arm_pei_epoc_le_vec arm_pei_epoc_be_vec"
300    targ_underscore=no
301    targ_cflags=-DARM_COFF_BUGFIX
302    ;;
303  arm-wince-pe | arm-*-wince | arm*-*-mingw32ce* | arm*-*-cegcc*)
304    targ_defvec=arm_pe_wince_le_vec
305    targ_selvecs="arm_pe_wince_le_vec arm_pe_wince_be_vec arm_pei_wince_le_vec arm_pei_wince_be_vec"
306    targ_underscore=no
307    targ_cflags="-DARM_WINCE -DARM_COFF_BUGFIX"
308    ;;
309  arm-*-pe*)
310    targ_defvec=arm_pe_le_vec
311    targ_selvecs="arm_pe_le_vec arm_pe_be_vec arm_pei_le_vec arm_pei_be_vec"
312    targ_underscore=yes
313    ;;
314  arm-*-aout | armel-*-aout)
315    targ_defvec=arm_aout_le_vec
316    targ_selvecs=arm_aout_be_vec
317    ;;
318  armeb-*-aout)
319    targ_defvec=arm_aout_be_vec
320    targ_selvecs=arm_aout_le_vec
321    ;;
322  arm-*-coff)
323    targ_defvec=arm_coff_le_vec
324    targ_selvecs=arm_coff_be_vec
325    targ_underscore=yes
326    ;;
327  arm-*-rtems*)
328    targ_defvec=arm_elf32_le_vec
329    targ_selvecs=arm_elf32_be_vec
330    ;;
331  armeb-*-elf | arm*b-*-freebsd* | arm*b-*-linux-* | armeb-*-eabi*)
332    targ_defvec=arm_elf32_be_vec
333    targ_selvecs=arm_elf32_le_vec
334    ;;
335  arm-*-kaos*)
336    targ_defvec=arm_elf32_le_vec
337    targ_selvecs=arm_elf32_be_vec
338    ;;
339  arm-*-elf | arm*-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
340  arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
341  arm*-*-eabi* )
342    targ_defvec=arm_elf32_le_vec
343    targ_selvecs=arm_elf32_be_vec
344    ;;
345  arm*-*-vxworks | arm*-*-windiss)
346    targ_defvec=arm_elf32_vxworks_le_vec
347    targ_selvecs=arm_elf32_vxworks_be_vec
348    ;;
349  arm*-*-symbianelf*)
350    targ_defvec=arm_elf32_symbian_le_vec
351    targ_selvecs=arm_elf32_symbian_be_vec
352    ;;
353  arm9e-*-elf)
354    targ_defvec=arm_elf32_le_vec
355    targ_selvecs=arm_elf32_be_vec
356    ;;
357
358  avr-*-*)
359    targ_defvec=avr_elf32_vec
360    ;;
361
362  bfin-*-*)
363    targ_defvec=bfin_elf32_vec
364    targ_selvecs=bfin_elf32_fdpic_vec
365    targ_underscore=yes
366    ;;
367
368  c30-*-*aout* | tic30-*-*aout*)
369    targ_defvec=tic30_aout_vec
370    ;;
371  c30-*-*coff* | tic30-*-*coff*)
372    targ_defvec=tic30_coff_vec
373    ;;
374
375  c4x-*-*coff* | tic4x-*-*coff* | tic4x-*-rtems*)
376    targ_defvec=tic4x_coff1_vec
377    targ_selvecs="tic4x_coff1_beh_vec tic4x_coff2_vec tic4x_coff2_beh_vec tic4x_coff0_vec tic4x_coff0_beh_vec"
378    targ_underscore=yes
379    ;;
380
381  c54x*-*-*coff* | tic54x-*-*coff*)
382    targ_defvec=tic54x_coff1_vec
383    targ_selvecs="tic54x_coff1_beh_vec tic54x_coff2_vec tic54x_coff2_beh_vec tic54x_coff0_vec tic54x_coff0_beh_vec"
384    targ_underscore=yes
385    ;;
386
387  cr16-*-elf* | cr16*-*-uclinux*)
388    targ_defvec=cr16_elf32_vec
389    targ_underscore=yes
390    ;;
391
392  cr16c-*-elf*)
393    targ_defvec=cr16c_elf32_vec
394    targ_underscore=yes
395    ;;
396
397  cris-*-* | crisv32-*-*)
398    targ_defvec=cris_aout_vec
399    targ_selvecs="cris_elf32_us_vec cris_elf32_vec ieee_vec"
400    targ_underscore=yes # Note: not true for cris_elf32_vec.
401    ;;
402
403  crx-*-elf*)
404    targ_defvec=crx_elf32_vec
405    targ_underscore=yes
406    ;;
407
408  d10v-*-*)
409    targ_defvec=d10v_elf32_vec
410    ;;
411
412  dlx-*-elf*)
413    targ_defvec=dlx_elf32_be_vec
414    targ_selvecs="dlx_elf32_be_vec"
415    ;;
416
417  d30v-*-*)
418    targ_defvec=d30v_elf32_vec
419    ;;
420
421  epiphany-*-elf)
422    targ_defvec=epiphany_elf32_vec
423    ;;
424
425  fido-*-elf* )
426    targ_defvec=m68k_elf32_vec
427    targ_selvecs="m68k_coff_vec ieee_vec"
428    ;;
429
430  fr30-*-elf)
431    targ_defvec=fr30_elf32_vec
432    ;;
433
434  frv-*-elf)
435    targ_defvec=frv_elf32_vec
436    targ_selvecs=frv_elf32_fdpic_vec
437    ;;
438
439  frv-*-*linux*)
440    targ_defvec=frv_elf32_fdpic_vec
441    targ_selvecs=frv_elf32_vec
442    ;;
443
444  moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux)
445    targ_defvec=moxie_elf32_be_vec
446    targ_selvecs=moxie_elf32_le_vec
447    ;;
448
449  moxie-*-moxiebox*)
450    targ_defvec=moxie_elf32_le_vec
451    ;;
452
453  h8300*-*-rtemscoff*)
454    targ_defvec=h8300_coff_vec
455    targ_underscore=yes
456    ;;
457
458  h8300*-*-elf | h8300*-*-rtems*)
459    targ_defvec=h8300_elf32_vec
460    targ_underscore=yes
461    ;;
462
463  h8300*-*-*)
464    targ_defvec=h8300_coff_vec
465    targ_underscore=yes
466    ;;
467
468  h8500-*-*)
469    targ_defvec=h8500_coff_vec
470    targ_underscore=yes
471    ;;
472
473#ifdef BFD64
474  hppa*64*-*-linux-*)
475    targ_defvec=hppa_elf64_linux_vec
476    targ_selvecs=hppa_elf64_vec
477    want64=true
478    ;;
479  hppa*64*-*-hpux11*)
480    targ_defvec=hppa_elf64_vec
481    targ_selvecs=hppa_elf64_linux_vec
482    targ_cflags=-DHPUX_LARGE_AR_IDS
483    want64=true
484    ;;
485#endif
486
487  hppa*-*-linux-*)
488    targ_defvec=hppa_elf32_linux_vec
489    targ_selvecs=hppa_elf32_vec
490    ;;
491  hppa*-*-netbsd*)
492    targ_defvec=hppa_elf32_nbsd_vec
493    targ_selvecs="hppa_elf32_vec hppa_elf32_linux_vec"
494    ;;
495  hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-openbsd*)
496    targ_defvec=hppa_elf32_vec
497    targ_selvecs=hppa_elf32_linux_vec
498    ;;
499
500  hppa*-*-bsd*)
501    targ_defvec=hppa_som_vec
502    targ_selvecs=hppa_elf32_vec
503    ;;
504  hppa*-*-hpux* | hppa*-*-hiux* | hppa*-*-mpeix*)
505    targ_defvec=hppa_som_vec
506    ;;
507  hppa*-*-osf*)
508    targ_defvec=hppa_som_vec
509    targ_selvecs=hppa_elf32_vec
510    ;;
511
512  i370-*-*)
513    targ_defvec=i370_elf32_vec
514    targ_selvecs="i370_elf32_vec"
515    ;;
516  i[3-7]86-*-sco3.2v5*coff)
517    targ_defvec=i386_coff_vec
518    targ_selvecs=i386_elf32_vec
519    ;;
520  i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
521  i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \
522  i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*)
523    targ_defvec=i386_elf32_vec
524    targ_selvecs=i386_coff_vec
525    ;;
526  i[3-7]86-*-solaris2*)
527    targ_defvec=i386_elf32_sol2_vec
528    targ_selvecs="i386_coff_vec"
529    targ64_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec"
530    want64=true
531    ;;
532#ifdef BFD64
533  x86_64-*-solaris2*)
534    targ_defvec=i386_elf32_sol2_vec
535    targ_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec i386_coff_vec"
536    want64=true
537    ;;
538#endif
539  i[3-7]86-*-kaos*)
540    targ_defvec=i386_elf32_vec
541    targ_selvecs=i386_elf32_vec
542    ;;
543  i[3-7]86-*-nto*)
544    targ_defvec=i386_elf32_vec
545    targ_selvecs=i386_coff_vec
546    ;;
547  i[3-7]86-*-aros*)
548    targ_defvec=i386_elf32_vec
549    ;;
550  i[3-7]86-*-chorus*)
551    targ_defvec=i386_elf32_vec
552    ;;
553  i[3-7]86-*-dicos*)
554    targ_defvec=i386_elf32_vec
555    targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
556    ;;
557  *-*-msdosdjgpp* | *-*-go32* )
558    targ_defvec=i386_coff_go32_vec
559    targ_selvecs="i386_coff_go32stubbed_vec i386_aout_vec"
560    ;;
561  i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
562  i[3-7]86-*-aix*)
563    targ_defvec=i386_coff_vec
564    ;;
565  i[3-7]86-*-rtems*)
566    targ_defvec=i386_elf32_vec
567    targ_selvecs="i386_coff_vec i386_aout_vec"
568    ;;
569  i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*)
570    targ_defvec=i386_mach_o_vec
571    targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
572    targ64_selvecs=x86_64_mach_o_vec
573    targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
574    ;;
575  i[3-7]86-sequent-bsd*)
576    targ_defvec=i386_aout_dynix_vec
577    targ_underscore=yes
578    ;;
579  i[3-7]86-*-bsd*)
580    targ_defvec=i386_aout_bsd_vec
581    targ_underscore=yes
582    ;;
583  i[3-7]86-*-dragonfly*)
584    targ_defvec=i386_elf32_vec
585    targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
586    ;;
587  i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
588  i[3-7]86-*-freebsd[12])
589    targ_defvec=i386_aout_fbsd_vec
590    targ_selvecs=i386_aout_bsd_vec
591    targ_underscore=yes
592    ;;
593  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
594    targ_defvec=i386_elf32_fbsd_vec
595    targ_selvecs="i386_elf32_vec i386_pei_vec i386_coff_vec"
596    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"
597    # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
598    case "${targ}" in
599      i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*)
600	targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
601    esac
602    ;;
603  i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
604    targ_defvec=i386_elf32_vec
605    targ_selvecs=i386_aout_nbsd_vec
606    targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
607    ;;
608  i[3-7]86-*-netbsdpe*)
609    targ_defvec=i386_pe_vec
610    targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec"
611    ;;
612  i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
613  i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3])
614    targ_defvec=i386_aout_nbsd_vec
615    targ_selvecs="i386_elf32_vec i386_aout_bsd_vec"
616    targ_underscore=yes
617    ;;
618  i[3-7]86-*-openbsd*)
619    targ_defvec=i386_elf32_vec
620    targ_selvecs=i386_aout_nbsd_vec
621    ;;
622  i[3-7]86-*-netware*)
623    targ_defvec=i386_elf32_vec
624    targ_selvecs="i386_nlm32_vec i386_coff_vec i386_aout_vec"
625    ;;
626  i[3-7]86-*-linux*aout*)
627    targ_defvec=i386_aout_linux_vec
628    targ_selvecs=i386_elf32_vec
629    targ_underscore=yes
630    ;;
631  i[3-7]86-*-linux-*)
632    targ_defvec=i386_elf32_vec
633    targ_selvecs="i386_aout_linux_vec i386_pei_vec"
634    targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
635    ;;
636  i[3-7]86-*-nacl*)
637    targ_defvec=i386_elf32_nacl_vec
638    targ_selvecs="arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
639    targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec"
640    targ_archs="$targ_archs bfd_arm_arch"
641    ;;
642#ifdef BFD64
643  x86_64-*-darwin*)
644    targ_defvec=x86_64_mach_o_vec
645    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"
646    targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
647    want64=true
648    ;;
649  x86_64-*-dicos*)
650    targ_defvec=x86_64_elf64_vec
651    targ_selvecs="i386_elf32_vec l1om_elf64_vec k1om_elf64_vec"
652    want64=true
653    ;;
654  x86_64-*-elf*)
655    targ_defvec=x86_64_elf64_vec
656    targ_selvecs="i386_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec"
657    want64=true
658    ;;
659  x86_64-*-dragonfly*)
660    targ_defvec=x86_64_elf64_vec
661    targ_selvecs="i386_elf32_vec l1om_elf64_vec k1om_elf64_vec"
662    want64=true
663    ;;
664  x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
665    targ_defvec=x86_64_elf64_fbsd_vec
666    targ_selvecs="i386_elf32_fbsd_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"
667    want64=true
668    ;;
669  x86_64-*-netbsd* | x86_64-*-openbsd*)
670    targ_defvec=x86_64_elf64_vec
671    targ_selvecs="i386_elf32_vec i386_aout_nbsd_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
672    want64=true
673    ;;
674  x86_64-*-linux-*)
675    targ_defvec=x86_64_elf64_vec
676    targ_selvecs="i386_elf32_vec x86_64_elf32_vec i386_aout_linux_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
677    want64=true
678    ;;
679  x86_64-*-nacl*)
680    targ_defvec=x86_64_elf32_nacl_vec
681    targ_selvecs="i386_elf32_nacl_vec x86_64_elf64_nacl_vec arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
682    targ_archs="$targ_archs bfd_arm_arch"
683    want64=true
684    ;;
685  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
686    targ_defvec=x86_64_pe_vec
687    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"
688    want64=true
689    targ_underscore=no
690    ;;
691  x86_64-*-rdos*)
692    targ_defvec=x86_64_elf64_vec
693    want64=true
694    ;;
695#endif
696  i[3-7]86-*-lynxos*)
697    targ_defvec=i386_elf32_vec
698    targ_selvecs="i386_coff_lynx_vec i386_aout_lynx_vec"
699    ;;
700  i[3-7]86-*-gnu*)
701    targ_defvec=i386_elf32_vec
702    ;;
703  i[3-7]86-*-mach* | i[3-7]86-*-osf1mk*)
704    targ_defvec=i386_aout_mach3_vec
705    targ_cflags=-DSTAT_FOR_EXEC
706    targ_underscore=yes
707    ;;
708  i[3-7]86-*-os9k)
709    targ_defvec=i386_aout_os9k_vec
710    ;;
711  i[3-7]86-*-msdos*)
712    targ_defvec=i386_aout_vec
713    targ_selvecs=i386_msdos_vec
714    ;;
715  i[3-7]86-*-moss*)
716    targ_defvec=i386_elf32_vec
717    targ_selvecs="i386_msdos_vec i386_aout_vec"
718    ;;
719  i[3-7]86-*-beospe*)
720    targ_defvec=i386_pe_vec
721    targ_selvecs="i386_pe_vec i386_pei_vec"
722    ;;
723  i[3-7]86-*-beoself* | i[3-7]86-*-beos*)
724    targ_defvec=i386_elf32_vec
725    targ_selvecs="i386_pe_vec i386_pei_vec"
726    ;;
727  i[3-7]86-*-interix*)
728    targ_defvec=i386_pei_vec
729    targ_selvecs="i386_pe_vec"
730    # FIXME: This should eventually be checked at runtime.
731    targ_cflags=-DSTRICT_PE_FORMAT
732    ;;
733  i[3-7]86-*-rdos*)
734    targ_defvec=i386_elf32_vec
735    targ_selvecs=i386_coff_vec
736    ;;
737  i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
738    targ_defvec=i386_pe_vec
739    targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec"
740    targ_underscore=yes
741    ;;
742  i[3-7]86-none-*)
743    targ_defvec=i386_coff_vec
744    ;;
745  i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
746    targ_defvec=i386_aout_vec
747    ;;
748  i[3-7]86-*-vxworks*)
749    targ_defvec=i386_elf32_vxworks_vec
750    targ_underscore=yes
751    ;;
752  i[3-7]86-*-chaos)
753    targ_defvec=i386_elf32_vec
754    targ_selfvecs=i386chaos_vec
755    ;;
756
757  i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
758    targ_defvec=i860_coff_vec
759    ;;
760  i860-stardent-sysv4* | i860-stardent-elf*)
761    targ_defvec=i860_elf32_le_vec
762    targ_selvecs="i860_elf32_vec i860_elf32_le_vec"
763    ;;
764  i860-*-sysv4* | i860-*-elf*)
765    targ_defvec=i860_elf32_vec
766    ;;
767
768  i960-*-vxworks4* | i960-*-vxworks5.0)
769    targ_defvec=bout_le_vec
770    targ_selvecs="bout_be_vec icoff_le_vec icoff_be_vec ieee_vec"
771    targ_underscore=yes
772    ;;
773  i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv*)
774    targ_defvec=icoff_le_vec
775    targ_selvecs="icoff_be_vec bout_le_vec bout_be_vec ieee_vec"
776    targ_underscore=yes
777    ;;
778  i960-*-vxworks* | i960-*-aout* | i960-*-bout* | i960-*-nindy*)
779    targ_defvec=bout_le_vec
780    targ_selvecs="bout_be_vec icoff_le_vec icoff_be_vec ieee_vec"
781    targ_underscore=yes
782    ;;
783  i960-*-elf*)
784    targ_defvec=i960_elf32_vec
785    targ_selvecs="icoff_le_vec icoff_be_vec"
786    ;;
787
788  ip2k-*-elf)
789    targ_defvec=ip2k_elf32_vec
790    ;;
791
792  iq2000-*-elf)
793    targ_defvec=iq2000_elf32_vec
794    ;;
795
796  lm32-*-elf | lm32-*-rtems*)
797    targ_defvec=lm32_elf32_vec
798    targ_selvecs=lm32_elf32_fdpic_vec
799    ;;
800
801  lm32-*-*linux*)
802    targ_defvec=lm32_elf32_fdpic_vec
803    targ_selvecs=lm32_elf32_vec
804    ;;
805
806  m32c-*-elf | m32c-*-rtems*)
807    targ_defvec=m32c_elf32_vec
808    ;;
809
810  m32r*le-*-linux*)
811    targ_defvec=m32r_elf32_linux_le_vec
812    targ_selvecs="m32r_elf32_linux_vec  m32r_elf32_linux_le_vec"
813    ;;
814  m32r*-*-linux*)
815    targ_defvec=m32r_elf32_linux_vec
816    targ_selvecs="m32r_elf32_linux_vec  m32r_elf32_linux_le_vec"
817    ;;
818  m32r*le-*-*)
819    targ_defvec=m32r_elf32_le_vec
820    targ_selvecs="m32r_elf32_vec m32r_elf32_le_vec"
821    ;;
822  m32r-*-*)
823    targ_defvec=m32r_elf32_vec
824    ;;
825
826  m68hc11-*-* | m6811-*-*)
827    targ_defvec=m68hc11_elf32_vec
828    targ_selvecs="m68hc11_elf32_vec m68hc12_elf32_vec"
829    ;;
830  m68hc12-*-* | m6812-*-*)
831    targ_defvec=m68hc12_elf32_vec
832    targ_selvecs="m68hc11_elf32_vec m68hc12_elf32_vec"
833    ;;
834
835  m68*-motorola-sysv*)
836    targ_defvec=m68k_coff_sysv_vec
837    ;;
838  m68*-hp-bsd*)
839    targ_defvec=m68k_aout_hp300bsd_vec
840    targ_underscore=yes
841    ;;
842  m68*-*-aout*)
843    targ_defvec=aout0_be_vec
844    # We include core_cisco_be_vec here, rather than making a separate cisco
845    # configuration, so that cisco-core.c gets routinely tested at
846    # least for compilation.
847    targ_selvecs="core_cisco_be_vec ieee_vec"
848    targ_underscore=yes
849    ;;
850  m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux*)
851    targ_defvec=m68k_elf32_vec
852    targ_selvecs="m68k_coff_vec ieee_vec"
853    ;;
854  m68*-*-rtems*)
855    targ_defvec=m68k_elf32_vec
856    targ_selvecs="m68k_coff_vec m68k_versados_vec ieee_vec aout0_be_vec"
857    ;;
858  m68*-*-coff* | m68*-*-sysv*)
859    targ_defvec=m68k_coff_vec
860    targ_selvecs="m68k_coff_vec m68k_versados_vec ieee_vec"
861    ;;
862  m68*-*-hpux*)
863    targ_defvec=m68k_aout_hp300hpux_vec
864    targ_underscore=yes
865    ;;
866  m68*-*-linux*aout*)
867    targ_defvec=m68k_aout_linux_vec
868    targ_selvecs=m68k_elf32_vec
869    targ_underscore=yes
870    ;;
871  m68*-*-linux-*)
872    targ_defvec=m68k_elf32_vec
873    targ_selvecs=m68k_aout_linux_vec
874    ;;
875  m68*-*-gnu*)
876    targ_defvec=m68k_elf32_vec
877    # targ_selvecs=m68kmach3_vec
878    # targ_cflags=-DSTAT_FOR_EXEC
879    ;;
880  m68*-hp*-netbsd*)
881    targ_defvec=m68k_aout_4knbsd_vec
882    targ_selvecs="m68k_aout_nbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
883    targ_underscore=yes
884    ;;
885  m68*-*-netbsdelf*)
886    targ_defvec=m68k_elf32_vec
887    targ_selvecs="m68k_aout_nbsd_vec m68k_aout_4knbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
888    ;;
889  m68*-*-netbsdaout* | m68*-*-netbsd*)
890    targ_defvec=m68k_aout_nbsd_vec
891    targ_selvecs="m68k_aout_4knbsd_vec m68k_elf32_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
892    targ_underscore=yes
893    ;;
894  m68*-*-openbsd*)
895    targ_defvec=m68k_aout_nbsd_vec
896    targ_selvecs="m68k_aout_4knbsd_vec m68k_aout_hp300bsd_vec sparc_aout_sunos_be_vec"
897    targ_underscore=yes
898    ;;
899  m68*-*-sunos* | m68*-*-os68k* | m68*-*-vxworks* | m68*-netx-* | \
900  m68*-*-bsd* | m68*-*-vsta*)
901    targ_defvec=sparc_aout_sunos_be_vec
902    targ_underscore=yes
903    ;;
904  m68*-ericsson-*)
905    targ_defvec=sparc_aout_sunos_be_vec
906    targ_selvecs="m68k_coff_vec m68k_versados_vec tekhex_vec"
907    targ_underscore=yes
908    ;;
909  m68*-cbm-*)
910    targ_defvec=m68k_elf32_vec
911    targ_selvecs=m68k_coff_vec
912    ;;
913  m68*-*-psos*)
914    targ_defvec=m68k_elf32_vec
915    targ_selvecs=ieee_vec
916    targ_underscore=yes
917    ;;
918
919  m88*-harris-cxux* | m88*-*-dgux* | m88*-*-sysv4*)
920    targ_defvec=m88k_elf32_vec
921    targ_selvecs=m88k_coff_bcs_vec
922    ;;
923  m88*-*-mach3*)
924    targ_defvec=m88k_aout_mach3_vec
925    targ_cflags=-DSTAT_FOR_EXEC
926    ;;
927  m88*-*-openbsd*)
928   targ_defvec=m88k_aout_obsd_vec
929   targ_underscore=yes
930   ;;
931  m88*-*-*)
932    targ_defvec=m88k_coff_bcs_vec
933    targ_underscore=yes
934    ;;
935
936  mcore-*-elf)
937    targ_defvec=mcore_elf32_be_vec
938    targ_selvecs="mcore_elf32_be_vec mcore_elf32_le_vec"
939    ;;
940  mcore-*-pe)
941    targ_defvec=mcore_pe_be_vec
942    targ_selvecs="mcore_pe_be_vec mcore_pe_le_vec mcore_pei_be_vec mcore_pei_le_vec"
943    ;;
944
945  mep-*-elf)
946    targ_defvec=mep_elf32_vec
947    targ_selvecs=mep_elf32_le_vec
948    ;;
949
950  metag-*-*)
951    targ_defvec=metag_elf32_vec
952    targ_underscore=yes
953    ;;
954
955  microblazeel*-*)
956    targ_defvec=microblaze_elf32_le_vec
957    targ_selvecs=microblaze_elf32_vec
958    ;;
959
960  microblaze*-*)
961    targ_defvec=microblaze_elf32_vec
962    targ_selvecs=microblaze_elf32_le_vec
963    ;;
964
965  mips*-big-*)
966    targ_defvec=mips_ecoff_be_vec
967    targ_selvecs=mips_ecoff_le_vec
968    ;;
969#ifdef BFD64
970  mips*el-*-netbsd*)
971    targ_defvec=mips_elf32_trad_le_vec
972    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"
973    ;;
974  mips*-*-netbsd*)
975    targ_defvec=mips_elf32_trad_be_vec
976    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"
977    ;;
978#endif
979  mips*-dec-* | mips*el-*-ecoff*)
980    targ_defvec=mips_ecoff_le_vec
981    targ_selvecs=mips_ecoff_be_vec
982    ;;
983  mips*-*-ecoff*)
984    targ_defvec=mips_ecoff_be_vec
985    targ_selvecs=mips_ecoff_le_vec
986    ;;
987#ifdef BFD64
988  mips*-*-irix6*)
989    targ_defvec=mips_elf32_n_be_vec
990    targ_selvecs="mips_elf32_n_le_vec mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
991    ;;
992  mips64*-ps2-elf*)
993    targ_defvec=mips_elf32_n_le_vec
994    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"
995    ;;
996  mips*-ps2-elf*)
997    targ_defvec=mips_elf32_le_vec
998    targ_selvecs="mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
999    ;;
1000  mips*-*-irix5*)
1001    targ_defvec=mips_elf32_be_vec
1002    targ_selvecs="mips_elf32_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1003    ;;
1004#endif
1005  mips*-sgi-* | mips*-*-bsd*)
1006    targ_defvec=mips_ecoff_be_vec
1007    targ_selvecs=mips_ecoff_le_vec
1008    ;;
1009  mips*-*-lnews*)
1010    targ_defvec=mips_ecoff_bele_vec
1011    targ_selvecs="mips_ecoff_le_vec mips_ecoff_be_vec"
1012    ;;
1013#ifdef BFD64
1014  mips*-*-sysv4*)
1015    targ_defvec=mips_elf32_trad_be_vec
1016    targ_selvecs="mips_elf32_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1017    ;;
1018#endif
1019  mips*-*-sysv* | mips*-*-riscos*)
1020    targ_defvec=mips_ecoff_be_vec
1021    targ_selvecs=mips_ecoff_le_vec
1022    ;;
1023#ifdef BFD64
1024  mips*el-*-vxworks*)
1025    targ_defvec=mips_elf32_vxworks_le_vec
1026    targ_selvecs="mips_elf32_le_vec mips_elf32_vxworks_be_vec mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1027    ;;
1028  mips*-*-vxworks*)
1029    targ_defvec=mips_elf32_vxworks_be_vec
1030    targ_selvecs="mips_elf32_be_vec mips_elf32_vxworks_le_vec mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1031    ;;
1032  mips*el-sde-elf*)
1033    targ_defvec=mips_elf32_trad_le_vec
1034    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"
1035    ;;
1036  mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
1037    targ_defvec=mips_elf32_trad_be_vec
1038    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"
1039    ;;
1040  mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
1041    targ_defvec=mips_elf32_le_vec
1042    targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
1043    ;;
1044  mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
1045    targ_defvec=mips_elf32_be_vec
1046    targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1047    ;;
1048  mips*-*-none)
1049    targ_defvec=mips_elf32_be_vec
1050    targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
1051    ;;
1052  mips64*-*-openbsd*)
1053    targ_defvec=mips_elf64_trad_be_vec
1054    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"
1055    ;;
1056  mips*el-*-openbsd*)
1057    targ_defvec=mips_elf32_le_vec
1058    targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
1059    ;;
1060  mips*-*-openbsd*)
1061    targ_defvec=mips_elf32_be_vec
1062    targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
1063    ;;
1064  mips64*el-*-linux*)
1065    targ_defvec=mips_elf32_ntrad_le_vec
1066    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"
1067    ;;
1068  mips64*-*-linux*)
1069    targ_defvec=mips_elf32_ntrad_be_vec
1070    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"
1071    ;;
1072  mips*el-*-linux*)
1073    targ_defvec=mips_elf32_trad_le_vec
1074    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"
1075    ;;
1076  mips*-*-linux*)
1077    targ_defvec=mips_elf32_trad_be_vec
1078    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"
1079    ;;
1080  mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
1081    # FreeBSD vectors
1082    targ_defvec=mips_elf32_ntradfbsd_le_vec
1083    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"
1084    # Generic vectors
1085    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"
1086    ;;
1087  mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
1088    # FreeBSD vectors
1089    targ_defvec=mips_elf32_ntradfbsd_be_vec
1090    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"
1091    # Generic vectors
1092    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"
1093    ;;
1094  mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
1095    # FreeBSD vectors
1096    targ_defvec=mips_elf32_tradfbsd_le_vec
1097    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"
1098    # Generic vectors
1099    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"
1100    ;;
1101  mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
1102    # FreeBSD vectors
1103    targ_defvec=mips_elf32_tradfbsd_be_vec
1104    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"
1105    # Generic vectors
1106    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"
1107    ;;
1108  mmix-*-*)
1109    targ_defvec=mmix_elf64_vec
1110    targ_selvecs=mmix_mmo_vec
1111    want64=true
1112    ;;
1113#endif
1114  mn10200-*-*)
1115    targ_defvec=mn10200_elf32_vec
1116    ;;
1117
1118  mn10300-*-*)
1119    targ_defvec=mn10300_elf32_vec
1120    targ_underscore=yes
1121    ;;
1122
1123  mt-*-elf)
1124    targ_defvec=mt_elf32_vec
1125    ;;
1126
1127  msp430-*-*)
1128    targ_defvec=msp430_elf32_vec
1129    targ_selvecs=msp430_elf32_ti_vec
1130    ;;
1131
1132  nds32*le-*-linux*)
1133    targ_defvec=nds32_elf32_linux_le_vec
1134    targ_selvecs=nds32_elf32_linux_be_vec
1135    ;;
1136
1137  nds32*be-*-linux*)
1138    targ_defvec=nds32_elf32_linux_be_vec
1139    targ_selvecs=nds32_elf32_linux_le_vec
1140    ;;
1141
1142  nds32*le-*-*)
1143    targ_defvec=nds32_elf32_le_vec
1144    targ_selvecs=nds32_elf32_be_vec
1145    ;;
1146
1147  nds32*be-*-*)
1148    targ_defvec=nds32_elf32_be_vec
1149    targ_selvecs=nds32_elf32_le_vec
1150    ;;
1151
1152  ns32k-pc532-mach* | ns32k-pc532-ux*)
1153    targ_defvec=ns32k_aout_pc532mach_vec
1154    targ_underscore=yes
1155    ;;
1156  ns32k-*-netbsd* | ns32k-*-lites* | ns32k-*-openbsd*)
1157    targ_defvec=ns32k_aout_pc532nbsd_vec
1158    targ_underscore=yes
1159    ;;
1160
1161  nios2eb-*-*)
1162    targ_defvec=nios2_elf32_be_vec
1163    targ_selvecs=nios2_elf32_le_vec
1164    ;;
1165
1166  nios2el-*-*)
1167    targ_defvec=nios2_elf32_le_vec
1168    targ_selvecs=nios2_elf32_be_vec
1169    ;;
1170
1171  nios2-*-*)
1172    targ_defvec=nios2_elf32_le_vec
1173    targ_selvecs=nios2_elf32_be_vec
1174    ;;
1175
1176  or1k-*-elf | or1k-*-linux* | or1k-*-rtems*)
1177    targ_defvec=or1k_elf32_vec
1178    ;;
1179
1180  or1knd-*-elf | or1knd-*-linux* | or1knd-*-rtems*)
1181    targ_defvec=or1k_elf32_vec
1182    ;;
1183
1184  pdp11-*-*)
1185    targ_defvec=pdp11_aout_vec
1186    targ_underscore=yes
1187    ;;
1188
1189  pj-*-*)
1190    targ_defvec=pj_elf32_vec
1191    targ_selvecs="pj_elf32_vec pj_elf32_le_vec"
1192    ;;
1193
1194  pjl-*-*)
1195    targ_defvec=pj_elf32_le_vec
1196    targ_selvecs="pj_elf32_le_vec pj_elf32_vec i386_elf32_vec"
1197    ;;
1198
1199  powerpc-*-aix5.[01] | rs6000-*-aix5.[01])
1200    targ_defvec=rs6000_xcoff_vec
1201    targ_selvecs="rs6000_xcoff64_aix_vec"
1202    want64=true
1203    ;;
1204#ifdef BFD64
1205  powerpc64-*-aix5.[01] | rs6000-*-aix5.[01])
1206    targ_defvec=rs6000_xcoff64_aix_vec
1207    targ_selvecs="rs6000_xcoff_vec"
1208    want64=true
1209    ;;
1210#endif
1211  powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*)
1212    targ_cflags=-DAIX_WEAK_SUPPORT
1213    targ_defvec=rs6000_xcoff_vec
1214    targ_selvecs="rs6000_xcoff64_aix_vec"
1215    want64=true
1216    ;;
1217#ifdef BFD64
1218  powerpc64-*-aix[5-9]* | rs6000-*-aix[5-9]*)
1219    targ_cflags=-DAIX_WEAK_SUPPORT
1220    targ_defvec=rs6000_xcoff64_aix_vec
1221    targ_selvecs="rs6000_xcoff_vec"
1222    want64=true
1223    ;;
1224#endif
1225
1226  powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*)
1227    targ_defvec=rs6000_xcoff_vec
1228    targ64_selvecs=rs6000_xcoff64_vec
1229    case "${targ}" in
1230	*-*-aix4.[3456789]* | *-*-aix[56789]*)
1231	want64=true;;
1232	*)
1233	targ_cflags=-DSMALL_ARCHIVE;;
1234    esac
1235    ;;
1236#ifdef BFD64
1237  powerpc64-*-aix*)
1238    targ_defvec=rs6000_xcoff64_vec
1239    targ_selvecs=rs6000_xcoff_vec
1240    want64=true
1241    ;;
1242  powerpc64-*-freebsd*)
1243    targ_defvec=powerpc_elf64_fbsd_vec
1244    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"
1245    want64=true
1246    ;;
1247  powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
1248  powerpc64-*-*bsd*)
1249    targ_defvec=powerpc_elf64_vec
1250    targ_selvecs="powerpc_elf64_le_vec powerpc_elf32_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
1251    want64=true
1252    ;;
1253  powerpc64le-*-elf* | powerpcle-*-elf64* | powerpc64le-*-linux* | \
1254  powerpc64le-*-*bsd*)
1255    targ_defvec=powerpc_elf64_le_vec
1256    targ_selvecs="powerpc_elf64_vec powerpc_elf32_le_vec powerpc_elf32_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
1257    want64=true
1258    ;;
1259#endif
1260  powerpc-*-*freebsd*)
1261    targ_defvec=powerpc_elf32_fbsd_vec
1262    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_elf32_le_vec powerpc_boot_vec"
1263    targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec powerpc_elf64_fbsd_vec"
1264    ;;
1265  powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
1266  powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
1267  powerpc-*-chorus*)
1268    targ_defvec=powerpc_elf32_vec
1269    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
1270    targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1271    ;;
1272  powerpc-*-kaos*)
1273    targ_defvec=powerpc_elf32_vec
1274    targ_selvecs="powerpc_elf32_le_vec powerpc_boot_vec"
1275    targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1276    ;;
1277  powerpc-*-darwin* | powerpc-*-macos10* | powerpc-*-rhapsody*)
1278    targ_defvec=mach_o_be_vec
1279    targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
1280    targ_archs="$targ_archs bfd_i386_arch"
1281    ;;
1282  powerpc-*-macos*)
1283    targ_defvec=powerpc_xcoff_vec
1284    ;;
1285  powerpc-*-lynxos*)
1286    targ_defvec=powerpc_elf32_vec
1287    targ_selvecs="rs6000_xcoff_vec"
1288    targ_cflags=-DSMALL_ARCHIVE
1289    ;;
1290  powerpc-*-netware*)
1291    targ_defvec=powerpc_elf32_vec
1292    targ_selvecs="powerpc_nlm32_vec rs6000_xcoff_vec"
1293    ;;
1294  powerpc-*-nto*)
1295    targ_defvec=powerpc_elf32_vec
1296    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
1297    ;;
1298  powerpc-*-vxworks* | powerpc-*-windiss*)
1299    targ_defvec=powerpc_elf32_vxworks_vec
1300    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_elf32_le_vec powerpc_boot_vec"
1301    targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1302    ;;
1303  powerpcle-*-nto*)
1304    targ_defvec=powerpc_elf32_le_vec
1305    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_boot_vec"
1306    ;;
1307  powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
1308  powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks*)
1309    targ_defvec=powerpc_elf32_le_vec
1310    targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_boot_vec"
1311    targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
1312    ;;
1313  powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
1314    targ_defvec=powerpc_pe_le_vec
1315    targ_selvecs="powerpc_pei_le_vec powerpc_pei_vec powerpc_pe_le_vec powerpc_pe_vec"
1316    ;;
1317
1318  rl78-*-elf)
1319    targ_defvec=rl78_elf32_vec
1320    ;;
1321
1322  rx-*-elf)
1323    targ_defvec=rx_elf32_le_vec
1324    targ_selvecs="rx_elf32_be_vec rx_elf32_le_vec rx_elf32_be_ns_vec"
1325    ;;
1326
1327  s390-*-linux*)
1328    targ_defvec=s390_elf32_vec
1329    targ64_selvecs=s390_elf64_vec
1330    want64=true
1331    ;;
1332#ifdef BFD64
1333  s390x-*-linux*)
1334    targ_defvec=s390_elf64_vec
1335    targ_selvecs=s390_elf32_vec
1336    want64=true
1337    ;;
1338  s390x-*-tpf*)
1339    targ_defvec=s390_elf64_vec
1340    want64=true
1341    ;;
1342
1343  score*-*-elf*)
1344    targ_defvec=score_elf32_be_vec
1345    targ_selvecs=score_elf32_le_vec
1346    ;;
1347
1348  sh64l*-*-elf*)
1349    targ_defvec=sh64_elf32_le_vec
1350    targ_selvecs="sh64_elf32_vec sh64_elf64_le_vec sh64_elf64_vec sh_elf32_le_vec sh_elf32_vec"
1351    targ_underscore=yes
1352    want64=true
1353    ;;
1354  sh64-*-elf*)
1355    targ_defvec=sh64_elf32_vec
1356    targ_selvecs="sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec sh_elf32_vec sh_elf32_le_vec"
1357    targ_underscore=yes
1358    want64=true
1359    ;;
1360  sh64eb-*-linux*)
1361    targ_defvec=sh64_elf32_linux_be_vec
1362    targ_selvecs="sh64_elf32_linux_vec sh64_elf64_linux_be_vec sh64_elf64_linux_vec sh_elf32_linux_be_vec sh_elf32_linux_vec"
1363    want64=true
1364    ;;
1365  sh64-*-linux*)
1366    targ_defvec=sh64_elf32_linux_vec
1367    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"
1368    want64=true
1369    ;;
1370  sh-*-linux*)
1371    targ_defvec=sh_elf32_linux_be_vec
1372    targ_selvecs="sh_elf32_linux_vec sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
1373    want64=true
1374    ;;
1375#endif /* BFD64 */
1376
1377  sh*eb-*-linux*)
1378    targ_defvec=sh_elf32_linux_be_vec
1379    targ_selvecs=sh_elf32_linux_vec
1380    ;;
1381  sh*-*-linux*)
1382    targ_defvec=sh_elf32_linux_vec
1383    targ_selvecs=sh_elf32_linux_be_vec
1384    ;;
1385
1386  sh-*-uclinux* | sh[12]-*-uclinux*)
1387    targ_defvec=sh_elf32_vec
1388    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"
1389#ifdef BFD64
1390    targ_selvecs="${targ_selvecs} sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
1391#endif
1392    ;;
1393
1394#ifdef BFD64
1395  sh5le-*-netbsd*)
1396    targ_defvec=sh64_elf32_nbsd_le_vec
1397    targ_selvecs="sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1398    want64=true
1399    ;;
1400  sh5-*-netbsd*)
1401    targ_defvec=sh64_elf32_nbsd_vec
1402    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"
1403    want64=true
1404    ;;
1405
1406  sh64le-*-netbsd*)
1407    targ_defvec=sh64_elf64_nbsd_le_vec
1408    targ_selvecs="sh64_elf64_nbsd_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
1409    want64=true
1410    ;;
1411  sh64-*-netbsd*)
1412    targ_defvec=sh64_elf64_nbsd_vec
1413    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"
1414    want64=true
1415    ;;
1416
1417  sh*l*-*-netbsdelf*)
1418    targ_defvec=sh_elf32_nbsd_le_vec
1419    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"
1420    want64=true
1421    ;;
1422  sh-*-netbsdelf*)
1423    targ_defvec=sh_elf32_nbsd_vec
1424    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"
1425    want64=true
1426    ;;
1427#endif
1428
1429  sh*-*-netbsdelf*)
1430    targ_defvec=sh_elf32_nbsd_vec
1431    targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec"
1432    ;;
1433  sh*-*-symbianelf*)
1434    targ_defvec=sh_elf32_symbian_le_vec
1435    targ_selvecs="sh_coff_le_vec sh_coff_small_le_vec"
1436    targ_underscore=yes
1437    ;;
1438
1439#ifdef BFD64
1440  shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
1441    targ_defvec=sh_elf32_le_vec
1442    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"
1443    targ_underscore=yes
1444    want64=true
1445    ;;
1446#endif
1447
1448  sh-*-rtemscoff*)
1449    targ_defvec=sh_coff_vec
1450    targ_selvecs="sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1451    targ_underscore=yes
1452    ;;
1453
1454#ifdef BFD64
1455  sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*)
1456    targ_defvec=sh_elf32_vec
1457    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"
1458    targ_underscore=yes
1459    want64=true
1460    ;;
1461#endif
1462
1463  sh-*-nto*)
1464    targ_defvec=sh_elf32_vec
1465    targ_selvecs="sh_elf32_le_vec sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1466    targ_underscore=yes
1467    ;;
1468  sh*-*-openbsd*)
1469    targ_defvec=sh_elf32_nbsd_le_vec
1470    targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec"
1471    ;;
1472  sh-*-pe)
1473    targ_defvec=sh_pe_le_vec
1474    targ_selvecs="sh_pe_le_vec sh_pei_le_vec"
1475    targ_underscore=yes
1476    ;;
1477  sh-*-vxworks)
1478    targ_defvec=sh_elf32_vxworks_vec
1479    targ_selvecs="sh_elf32_vxworks_le_vec"
1480    # FIXME None of the following are actually used on this target, but
1481    # they're necessary for coff-sh.c (which is unconditionally used) to be
1482    # compiled correctly.
1483    targ_selvecs="$targ_selvecs sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1484    targ_underscore=yes
1485    ;;
1486  sh-*-*)
1487    targ_defvec=sh_coff_vec
1488    targ_selvecs="sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
1489    targ_underscore=yes
1490    ;;
1491
1492  sparclet-*-aout*)
1493    targ_defvec=sparc_aout_sunos_be_vec
1494    targ_selvecs=sparc_aout_le_vec
1495    targ_underscore=yes
1496    ;;
1497  sparc86x-*-aout*)
1498    targ_defvec=sparc_aout_sunos_be_vec
1499    targ_underscore=yes
1500    ;;
1501  sparclite-*-elf* | sparc86x-*-elf*)
1502    targ_defvec=sparc_elf32_vec
1503    ;;
1504  sparc*-*-chorus*)
1505    targ_defvec=sparc_elf32_vec
1506    ;;
1507  sparc-*-linux*aout*)
1508    targ_defvec=sparc_aout_linux_vec
1509    targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
1510    targ_underscore=yes
1511    ;;
1512  sparc-*-linux-* | sparcv*-*-linux-*)
1513    targ_defvec=sparc_elf32_vec
1514    targ_selvecs="sparc_aout_linux_vec sparc_elf64_vec sparc_aout_sunos_be_vec"
1515    ;;
1516  sparc-*-netbsdelf*)
1517    targ_defvec=sparc_elf32_vec
1518    targ_selvecs=sparc_aout_nbsd_vec
1519    ;;
1520  sparc-*-netbsdaout* | sparc-*-netbsd*)
1521    targ_defvec=sparc_aout_nbsd_vec
1522    targ_selvecs=sparc_elf32_vec
1523    targ_underscore=yes
1524    ;;
1525  sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
1526    targ_defvec=sparc_aout_nbsd_vec
1527    targ_underscore=yes
1528    ;;
1529  sparc-*-openbsd*)
1530    targ_defvec=sparc_elf32_vec
1531    targ_selvecs=sparc_aout_nbsd_vec
1532    ;;
1533  sparc-*-elf*)
1534    targ_defvec=sparc_elf32_vec
1535    targ_selvecs=sparc_aout_sunos_be_vec
1536    ;;
1537  sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1538    targ_defvec=sparc_elf32_sol2_vec
1539    targ_selvecs=sparc_aout_sunos_be_vec
1540    ;;
1541#ifdef BFD64
1542  sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
1543    targ_defvec=sparc_elf32_sol2_vec
1544    targ_selvecs="sparc_elf64_sol2_vec sparc_aout_sunos_be_vec"
1545    want64=true
1546    ;;
1547#endif
1548  sparc-*-sysv4*)
1549    targ_defvec=sparc_elf32_vec
1550    ;;
1551  sparc-*-vxworks*)
1552    targ_defvec=sparc_elf32_vxworks_vec
1553    targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
1554    ;;
1555  sparc-*-netware*)
1556    targ_defvec=sparc_elf32_vec
1557    targ_selvecs="sparc_nlm32_vec sparc_aout_sunos_be_vec"
1558    ;;
1559#ifdef BFD64
1560  sparc64-*-aout*)
1561    targ_defvec=sparc_aout_sunos_be_vec
1562    targ_underscore=yes
1563    want64=true
1564    ;;
1565  sparc64*-*-linux-*)
1566    targ_defvec=sparc_elf64_vec
1567    targ_selvecs="sparc_elf32_vec sparc_aout_linux_vec sparc_aout_sunos_be_vec"
1568    want64=true
1569    ;;
1570  sparc64-*-elf* | sparc64-*-rtems* )
1571    targ_defvec=sparc_elf64_vec
1572    targ_selvecs=sparc_elf32_vec
1573    want64=true
1574    ;;
1575#endif /* BFD64 */
1576  sparc*-*-coff*)
1577    targ_defvec=sparc_coff_vec
1578    ;;
1579  sparc-*-rtems*)
1580    targ_defvec=sparc_elf32_vec
1581    targ_selvecs="sparc_aout_sunos_be_vec sparc_coff_vec"
1582    ;;
1583  sparc*-*-*)
1584    targ_defvec=sparc_aout_sunos_be_vec
1585    targ_underscore=yes
1586    ;;
1587
1588  spu-*-elf)
1589    targ_defvec=spu_elf32_vec
1590    want64=true
1591    ;;
1592
1593#if HAVE_aout_vec
1594  tahoe-*-*)
1595    targ_defvec=aout_vec
1596    targ_underscore=yes
1597    ;;
1598#endif
1599
1600  tic6x-*-elf)
1601    targ_defvec=tic6x_elf32_c6000_le_vec
1602    targ_selvecs="tic6x_elf32_c6000_be_vec tic6x_elf32_le_vec tic6x_elf32_be_vec"
1603    ;;
1604
1605  tic6x-*-uclinux)
1606    targ_defvec=tic6x_elf32_linux_le_vec
1607    targ_selvecs="tic6x_elf32_linux_be_vec tic6x_elf32_le_vec tic6x_elf32_be_vec"
1608    ;;
1609
1610  tic80*-*-*)
1611    targ_defvec=tic80_coff_vec
1612    targ_underscore=yes
1613    ;;
1614
1615#ifdef BFD64
1616  tilegx-*-*)
1617    targ_defvec=tilegx_elf64_le_vec
1618    targ_selvecs="tilegx_elf64_be_vec tilegx_elf32_be_vec tilegx_elf32_le_vec"
1619    ;;
1620  tilegxbe-*-*)
1621    targ_defvec=tilegx_elf64_be_vec
1622    targ_selvecs="tilegx_elf64_le_vec tilegx_elf32_be_vec tilegx_elf32_le_vec"
1623    ;;
1624#endif
1625
1626  tilepro-*-*)
1627    targ_defvec=tilepro_elf32_vec
1628    ;;
1629
1630  v850*-*-*)
1631    targ_defvec=v850_elf32_vec
1632    targ_selvecs="v800_elf32_vec"
1633    ;;
1634
1635  vax-*-netbsdelf*)
1636    targ_defvec=vax_elf32_vec
1637    targ_selvecs="vax_aout_nbsd_vec vax_aout_1knbsd_vec"
1638    ;;
1639
1640  vax-*-netbsdaout* | vax-*-netbsd*)
1641    targ_defvec=vax_aout_nbsd_vec
1642    targ_selvecs="vax_elf32_vec vax_aout_1knbsd_vec"
1643    targ_underscore=yes
1644    ;;
1645
1646  vax-*-bsd* | vax-*-ultrix*)
1647    targ_defvec=vax_aout_bsd_vec
1648    targ_underscore=yes
1649    ;;
1650
1651  vax-*-openbsd*)
1652    targ_defvec=vax_aout_nbsd_vec
1653    targ_underscore=yes
1654    ;;
1655
1656  vax-*-linux-*)
1657    targ_defvec=vax_elf32_vec
1658    ;;
1659
1660  we32k-*-*)
1661    targ_defvec=we32k_coff_vec
1662    ;;
1663
1664  w65-*-*)
1665    targ_defvec=w65_coff_vec
1666    ;;
1667
1668  xgate-*-*)
1669    targ_defvec=xgate_elf32_vec
1670    targ_selvecs="xgate_elf32_vec"
1671    ;;
1672
1673  xstormy16-*-elf)
1674    targ_defvec=xstormy16_elf32_vec
1675    ;;
1676
1677  xtensa*-*-*)
1678    targ_defvec=xtensa_elf32_le_vec
1679    targ_selvecs=xtensa_elf32_be_vec
1680    ;;
1681 xc16x-*-elf)
1682    targ_defvec=xc16x_elf32_vec
1683    ;;
1684
1685  z80-*-*)
1686    targ_defvec=z80_coff_vec
1687    targ_underscore=no
1688    ;;
1689
1690  z8k*-*-*)
1691    targ_defvec=z8k_coff_vec
1692    targ_underscore=yes
1693    ;;
1694
1695  *-*-ieee*)
1696    targ_defvec=ieee_vec
1697    ;;
1698
1699  *-adobe-*)
1700    targ_defvec=aout_adobe_vec
1701    targ_underscore=yes
1702    ;;
1703
1704  *-sony-*)
1705    targ_defvec=m68k_aout_newsos3_vec
1706    targ_underscore=yes
1707    ;;
1708
1709  *-tandem-*)
1710    targ_defvec=m68k_coff_vec
1711    targ_selvecs=ieee_vec
1712    ;;
1713# END OF targmatch.h
1714  *)
1715    echo 1>&2 "*** BFD does not support target ${targ}."
1716    echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
1717    exit 1
1718    ;;
1719esac
1720
1721# All MIPS ELF targets need a 64-bit bfd_vma.
1722case "${targ_defvec} ${targ_selvecs}" in
1723  *mips_elf*)
1724    want64=true
1725    ;;
1726esac
1727
1728case "${host64}${want64}" in
1729  *true*)
1730    targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
1731    ;;
1732esac
1733
1734# If we support any ELF target, then automatically add support for the
1735# generic ELF targets.  This permits an objdump with some ELF support
1736# to be used on an arbitrary ELF file for anything other than
1737# relocation information.
1738case "${targ_defvec} ${targ_selvecs}" in
1739  *elf64* | *mips_elf32_n*)
1740    targ_selvecs="${targ_selvecs} elf64_le_vec elf64_be_vec elf32_le_vec elf32_be_vec"
1741    ;;
1742  *elf32*)
1743    targ_selvecs="${targ_selvecs} elf32_le_vec elf32_be_vec"
1744    ;;
1745esac
1746
1747# If we support Intel L1OM target, then add support for bfd_l1om_arch.
1748case "${targ_defvec} ${targ_selvecs}" in
1749  *l1om_elf64*)
1750    targ_archs="$targ_archs bfd_l1om_arch"
1751    ;;
1752esac
1753
1754# If we support Intel K1OM target, then add support for bfd_k1om_arch.
1755case "${targ_defvec} ${targ_selvecs}" in
1756  *k1om_elf64*)
1757    targ_archs="$targ_archs bfd_k1om_arch"
1758    ;;
1759esac
1760