ld/ARM: Add target arm*b-*-freebsd*, update target arm*-*-freebsd*.
[external/binutils.git] / ld / configure.tgt
1 # configure.tgt
2 #
3 #   Copyright (C) 2013-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 # This is the linker target specific file.  This is invoked by the
20 # autoconf generated configure script.  Putting it in a separate shell
21 # file lets us skip running autoconf when modifying target specific
22 # information.
23
24 # This file switches on the shell variable ${targ}, and sets the
25 # following shell variables:
26 #  targ_emul            name of linker emulation to use
27 #  targ_extra_emuls     additional linker emulations to provide
28 #  targ_extra_libpath   additional linker emulations using LIB_PATH
29 #  targ_extra_ofiles    additional host-compiled objects needed by the emulation
30 #  targ64_extra_emuls   additional linker emulations to provide if
31 #                       --enable-64-bit-bfd is given or if host is 64 bit.
32 #  targ64_extra_libpath additional linker emulations using LIB_PATH if
33 #                       --enable-64-bit-bfd is given or if host is 64 bit.
34 #  NATIVE_LIB_DIRS      library directories to search on this host
35 #                       (if we are a native or sysrooted linker)
36
37 targ_extra_emuls=
38 targ_extra_libpath=
39 targ_extra_ofiles=
40 targ64_extra_emuls=
41 targ64_extra_libpath=
42
43 # Please try to keep this table in alphabetic order - it makes it
44 # much easier to lookup a specific archictecture.  Naturally any
45 # architecture variants should be kept together even if their names
46 # break the alpha sorting.
47 case "${targ}" in
48 aarch64_be-*-elf)       targ_emul=aarch64elfb
49                         targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
50 aarch64-*-elf)          targ_emul=aarch64elf
51                         targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
52 aarch64_be-*-linux*)    targ_emul=aarch64linuxb
53                         targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
54                         targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" ;;
55 aarch64-*-linux*)       targ_emul=aarch64linux
56                         targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
57                         targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;;
58 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
59                         targ_emul=elf64alpha_fbsd
60                         targ_extra_emuls="elf64alpha alpha"
61                         tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
62 alpha*-*-linux*ecoff*)  targ_emul=alpha targ_extra_emuls=elf64alpha
63                         tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;;
64 alpha*-*-linux-*)       targ_emul=elf64alpha targ_extra_emuls=alpha
65                         tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'` ;;
66 alpha*-*-osf*)          targ_emul=alpha ;;
67 alpha*-*-gnu*)          targ_emul=elf64alpha ;;
68 alpha*-*-netware*)      targ_emul=alpha ;;
69 alpha*-*-netbsd*)       targ_emul=elf64alpha_nbsd ;;
70 alpha*-*-openbsd*)      targ_emul=elf64alpha ;;
71 alpha*-*-*vms*)         targ_emul=alphavms
72                         ;;
73 arc-*-elf*)             targ_emul=arcelf
74                         ;;
75 arm-epoc-pe)            targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
76 arm*-*-cegcc*)          targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o"
77                         LIB_PATH='${tooldir}/lib/w32api' ;;
78 arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*)
79                         targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
80 arm-*-pe)               targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
81 arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
82 armeb-*-aout)           targ_emul=armaoutb ;;
83 arm-*-coff)             targ_emul=armcoff ;;
84 arm*b-*-freebsd*)       targ_emul=armelfb_fbsd
85                         targ_extra_emuls="armelf_fbsd armelf" ;;
86 arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
87                         targ_emul=armelf_fbsd
88                         targ_extra_emuls="armelfb_fbsd armelf" ;;
89 armeb-*-netbsdelf*)     targ_emul=armelfb_nbsd;
90                         targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
91 arm-*-netbsdelf*)       targ_emul=armelf_nbsd;
92                         targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
93 arm-*-netbsd*)          targ_emul=armnbsd;
94                         targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd"  ;;
95 arm-*-nto*)             targ_emul=armnto ;;
96 arm-*-openbsd*)         targ_emul=armnbsd ;;
97 arm-*-rtems*)           targ_emul=armelf ;;
98 armeb-*-elf)            targ_emul=armelfb ;;
99 arm-*-elf | arm*-*-eabi*)
100                         targ_emul=armelf ;;
101 arm*-*-symbianelf*)     targ_emul=armsymbian;;
102 arm-*-kaos*)            targ_emul=armelf ;;
103 arm9e-*-elf)            targ_emul=armelf ;;
104 arm*b-*-linux-*eabi*)   targ_emul=armelfb_linux_eabi
105                         targ_extra_emuls=armelf_linux_eabi
106                         targ_extra_libpath=$targ_extra_emuls
107                         ;;
108 arm*b-*-linux-*)        targ_emul=armelfb_linux
109                         targ_extra_emuls="armelfb armelf armelf_linux"
110                         targ_extra_libpath="armelf_linux"
111                         ;;
112 arm*-*-linux-*eabi*)    targ_emul=armelf_linux_eabi
113                         targ_extra_emuls=armelfb_linux_eabi
114                         targ_extra_libpath=$targ_extra_emuls
115                         ;;
116 arm*-*-linux-*)         targ_emul=armelf_linux
117                         targ_extra_emuls="armelf armelfb armelfb_linux"
118                         targ_extra_libpath="armelfb_linux"
119                         ;;
120 arm*b-*-nacl*)          targ_emul=armelfb_nacl
121                         targ_extra_emuls="armelf_nacl elf_i386_nacl"
122                         targ_extra_libpath=$targ_extra_emuls
123                         targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
124                         targ64_extra_libpath=$targ64_extra_emuls
125                         ;;
126 arm*-*-nacl*)           targ_emul=armelf_nacl
127                         targ_extra_emuls="armelfb_nacl elf_i386_nacl"
128                         targ_extra_libpath=$targ_extra_emuls
129                         targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
130                         targ64_extra_libpath=$targ64_extra_emuls
131                         ;;
132 arm*-*-uclinux*eabi*)   targ_emul=armelf_linux_eabi
133                         targ_extra_emuls=armelfb_linux_eabi
134                         targ_extra_libpath=$targ_extra_emuls
135                         ;;
136 arm*-*-uclinux*)        targ_emul=armelf_linux
137                         targ_extra_emuls="armelf armelfb armelfb_linux"
138                         targ_extra_libpath="armelfb_linux"
139                         ;;
140 arm-*-vxworks)          targ_emul=armelf_vxworks ;;
141 arm*-*-conix*)          targ_emul=armelf ;;
142 avr-*-*)                targ_emul=avr2
143                         targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7"
144                         ;;
145 bfin-*-elf)             targ_emul=elf32bfin;
146                         targ_extra_emuls="elf32bfinfd"
147                         targ_extra_libpath=$targ_extra_emuls
148                         ;;
149 bfin-*-rtems*)          targ_emul=elf32bfin;
150                         targ_extra_emuls="elf32bfinfd"
151                         targ_extra_libpath=$targ_extra_emuls
152                         ;;
153 bfin-*-uclinux*)        targ_emul=elf32bfin;
154                         targ_extra_emuls="elf32bfinfd"
155                         targ_extra_libpath=$targ_extra_emuls
156                         ;;
157 bfin-*-linux-uclibc*)   targ_emul=elf32bfinfd;
158                         targ_extra_emuls="elf32bfin"
159                         targ_extra_libpath=$targ_extra_emuls
160                         ;;
161 cr16-*-elf*)            targ_emul=elf32cr16 ;;
162 cr16c-*-elf*)           targ_emul=elf32cr16c
163                         ;;
164 cris-*-*aout*)          targ_emul=crisaout
165                         targ_extra_emuls="criself crislinux"
166                         targ_extra_libpath=$targ_extra_emuls ;;
167 cris-*-linux-* | crisv32-*-linux-*)
168                         targ_emul=crislinux ;;
169 cris-*-* | crisv32-*-*) targ_emul=criself
170                         targ_extra_emuls="crisaout crislinux"
171                         targ_extra_libpath=$targ_extra_emuls
172                         ;;
173 crx-*-elf*)             targ_emul=elf32crx
174                         ;;
175 d10v-*-*)               targ_emul=d10velf ;;
176 d30v-*-*ext*)           targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
177 d30v-*-*onchip*)        targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
178 d30v-*-*)               targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
179                         ;;
180 dlx-*-elf*)             targ_emul=elf32_dlx
181                         ;;
182 epiphany-*-elf)         targ_emul=elf32epiphany
183                         targ_extra_emuls="elf32epiphany_4x4"
184                         ;;
185 fido*-*-elf*)           targ_emul=m68kelf ;;
186 fr30-*-*)               targ_emul=elf32fr30
187                         ;;
188 frv-*-*linux*)          targ_emul=elf32frvfd ;;
189 frv-*-*)                targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
190                         ;;
191 moxie-*-*)              targ_emul=elf32moxie
192                         ;;
193 h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
194                         targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
195 h8300-*-elf* | h8300-*-rtems*)
196                         targ_emul=h8300elf;
197                         targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
198 h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
199                         targ_emul=h8500
200                         targ_extra_emuls="h8500s h8500b h8500m h8500c"
201                         ;;
202 hppa*64*-*-linux-*)     targ_emul=hppa64linux ;;
203 hppa*64*-hpux*)         targ_emul=elf64hppa ;;
204 hppa*-*-linux-*)        targ_emul=hppalinux ;;
205 hppa*-*-*elf*)          targ_emul=hppaelf ;;
206 hppa*-*-lites*)         targ_emul=hppaelf ;;
207 hppa*-*-netbsd*)        targ_emul=hppanbsd ;;
208 hppa*-*-openbsd*)       targ_emul=hppaobsd
209                         ;;
210 i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370
211                         ;;
212 i[3-7]86-*-nto-qnx*)    targ_emul=i386nto ;;
213 i[3-7]86-*-vsta)        targ_emul=vsta ;;
214 i[3-7]86-*-go32)        targ_emul=i386go32 ;;
215 i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
216 i[3-7]86-*-aix*)        targ_emul=i386coff ;;
217 i[3-7]86-*-sco*)        targ_emul=i386coff ;;
218 i[3-7]86-*-isc*)        targ_emul=i386coff ;;
219 i[3-7]86-*-lynxos*)     targ_emul=i386lynx ;;
220 i[3-7]86-*-coff)        targ_emul=i386coff ;;
221 i[3-7]86-*-rtems*)      targ_emul=elf_i386 ;;
222 i[3-7]86-*-aros*)       targ_emul=elf_i386 ;;
223 i[3-7]86-*-rdos*)       targ_emul=elf_i386 ;;
224 x86_64-*-rdos*)         targ_emul=elf64rdos ;;
225 i[3-7]86-*-bsd)         targ_emul=i386bsd ;;
226 i[3-7]86-*-bsd386)      targ_emul=i386bsd ;;
227 i[3-7]86-*-bsdi*)       targ_emul=i386bsd ;;
228 i[3-7]86-*-aout)        targ_emul=i386aout ;;
229 i[3-7]86-*-linux*aout*) targ_emul=i386linux
230                         targ_extra_emuls=elf_i386
231                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
232 i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
233 i[3-7]86-*-linux-*)     targ_emul=elf_i386
234                         targ_extra_emuls=i386linux
235                         targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
236                         targ64_extra_libpath=elf_x86_64
237                         targ_extra_libpath=elf32_x86_64
238                         tdir_i386linux=${targ_alias}aout ;;
239 x86_64-*-linux-gnux32)  targ_emul=elf32_x86_64
240                         targ_extra_emuls="elf_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
241                         targ_extra_libpath="elf_i386 elf_x86_64 elf_l1om elf_k1om"
242                         tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
243                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` ;;
244 x86_64-*-linux-*)       targ_emul=elf_x86_64
245                         targ_extra_emuls="elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
246                         targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
247                         tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
248                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
249 i[3-7]86-*-sysv[45]*)   targ_emul=elf_i386 ;;
250 i[3-7]86-*-solaris2*)   targ_emul=elf_i386_sol2
251                         targ_extra_emuls="elf_i386_ldso elf_i386 elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
252                         targ_extra_libpath=$targ_extra_emuls
253                         ;;
254 x86_64-*-solaris2*)
255                         targ_emul=elf_x86_64_sol2
256                         targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_l1om elf_k1om"
257                         targ_extra_libpath=$targ_extra_emuls
258                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
259 i[3-7]86-*-unixware)    targ_emul=elf_i386 ;;
260 i[3-7]86-*-solaris*)    targ_emul=elf_i386_ldso
261                         targ_extra_emuls="elf_i386"
262                         targ_extra_libpath=$targ_extra_emuls
263                         ;;
264 i[3-7]86-*-netbsdelf* | \
265 i[3-7]86-*-netbsd*-gnu* | \
266 i[3-7]86-*-knetbsd*-gnu)
267                         targ_emul=elf_i386
268                         targ_extra_emuls=i386nbsd ;;
269 i[3-7]86-*-netbsdpe*)   targ_emul=i386pe
270                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
271 i[3-7]86-*-netbsd*)     targ_emul=i386nbsd
272                         targ_extra_emuls=elf_i386 ;;
273 x86_64-*-netbsd*)       targ_emul=elf_x86_64
274                         targ_extra_emuls="elf_i386 i386nbsd elf_l1om elf_k1om"
275                         tdir_elf_i386=`echo ${targ_alias} | \
276                             sed -e 's/x86_64/i386/'`
277                         case "${tdir_elf_i386}" in
278                         *-netbsdelf*)   ;;
279                         *)              tdir_elf_i386=`echo ${tdir_elf_i386} | \
280                                         sed -e 's/netbsd/netbsdelf/'`;;
281                         esac ;;
282 i[3-7]86-*-netware)     targ_emul=i386nw ;;
283 i[3-7]86-*-elf*)        targ_emul=elf_i386 ;;
284 x86_64-*-elf*)          targ_emul=elf_x86_64
285                         targ_extra_emuls="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
286                         targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
287                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
288                         ;;
289 i[3-7]86-*-kaos*)       targ_emul=elf_i386 ;;
290 i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
291                         targ_emul=i386bsd ;;
292 i[3-7]86-*-dragonfly*)  targ_emul=elf_i386
293                         targ_extra_emuls="i386bsd" ;;
294 x86_64-*-dragonfly*)    targ_emul=elf_x86_64
295                         targ_extra_emuls="elf_i386 elf_l1om elf_k1om" ;;
296 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
297                         targ_emul=elf_i386_fbsd
298                         targ_extra_emuls="elf_i386 i386bsd" ;;
299 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
300                         targ_emul=elf_x86_64_fbsd
301                         targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd"
302                         targ_extra_libpath="elf_i386_fbsd"
303                         tdir_elf_i386_fbsd=`echo ${targ_alias} \
304                             | sed -e 's/x86_64/i386/'`
305                         tdir_elf_i386=`echo ${targ_alias} \
306                             | sed -e 's/x86_64/i386/'` ;;
307 i[3-7]86-*-sysv*)       targ_emul=i386coff ;;
308 i[3-7]86-*-ptx*)        targ_emul=i386coff ;;
309 i[3-7]86-*-mach*)       targ_emul=i386mach ;;
310 i[3-7]86-*-gnu*)        targ_emul=elf_i386 ;;
311 i[3-7]86-*-msdos*)      targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
312 i[3-7]86-*-moss*)       targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
313 i[3-7]86-*-winnt*)      targ_emul=i386pe ;
314                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
315 i[3-7]86-*-pe)          targ_emul=i386pe ;
316                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
317 i[3-7]86-*-cygwin*)     targ_emul=i386pe ;
318                         targ_extra_ofiles="deffilep.o pe-dll.o" ;
319                         test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
320 i[3-7]86-*-mingw32*)    targ_emul=i386pe ;
321                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
322 x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
323                         targ_extra_emuls=i386pe ;
324                         targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
325 x86_64-*-cygwin)        targ_emul=i386pep ;
326                         targ_extra_emuls=i386pe
327                         targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
328                         test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
329 x86_64-*-mingw*)        targ_emul=i386pep ;
330                         targ_extra_emuls=i386pe
331                         targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
332 i[3-7]86-*-interix*)    targ_emul=i386pe_posix;
333                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
334 i[3-7]86-*-beospe*)     targ_emul=i386beos ;;
335 i[3-7]86-*-beos*)       targ_emul=elf_i386_be ;;
336 i[3-7]86-*-vxworks*)    targ_emul=elf_i386_vxworks ;;
337 i[3-7]86-*-chaos)       targ_emul=elf_i386_chaos
338                         ;;
339 i[3-7]86-*-nacl*)       targ_emul=elf_i386_nacl
340                         targ_extra_emuls="armelf_nacl armelfb_nacl"
341                         targ_extra_libpath=$targ_extra_emuls
342                         targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
343                         targ64_extra_libpath=$targ64_extra_emuls
344                         ;;
345 x86_64-*-nacl*)         targ_emul=elf32_x86_64_nacl
346                         targ_extra_emuls="elf_i386_nacl elf_x86_64_nacl armelf_nacl armelfb_nacl"
347                         targ_extra_libpath=$targ_extra_emuls
348                         tdir_elf_i386_nacl=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
349                         ;;
350 i860-*-coff)            targ_emul=coff_i860 ;;
351 i860-stardent-sysv4* | i860-stardent-elf*)
352                         targ_emul=elf32_i860
353                         ;;
354 i960-wrs-vxworks5.0*)   targ_emul=gld960 ;;
355 i960-wrs-vxworks5*)     targ_emul=gld960coff ;;
356 i960-wrs-vxworks*)      targ_emul=gld960 ;;
357 i960-*-coff)            targ_emul=gld960coff ;;
358 i960-intel-nindy)       targ_emul=gld960 ;;
359 i960-*-rtems*)          targ_emul=gld960coff ;;
360 i960-*-elf*)            targ_emul=elf32_i960
361                         ;;
362 ia64-*-elf*)            targ_emul=elf64_ia64 ;;
363 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
364                         targ_emul=elf64_ia64_fbsd
365                         targ_extra_emuls="elf64_ia64" ;;
366 ia64-*-netbsd*)         targ_emul=elf64_ia64 ;;
367 ia64-*-linux*)          targ_emul=elf64_ia64 ;;
368 ia64-*-*vms*)           targ_emul=elf64_ia64_vms ;;
369 ia64-*-aix*)            targ_emul=elf64_aix
370                         ;;
371 ip2k-*-elf)             targ_emul=elf32ip2k
372                         ;;
373 iq2000-*-elf)           targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
374                         ;;
375 lm32-*-*linux*)         targ_emul=elf32lm32fd ;;
376 lm32-*-*)               targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd"
377                         ;;
378 m32c-*-elf | m32c-*-rtems*)
379                         targ_emul=elf32m32c
380                         ;;
381 m32r*le-*-elf*)         targ_emul=m32rlelf ;;
382 m32r*-*-elf* | m32r*-*-rtems*)
383                         targ_emul=m32relf ;;
384 m32r*le-*-linux-*)      targ_emul=m32rlelf_linux ;;
385 m32r*-*-linux-*)        targ_emul=m32relf_linux
386                         ;;
387 m68hc11-*-*|m6811-*-*)  targ_emul=m68hc11elf
388                         targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
389 m68hc12-*-*|m6812-*-*)  targ_emul=m68hc12elf
390                         targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
391 m68*-sun-sunos[34]*)    targ_emul=sun3 ;;
392 m68*-wrs-vxworks*)      targ_emul=sun3 ;;
393 m68*-ericsson-ose)      targ_emul=sun3 ;;
394 m68*-apple-aux*)        targ_emul=m68kaux ;;
395 m68k-sony-*)            targ_emul=news ;;
396 m68k-hp-bsd*)           targ_emul=hp300bsd ;;
397 m68*-motorola-sysv*)    targ_emul=delta68 ;;
398 m68*-*-aout)            targ_emul=m68kaout ;;
399 m68*-*-coff)            targ_emul=m68kcoff ;;
400 m68*-*-elf)             targ_emul=m68kelf ;;
401 m68*-*-hpux*)           targ_emul=hp3hpux ;;
402 m68k-*-linux*aout*)     targ_emul=m68klinux
403                         targ_extra_emuls=m68kelf
404                         tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
405 m68k-*-linux-*)         targ_emul=m68kelf
406                         targ_extra_emuls=m68klinux
407                         tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
408 m68k-*-uclinux*)        targ_emul=m68kelf ;;
409 m68*-*-gnu*)            targ_emul=m68kelf ;;
410 m68*-*-netbsd*4k*)      targ_emul=m68k4knbsd
411                         targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
412 m68*-*-netbsdelf*)      targ_emul=m68kelfnbsd
413                         targ_extra_emuls="m68knbsd m68k4knbsd" ;;
414 m68*-*-netbsdaout* | m68*-*-netbsd*)
415                         targ_emul=m68knbsd
416                         targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
417 m68*-*-psos*)           targ_emul=m68kpsos ;;
418 m68*-*-rtemscoff*)      targ_emul=m68kcoff ;;
419 m68*-*-rtems*)          targ_emul=m68kelf
420                         ;;
421 m8*-*-*)                targ_emul=m88kbcs
422                         ;;
423 mcore-*-pe)             targ_emul=mcorepe ;
424                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
425 mcore-*-elf)            targ_emul=elf32mcore
426                         ;;
427 mep-*-elf)              targ_emul=elf32mep ;;
428 metag-*-*)              targ_emul=elf32metag ;;
429 microblazeel*-linux*)   targ_emul="elf32mbel_linux"
430                         targ_extra_emuls="elf32mb_linux"
431                         ;;
432 microblaze*-linux*)     targ_emul="elf32mb_linux"
433                         targ_extra_emuls="elf32mbel_linux"
434                         ;;
435 microblazeel*)          targ_emul=elf32microblazeel
436                         targ_extra_emuls=elf32microblaze
437                         ;;
438 microblaze*)            targ_emul=elf32microblaze
439                         targ_extra_emuls=elf32microblazeel
440                         ;;
441 mips*-sgi-irix5*)       targ_emul=elf32bsmip ;;
442 mips*-sgi-irix6*)       targ_emul=elf32bmipn32
443                         targ_extra_emuls="elf32bsmip elf64bmip"
444                         targ_extra_libpath=$targ_extra_emuls ;;
445 mips*el-*-netbsd*)      targ_emul=elf32ltsmip
446                         targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
447                         ;;
448 mips*-*-netbsd*)        targ_emul=elf32btsmip
449                         targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
450                         ;;
451 mips*vr4300el-*-elf*)   targ_emul=elf32l4300 ;;
452 mips*vr4300-*-elf*)     targ_emul=elf32b4300 ;;
453 mips*vr4100el-*-elf*)   targ_emul=elf32l4300 ;;
454 mips*vr4100-*-elf*)     targ_emul=elf32b4300 ;;
455 mips*vr5000el-*-elf*)   targ_emul=elf32l4300 ;;
456 mips*vr5000-*-elf*)     targ_emul=elf32b4300 ;;
457 mips*el-sde-elf*)       targ_emul=elf32ltsmip
458                         targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
459 mips*-sde-elf* | mips*-mti-elf*)
460                         targ_emul=elf32btsmip
461                         targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
462 mips64*el-ps2-elf*)     targ_emul=elf32lr5900n32
463                         targ_extra_emuls="elf32lr5900"
464                         targ_extra_libpath=$targ_extra_emuls ;;
465 mips*el-ps2-elf*)       targ_emul=elf32lr5900
466                         targ_extra_emuls="elf32lr5900n32"
467                         targ_extra_libpath=$targ_extra_emuls ;;
468 mips*el-*-elf*)         targ_emul=elf32elmip ;;
469 mips*-*-elf*)           targ_emul=elf32ebmip ;;
470 mips*-*-rtems*)         targ_emul=elf32ebmip ;;
471 mips*el-*-vxworks*)     targ_emul=elf32elmipvxworks
472                         targ_extra_emuls="elf32ebmipvxworks" ;;
473 mips*-*-vxworks*)       targ_emul=elf32ebmipvxworks
474                         targ_extra_emuls="elf32elmipvxworks" ;;
475 mips*-*-windiss)        targ_emul=elf32mipswindiss ;;
476 mips64*el-*-linux-*)    targ_emul=elf32ltsmipn32
477                         targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
478                         targ_extra_libpath=$targ_extra_emuls ;;
479 mips64*-*-linux-*)      targ_emul=elf32btsmipn32
480                         targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
481                         targ_extra_libpath=$targ_extra_emuls ;;
482 mips*el-*-linux-*)      targ_emul=elf32ltsmip
483                         targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
484                         targ_extra_libpath=$targ_extra_emuls ;;
485 mips*-*-linux-*)        targ_emul=elf32btsmip
486                         targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
487                         targ_extra_libpath=$targ_extra_emuls ;;
488 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
489                         targ_emul=elf32ltsmipn32_fbsd
490                         targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
491                         targ_extra_libpath=$targ_extra_emuls ;;
492 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
493                         targ_emul=elf32btsmipn32_fbsd
494                         targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
495                         targ_extra_libpath=$targ_extra_emuls ;;
496 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
497                         targ_emul=elf32ltsmip_fbsd
498                         targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
499                         targ_extra_libpath=$targ_extra_emuls ;;
500 mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
501                         targ_emul=elf32btsmip_fbsd
502                         targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
503                         targ_extra_libpath=$targ_extra_emuls ;;
504 mips*-*-sysv4*)         targ_emul=elf32btsmip
505                         ;;
506 mmix-*-*)               targ_emul=mmo
507                         targ_extra_emuls=elf64mmix
508                         ;;
509 am34-*-linux*)          targ_emul=elf32am33lin ;;
510 am33_2.0-*-linux*)      targ_emul=elf32am33lin ;;
511 mn10200-*-*)            targ_emul=mn10200 ;;
512 mn10300-*-*)            targ_emul=mn10300
513                         ;;
514 mt-*elf)                targ_emul=elf32mt
515                         ;;
516 msp430-*-*)             targ_emul=msp430
517                         targ_extra_emuls="msp430X"
518                         ;;
519 nds32*le-*-elf*)        targ_emul=nds32elf
520                         targ_extra_emuls="nds32elf16m nds32belf nds32belf16m"
521                         ;;
522 nds32*be-*-elf*)        targ_emul=nds32belf
523                         targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
524                         ;;
525 nds32*le-*-linux-gnu*)  targ_emul=nds32elf_linux ;;
526 nds32*be-*-linux-gnu*)  targ_emul=nds32belf_linux ;;
527 nios2*-*-linux*)        targ_emul=nios2linux ;;
528 nios2*-*-*)             targ_emul=nios2elf ;;
529 ns32k-pc532-mach* | ns32k-pc532-ux*)  targ_emul=pc532macha ;;
530 ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
531                         ;;
532 or1k-*-elf | or1knd-*-elf)              targ_emul=elf32or1k ;;
533 or1k-*-linux* | or1knd-*-linux*)        targ_emul=elf32or1k_linux ;;
534 or1k-*-rtems* | or1knd-*-rtems*)        targ_emul=elf32or1k
535                         ;;
536 pdp11-*-*)              targ_emul=pdp11
537                         ;;
538 pjl*-*-*)               targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
539 pj*-*-*)                targ_emul=pjelf
540                         ;;
541 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
542                         targ_emul=elf32ppc_fbsd
543                         targ_extra_emuls="elf32ppc elf32ppcsim"
544                         targ_extra_libpath=elf32ppc;
545                         tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
546 powerpc64-*-freebsd*)
547                         targ_emul=elf64ppc_fbsd
548                         targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
549                         targ_extra_libpath="elf32ppc_fbsd elf32ppc"
550                         tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
551                         tdir_elf32ppc_fbsd=$tdir_elf32ppc
552                         ;;
553 powerpc-*-vxworks*)
554                         targ_emul=elf32ppcvxworks
555                         targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
556 powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
557   | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
558   | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
559                         case "${targ}" in
560                         *64*)   targ_emul=elf64ppc
561                                 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
562                                 targ_extra_libpath="elf32ppc elf32ppclinux"
563                                 td=tdir_elf32ppc
564                                 case "${targ}" in
565                                 powerpc*le-*) td=tdir_elf32lppc;;
566                                 esac
567                                 eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'`
568                                 eval ${td}linux=\$${td}
569                                 eval ${td}sim=\$${td}
570                                 ;;
571                         *linux*) targ_emul=elf32ppclinux
572                                 targ_extra_emuls="elf32ppc elf32ppcsim"
573                                 targ_extra_libpath=elf32ppc
574                                 targ64_extra_emuls=elf64ppc
575                                 targ64_extra_libpath=elf64ppc
576                                 ;;
577                         *)      targ_emul=elf32ppc
578                                 targ_extra_emuls="elf32ppclinux elf32ppcsim"
579                                 targ_extra_libpath=elf32ppclinux
580                                 targ64_extra_emuls=elf64ppc
581                                 targ64_extra_libpath=elf64ppc
582                                 ;;
583                         esac
584                         case "${targ}" in
585                         powerpc*le-*)
586                                 for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
587                                 do
588                                   eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
589                                 done
590                         esac ;;
591 powerpc-*-nto*)         targ_emul=elf32ppcnto ;;
592 powerpcle-*-nto*)       targ_emul=elf32lppcnto ;;
593 powerpc-*-rtems*)       targ_emul=elf32ppc ;;
594 powerpc-*-macos*)       targ_emul=ppcmacos ;;
595 powerpc-*-netware*)     targ_emul=ppcnw ;;
596 powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
597                         targ_emul=ppcpe
598                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
599 powerpc-*-aix[5-9]*)    targ_emul=aix5ppc ;;
600 powerpc-*-aix*)         targ_emul=aixppc ;;
601 powerpc-*-beos*)        targ_emul=aixppc ;;
602 powerpc-*-windiss*)     targ_emul=elf32ppcwindiss ;;
603 powerpc-*-lynxos*)      targ_emul=ppclynx ;;
604 rs6000-*-aix[5-9]*)     targ_emul=aix5rs6 ;;
605 rs6000-*-aix*)          targ_emul=aixrs6
606                         ;;
607 rl78-*-*)               targ_emul=elf32rl78 ;;
608 rx-*-*)                 targ_emul=elf32rx ;;
609 s390x-*-linux*)         targ_emul=elf64_s390
610                         targ_extra_emuls=elf_s390
611                         targ_extra_libpath=$targ_extra_emuls
612                         tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
613 s390x-*-tpf*)           targ_emul=elf64_s390
614                         tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
615 s390-*-linux*)          targ_emul=elf_s390
616                         targ64_extra_emuls=elf64_s390
617                         targ64_extra_libpath=elf64_s390
618                         tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
619                         ;;
620 score-*-elf)            targ_emul=score7_elf
621                         targ_extra_emuls=score3_elf ;;
622 sh-*-linux*)            targ_emul=shlelf_linux
623                         targ_extra_emuls=shelf_linux
624                         targ_extra_libpath=shelf_linux ;;
625 sh64eb-*-linux*)        targ_emul=shelf32_linux
626                         targ_extra_emuls="shlelf32_linux" ;;
627 sh64-*-linux*)          targ_emul=shlelf32_linux
628                         targ_extra_emuls="shelf32_linux"
629                         targ_extra_libpath=shelf32_linux ;;
630 sh*eb-*-linux*)         targ_emul=shelf_linux ;;
631 sh*-*-linux*)           targ_emul=shlelf_linux ;;
632 sh5le-*-netbsd*)        targ_emul=shlelf32_nbsd
633                         targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
634 sh5-*-netbsd*)          targ_emul=shelf32_nbsd
635                         targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
636 sh64le-*-netbsd*)       targ_emul=shlelf64_nbsd
637                         targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
638 sh64-*-netbsd*)         targ_emul=shelf64_nbsd
639                         targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
640 sh*l*-*-netbsdelf*)     targ_emul=shlelf_nbsd
641                         targ_extra_emuls=shelf_nbsd ;;
642 sh*-*-netbsdelf*)       targ_emul=shelf_nbsd
643                         targ_extra_emuls=shlelf_nbsd ;;
644 sh*-*-symbianelf*)      targ_emul=shlsymbian ;;
645 shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
646                         targ_emul=shlelf
647                         targ_extra_emuls="shelf shl sh" ;;
648 sh-*-rtemscoff*)        targ_emul=sh; targ_extra_emuls=shl ;;
649 sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
650                         targ_emul=shelf
651                         targ_extra_emuls="shlelf sh shl" ;;
652 sh-*-uclinux* | sh[12]-*-uclinux*)
653                         targ_emul=shelf_uclinux
654                         targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd" ;;
655 sh-*-vxworks)           targ_emul=shelf_vxworks
656                         targ_extra_emuls=shlelf_vxworks ;;
657 sh-*-nto*)              targ_emul=shelf_nto
658                         targ_extra_emuls=shlelf_nto ;;
659 sh-*-pe)                targ_emul=shpe ;
660                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
661 sh-*-*)                 targ_emul=sh; targ_extra_emuls=shl ;;
662 sh64le-*-elf*)          targ_emul=shlelf
663                         targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
664                         targ_extra_libpath=$targ_extra_emuls ;;
665 sh64-*-elf*)            targ_emul=shelf
666                         targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
667                         targ_extra_libpath=$targ_extra_emuls ;;
668 sparc64-*-aout*)        targ_emul=sparcaout ;;
669 sparc64-*-elf*)         targ_emul=elf64_sparc ;;
670 sparc64-*-rtems*)       targ_emul=elf64_sparc ;;
671 sparc-sun-sunos4*)      targ_emul=sun4 ;;
672 sparclite*-*-elf)       targ_emul=elf32_sparc ;;
673 sparclite*-*-coff)      targ_emul=coff_sparc ;;
674 sparclite*-fujitsu-*)   targ_emul=sparcaout ;;
675 sparc*-*-aout)          targ_emul=sparcaout ;;
676 sparc*-*-coff)          targ_emul=coff_sparc ;;
677 sparc*-*-elf)           targ_emul=elf32_sparc ;;
678 sparc*-*-sysv4*)        targ_emul=elf32_sparc ;;
679 sparc*-*-vxworks*)      targ_emul=elf32_sparc_vxworks ;;
680 sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
681                         targ_emul=elf64_sparc_fbsd
682                         targ_extra_emuls="elf64_sparc elf32_sparc"
683                         targ_extra_libpath=$targ_extra_emuls
684                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
685 sparc*-*-linux*aout*)   targ_emul=sparclinux
686                         targ_extra_emuls="elf32_sparc sun4"
687                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
688                         tdir_sun4=sparc-sun-sunos4 ;;
689 sparc64-*-linux-*)      targ_emul=elf64_sparc
690                         targ_extra_emuls="elf32_sparc sparclinux sun4"
691                         targ_extra_libpath=elf32_sparc
692                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
693                         tdir_sparclinux=${tdir_elf32_sparc}aout
694                         tdir_sun4=sparc-sun-sunos4 ;;
695 sparc*-*-linux-*)       targ_emul=elf32_sparc
696                         targ_extra_emuls="sparclinux elf64_sparc sun4"
697                         targ_extra_libpath=elf64_sparc
698                         tdir_sparclinux=${targ_alias}aout
699                         tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
700                         tdir_sun4=sparc-sun-sunos4 ;;
701 sparc64-*-netbsd* | sparc64-*-openbsd*)
702                         targ_emul=elf64_sparc
703                         targ_extra_emuls="elf32_sparc" ;;
704 sparc*-*-netbsd*elf*)   targ_emul=elf32_sparc ;;
705 sparc*-*-netbsd*)       targ_emul=sparcnbsd ;;
706 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
707                         targ_emul=elf32_sparc_sol2
708                         targ_extra_emuls=elf32_sparc ;;
709 sparc-*-solaris2*)      targ_emul=elf32_sparc_sol2
710                         targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc"
711                         targ_extra_libpath=$targ_extra_emuls
712                         tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
713 sparcv9-*-solaris2* | sparc64-*-solaris2*)
714                         targ_emul=elf64_sparc_sol2
715                         targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc"
716                         targ_extra_libpath=$targ_extra_emuls
717                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
718 sparc*-*-solaris2*)     targ_emul=elf32_sparc ;;
719 sparc*-wrs-vxworks*)    targ_emul=sparcaout ;;
720 sparc-*-rtems*)         targ_emul=elf32_sparc
721                         ;;
722 spu-*-elf*)             targ_emul=elf32_spu ;;
723 tic30-*-*aout*)         targ_emul=tic30aout ;;
724 tic30-*-*coff*)         targ_emul=tic30coff ;;
725 tic4x-*-* | c4x-*-*)    targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
726 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
727 tic6x-*-elf)            targ_emul=elf32_tic6x_elf_le
728                         targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
729                         targ_extra_libpath=$targ_extra_emuls
730                         ;;
731 tic6x-*-uclinux)        targ_emul=elf32_tic6x_linux_le
732                         targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be"
733                         targ_extra_libpath=$targ_extra_emuls
734                         ;;
735 tic80-*-*)              targ_emul=tic80coff
736                         ;;
737 tilegx-*-*)             targ_emul=elf64tilegx
738                         targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be"
739                         targ_extra_libpath=$targ_extra_emuls ;;
740 tilegxbe-*-*)           targ_emul=elf64tilegx_be
741                         targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be"
742                         targ_extra_libpath=$targ_extra_emuls ;;
743 tilepro-*-*)            targ_emul=elf32tilepro ;;
744 v850*-*-*)              targ_emul=v850_rh850
745                         targ_extra_emuls=v850
746                         ;;
747 vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
748 vax-*-netbsdelf*)       targ_emul=elf32vax
749                         targ_extra_emuls=vaxnbsd ;;
750 vax-*-netbsdaout* | vax-*-netbsd*)
751                         targ_emul=vaxnbsd
752                         targ_extra_emuls=elf32vax ;;
753 vax-*-linux-*)          targ_emul=elf32vax
754                         ;;
755 w65-*-*)                targ_emul=w65
756                         ;;
757 xc16x-*-elf)            targ_emul=elf32xc16x
758                         targ_extra_emuls="elf32xc16xl elf32xc16xs"
759                         ;;
760 xstormy16-*-*)          targ_emul=elf32xstormy16
761                         ;;
762 xtensa*-*-*)            targ_emul=elf32xtensa
763                         ;;
764 xgate-*-*)              targ_emul=xgateelf
765                         ;;
766 z80-*-coff)             targ_emul=z80
767                         ;;
768 z8k-*-coff)             targ_emul=z8002; targ_extra_emuls=z8001
769                         ;;
770 *-*-ieee*)              targ_emul=vanilla
771                         ;;
772 *-tandem-none)          targ_emul=st2000
773                         ;;
774 *)
775   echo 2>&1 "*** ld does not support target ${targ}"
776   echo 2>&1 "*** see ld/configure.tgt for supported targets"
777   exit 1
778
779 esac
780
781 NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
782 case "${target}" in
783
784 *-*-dragonfly*)
785   NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
786   ;;
787
788 *-*-freebsd*)
789   NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
790   ;;
791
792 hppa*64*-*-hpux11*)
793   NATIVE_LIB_DIRS=/usr/lib/pa20_64
794   ;;
795
796 i[3-7]86-*-sysv4*)
797   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
798   ;;
799
800 i[3-7]86-*-solaris*)
801   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
802   ;;
803
804 i[3-7]86-pc-interix*)
805   NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
806   ;;
807
808 ia64-*-aix*)
809   NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
810   ;;
811
812 sparc*-*-solaris2*)
813   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
814   ;;
815
816 spu-*-elf*)
817   # This allows to build a pair of PPU/SPU toolchains with common sysroot.
818   NATIVE_LIB_DIRS='/lib'
819   ;;
820
821 i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
822   NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
823   ;;
824
825 *-*-linux*)
826   ;;
827
828 *-*-netbsd*)
829   ;;
830
831 alpha*-*-*)
832   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
833   ;;
834
835 esac