* Makefile.tpl (build_alias, host_alias, target_alias): Use
[binutils.git] / ld / configure.tgt
blob78827f43f32b8852cdd2bafd29ea39446a93a17b
1 # This is the linker target specific file.  This is invoked by the
2 # autoconf generated configure script.  Putting it in a separate shell
3 # file lets us skip running autoconf when modifying target specific
4 # information.
6 # This file switches on the shell variable ${targ}, and sets the
7 # following shell variables:
8 #  targ_emul            name of linker emulation to use
9 #  targ_extra_emuls     additional linker emulations to provide
10 #  targ_extra_libpath   additional linker emulations using LIB_PATH
11 #  targ_extra_ofiles    additional objects needed by the emulation
12 #  NATIVE_LIB_DIRS      library directories to search on this host
13 #                       (if we are a native or sysrooted linker)
15 targ_extra_emuls=
16 targ_extra_ofiles=
18 # Please try to keep this table in alphabetic order - it makes it
19 # much easier to lookup a specific archictecture.  Naturally any
20 # architecture variants should be kept together even if their names
21 # break the alpha sorting.
22 case "${targ}" in
23 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
24                         targ_emul=elf64alpha_fbsd
25                         targ_extra_emuls="elf64alpha alpha"
26                         tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
27 alpha*-*-linuxecoff*)   targ_emul=alpha targ_extra_emuls=elf64alpha
28                         tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;;
29 alpha*-*-linux-*)       targ_emul=elf64alpha targ_extra_emuls=alpha
30                         tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` ;;
31 alpha*-*-osf*)          targ_emul=alpha ;;
32 alpha*-*-gnu*)          targ_emul=elf64alpha ;;
33 alpha*-*-netware*)      targ_emul=alpha ;;
34 alpha*-*-netbsd*)       targ_emul=elf64alpha_nbsd ;;
35 alpha*-*-openbsd*)      targ_emul=elf64alpha
36                         ;;
37 arc-*-elf*)             targ_emul=arcelf
38                         ;;
39 arm-epoc-pe)            targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
40 arm-wince-pe | arm-*-wince) targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
41 arm-*-pe)               targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
42 arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
43 armeb-*-aout)           targ_emul=armaoutb ;;
44 arm-*-coff)             targ_emul=armcoff ;;
45 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
46                         targ_emul=armelf_fbsd
47                         targ_extra_emuls="armelf" ;;
48 armeb-*-netbsdelf*)     targ_emul=armelfb_nbsd;
49                         targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
50 arm-*-netbsdelf*)       targ_emul=armelf_nbsd;
51                         targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
52 arm-*-netbsd*)          targ_emul=armnbsd;
53                         targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd"  ;;
54 arm-*-nto*)             targ_emul=armnto ;;
55 arm-*-openbsd*)         targ_emul=armnbsd ;;
56 arm-*-rtems*)           targ_emul=armelf ;;
57 armeb-*-elf)            targ_emul=armelfb ;;
58 arm-*-elf | arm*-*-eabi*)
59                         targ_emul=armelf ;;
60 arm*-*-symbianelf*)     targ_emul=armsymbian;;
61 arm-*-kaos*)            targ_emul=armelf ;;
62 arm9e-*-elf)            targ_emul=armelf ;;
63 arm*b-*-linux-*eabi)    targ_emul=armelfb_linux_eabi
64                         targ_extra_emuls=armelf_linux_eabi
65                         targ_extra_libpath=$targ_extra_emuls
66                         ;;
67 arm*b-*-linux-*)        targ_emul=armelfb_linux
68                         targ_extra_emuls="armelfb armelf armelf_linux"
69                         targ_extra_libpath="armelf_linux"
70                         ;;
71 arm*-*-linux-*eabi)     targ_emul=armelf_linux_eabi
72                         targ_extra_emuls=armelfb_linux_eabi
73                         targ_extra_libpath=$targ_extra_emuls
74                         ;;
75 arm*-*-linux-*)         targ_emul=armelf_linux
76                         targ_extra_emuls="armelf armelfb armelfb_linux"
77                         targ_extra_libpath="armelfb_linux"
78                         ;;
79 arm*-*-uclinux-*eabi)   targ_emul=armelf_linux_eabi
80                         targ_extra_emuls=armelfb_linux_eabi
81                         targ_extra_libpath=$targ_extra_emuls
82                         ;;
83 arm*-*-uclinux*)        targ_emul=armelf_linux
84                         targ_extra_emuls="armelf armelfb armelfb_linux"
85                         targ_extra_libpath="armelfb_linux"
86                         ;;
87 arm-*-vxworks)          targ_emul=armelf_vxworks ;;
88 arm*-*-conix*)          targ_emul=armelf ;;
89 thumb-*-linux-* | thumb-*-uclinux*)     targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
90 strongarm-*-coff)       targ_emul=armcoff ;;
91 strongarm-*-elf)        targ_emul=armelf ;;
92 strongarm-*-kaos*)      targ_emul=armelf ;;
93 thumb-*-coff)           targ_emul=armcoff ;;
94 thumb-*-elf)            targ_emul=armelf ;;
95 thumb-epoc-pe)          targ_emul=arm_epoc_pe ;
96                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
97 thumb-*-pe)             targ_emul=armpe ;
98                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
99 xscale-*-coff)          targ_emul=armcoff ;;
100 xscale-*-elf)           targ_emul=armelf
101                         ;;
102 avr-*-*)                targ_emul=avr2
103                         targ_extra_emuls="avr1 avr3 avr4 avr5 avr6"
104                         ;;
105 bfin-*-elf)             targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
106 bfin-*-uclinux*)        targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
107 cr16c-*-elf*)           targ_emul=elf32cr16c
108                         ;;
109 cris-*-*aout*)          targ_emul=crisaout
110                         targ_extra_emuls="criself crislinux"
111                         targ_extra_libpath=$targ_extra_emuls ;;
112 cris-*-linux-* | crisv32-*-linux-*)
113                         targ_emul=crislinux ;;
114 cris-*-* | crisv32-*-*) targ_emul=criself
115                         targ_extra_emuls="crisaout crislinux"
116                         targ_extra_libpath=$targ_extra_emuls
117                         ;;
118 crx-*-elf*)             targ_emul=elf32crx
119                         ;;
120 d10v-*-*)               targ_emul=d10velf ;;
121 d30v-*-*ext*)           targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
122 d30v-*-*onchip*)        targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
123 d30v-*-*)               targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
124                         ;;
125 dlx-*-elf*)             targ_emul=elf32_dlx
126                         ;;
127 fido*-*-elf*)           targ_emul=m68kelf ;;
128 fr30-*-*)               targ_emul=elf32fr30
129                         ;;
130 frv-*-*linux*)          targ_emul=elf32frvfd ;;
131 frv-*-*)                targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
132                         ;;
133 h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
134                         targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
135 h8300-*-elf* | h8300-*-rtems*)
136                         targ_emul=h8300elf;
137                         targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
138 h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
139                         targ_emul=h8500
140                         targ_extra_emuls="h8500s h8500b h8500m h8500c"
141                         ;;
142 hppa*64*-*-linux-*)     targ_emul=hppa64linux ;;
143 hppa*64*-*)             targ_emul=elf64hppa ;;
144 hppa*-*-linux-*)        targ_emul=hppalinux ;;
145 hppa*-*-*elf*)          targ_emul=hppaelf ;;
146 hppa*-*-lites*)         targ_emul=hppaelf ;;
147 hppa*-*-netbsd*)        targ_emul=hppanbsd ;;
148 hppa*-*-openbsd*)       targ_emul=hppaobsd
149                         ;;
150 i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370
151                         ;;
152 i[3-7]86-*-nto-qnx*)    targ_emul=i386nto ;;
153 i[3-7]86-*-vsta)        targ_emul=vsta ;;
154 i[3-7]86-*-go32)        targ_emul=i386go32 ;;
155 i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
156 i[3-7]86-*-aix*)        targ_emul=i386coff ;;
157 i[3-7]86-*-sco*)        targ_emul=i386coff ;;
158 i[3-7]86-*-isc*)        targ_emul=i386coff ;;
159 i[3-7]86-*-lynxos*)     targ_emul=i386lynx ;;
160 i[3-7]86-*-coff)        targ_emul=i386coff ;;
161 i[3-7]86-*-rtems*)      targ_emul=elf_i386 ;;
162 i[3-7]86-*-aros*)       targ_emul=elf_i386 ;;
163 i[3-7]86-*-rdos*)       targ_emul=elf_i386 ;;
164 i[3-7]86-*-bsd)         targ_emul=i386bsd ;;
165 i[3-7]86-*-bsd386)      targ_emul=i386bsd ;;
166 i[3-7]86-*-bsdi*)       targ_emul=i386bsd ;;
167 i[3-7]86-*-aout)        targ_emul=i386aout ;;
168 i[3-7]86-*-linux*aout*) targ_emul=i386linux
169                         targ_extra_emuls=elf_i386
170                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
171 i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
172 i[3-7]86-*-linux-*)     targ_emul=elf_i386
173                         targ_extra_emuls=i386linux
174                         if test x${want64} = xtrue; then
175                           targ_extra_emuls="$targ_extra_emuls elf_x86_64"
176                           targ_extra_libpath=elf_x86_64
177                         fi
178                         tdir_i386linux=${targ_alias}aout ;;
179 x86_64-*-linux-*)       targ_emul=elf_x86_64
180                         targ_extra_emuls="elf_i386 i386linux"
181                         targ_extra_libpath=elf_i386
182                         tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
183                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
184 i[3-7]86-*-sysv[45]*)   targ_emul=elf_i386 ;;
185 i[3-7]86-*-solaris2*)   targ_emul=elf_i386_ldso
186                         targ_extra_emuls="elf_i386 elf_x86_64"
187                         targ_extra_libpath=$targ_extra_emuls
188                         ;;
189 i[3-7]86-*-unixware)    targ_emul=elf_i386 ;;
190 i[3-7]86-*-solaris*)    targ_emul=elf_i386_ldso
191                         targ_extra_emuls="elf_i386"
192                         targ_extra_libpath=$targ_extra_emuls
193                         ;;
194 i[3-7]86-*-netbsdelf* | \
195 i[3-7]86-*-netbsd*-gnu* | \
196 i[3-7]86-*-knetbsd*-gnu)
197                         targ_emul=elf_i386
198                         targ_extra_emuls=i386nbsd ;;
199 i[3-7]86-*-netbsdpe*)   targ_emul=i386pe
200                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
201 i[3-7]86-*-netbsd*)     targ_emul=i386nbsd
202                         targ_extra_emuls=elf_i386 ;;
203 x86_64-*-netbsd*)       targ_emul=elf_x86_64
204                         targ_extra_emuls="elf_i386 i386nbsd"
205                         tdir_elf_i386=`echo ${targ_alias} | \
206                             sed -e 's/x86_64/i386/'`
207                         case "${tdir_elf_i386}" in
208                         *-netbsdelf*)   ;;
209                         *)              tdir_elf_i386=`echo ${tdir_elf_i386} | \
210                                         sed -e 's/netbsd/netbsdelf/'`;;
211                         esac ;;
212 i[3-7]86-*-netware)     targ_emul=i386nw ;;
213 i[3-7]86-*-elf*)        targ_emul=elf_i386 ;;
214 x86_64-*-elf*)          targ_emul=elf_x86_64
215                         targ_extra_emuls=elf_i386
216                         ;;
217 i[3-7]86-*-kaos*)       targ_emul=elf_i386 ;;
218 i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
219                         targ_emul=i386bsd ;;
220 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
221                         targ_emul=elf_i386_fbsd
222                         targ_extra_emuls="elf_i386 i386bsd" ;;
223 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
224                         targ_emul=elf_x86_64_fbsd
225                         targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386"
226                         targ_extra_libpath="elf_i386_fbsd"
227                         tdir_elf_i386_fbsd=`echo ${targ_alias} \
228                             | sed -e 's/x86_64/i386/'`
229                         tdir_elf_i386=`echo ${targ_alias} \
230                             | sed -e 's/x86_64/i386/'` ;;
231 i[3-7]86-*-sysv*)       targ_emul=i386coff ;;
232 i[3-7]86-*-ptx*)        targ_emul=i386coff ;;
233 i[3-7]86-*-mach*)       targ_emul=i386mach ;;
234 i[3-7]86-*-gnu*)        targ_emul=elf_i386 ;;
235 i[3-7]86-*-msdos*)      targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
236 i[3-7]86-*-moss*)       targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
237 i[3-7]86-*-winnt*)      targ_emul=i386pe ;
238                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
239 i[3-7]86-*-pe)          targ_emul=i386pe ;
240                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
241 i[3-7]86-*-cygwin*)     targ_emul=i386pe ;
242                         targ_extra_ofiles="deffilep.o pe-dll.o"
243                         test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
244 i[3-7]86-*-mingw32*)    targ_emul=i386pe ;
245                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
246 x86_64-*-mingw*)        targ_emul=i386pep ;
247                         targ_extra_ofiles="deffilep.o pep-dll.o" ;;
248 i[3-7]86-*-interix*)    targ_emul=i386pe_posix;
249                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
250 i[3-7]86-*-beospe*)     targ_emul=i386beos ;;
251 i[3-7]86-*-beos*)       targ_emul=elf_i386_be ;;
252 i[3-7]86-*-vxworks*)    targ_emul=elf_i386_vxworks ;;
253 i[3-7]86-*-chaos)       targ_emul=elf_i386_chaos
254                         ;;
255 i860-*-coff)            targ_emul=coff_i860 ;;
256 i860-stardent-sysv4* | i860-stardent-elf*)
257                         targ_emul=elf32_i860
258                         ;;
259 i960-wrs-vxworks5.0*)   targ_emul=gld960 ;;
260 i960-wrs-vxworks5*)     targ_emul=gld960coff ;;
261 i960-wrs-vxworks*)      targ_emul=gld960 ;;
262 i960-*-coff)            targ_emul=gld960coff ;;
263 i960-intel-nindy)       targ_emul=gld960 ;;
264 i960-*-rtems*)          targ_emul=gld960coff ;;
265 i960-*-elf*)            targ_emul=elf32_i960
266                         ;;
267 ia64-*-elf*)            targ_emul=elf64_ia64 ;;
268 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
269                         targ_emul=elf64_ia64_fbsd
270                         targ_extra_emuls="elf64_ia64" ;;
271 ia64-*-netbsd*)         targ_emul=elf64_ia64 ;;
272 ia64-*-linux*)          targ_emul=elf64_ia64 ;;
273 ia64-*-aix*)            targ_emul=elf64_aix
274                         ;;
275 ip2k-*-elf)             targ_emul=elf32ip2k
276                         ;;
277 iq2000-*-elf)           targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
278                         ;;
279 m32c-*-elf)             targ_emul=elf32m32c
280                         ;;
281 m32r*le-*-elf*)         targ_emul=m32rlelf ;;
282 m32r*-*-elf*)           targ_emul=m32relf ;;
283 m32r*le-*-linux-*)      targ_emul=m32rlelf_linux ;;
284 m32r*-*-linux-*)        targ_emul=m32relf_linux
285                         ;;
286 m68hc11-*-*|m6811-*-*)  targ_emul=m68hc11elf 
287                         targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
288 m68hc12-*-*|m6812-*-*)  targ_emul=m68hc12elf 
289                         targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
290 m68*-sun-sunos[34]*)    targ_emul=sun3 ;;
291 m68*-wrs-vxworks*)      targ_emul=sun3 ;;
292 m68*-ericsson-ose)      targ_emul=sun3 ;;
293 m68*-apple-aux*)        targ_emul=m68kaux ;;
294 m68k-sony-*)            targ_emul=news ;;
295 m68k-hp-bsd*)           targ_emul=hp300bsd ;;
296 m68*-motorola-sysv*)    targ_emul=delta68 ;;
297 m68*-*-aout)            targ_emul=m68kaout ;;
298 m68*-*-coff)            targ_emul=m68kcoff ;;
299 m68*-*-elf)             targ_emul=m68kelf ;;
300 m68*-*-hpux*)           targ_emul=hp3hpux ;;
301 m68k-*-linux*aout*)     targ_emul=m68klinux
302                         targ_extra_emuls=m68kelf
303                         tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
304 m68k-*-linux-*)         targ_emul=m68kelf
305                         targ_extra_emuls=m68klinux
306                         tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
307 m68k-*-uclinux*)        targ_emul=m68kelf ;;
308 m68*-*-gnu*)            targ_emul=m68kelf ;;
309 m68*-*-netbsd*4k*)      targ_emul=m68k4knbsd
310                         targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
311 m68*-*-netbsdelf*)      targ_emul=m68kelfnbsd
312                         targ_extra_emuls="m68knbsd m68k4knbsd" ;;
313 m68*-*-netbsdaout* | m68*-*-netbsd*)
314                         targ_emul=m68knbsd
315                         targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
316 m68*-*-psos*)           targ_emul=m68kpsos ;;
317 m68*-*-rtemscoff*)      targ_emul=m68kcoff ;;
318 m68*-*-rtems*)          targ_emul=m68kelf
319                         ;;
320 m8*-*-*)                targ_emul=m88kbcs
321                         ;;
322 maxq-*-coff)            targ_emul=maxqcoff
323                         ;;
324 mcore-*-pe)             targ_emul=mcorepe ;
325                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
326 mcore-*-elf)            targ_emul=elf32mcore
327                         ;;
328 mep-*-elf)              targ_emul=elf32mep ;;
329 mips*-*-pe)             targ_emul=mipspe ;
330                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
331 mips*-dec-ultrix*)      targ_emul=mipslit ;;
332 mips*-dec-osf*)         targ_emul=mipslit ;;
333 mips*-sgi-irix5*)       targ_emul=elf32bsmip ;;
334 mips*-sgi-irix6*)       targ_emul=elf32bmipn32
335                         targ_extra_emuls="elf32bsmip elf64bmip"
336                         targ_extra_libpath=$targ_extra_emuls ;;
337 mips*-sgi-irix*)        targ_emul=mipsbig ;;
338 mips*el-*-ecoff*)       targ_emul=mipsidtl ;;
339 mips*-*-ecoff*)         targ_emul=mipsidt ;;
340 mips*el-*-netbsd*)      targ_emul=elf32ltsmip
341                         targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
342                         ;;
343 mips*-*-netbsd*)        targ_emul=elf32btsmip
344                         targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
345                         ;;
346 mips*-*-bsd*)           targ_emul=mipsbig ;;
347 mips*vr4300el-*-elf*)   targ_emul=elf32l4300 ;;
348 mips*vr4300-*-elf*)     targ_emul=elf32b4300 ;;
349 mips*vr4100el-*-elf*)   targ_emul=elf32l4300 ;;
350 mips*vr4100-*-elf*)     targ_emul=elf32b4300 ;;
351 mips*vr5000el-*-elf*)   targ_emul=elf32l4300 ;;
352 mips*vr5000-*-elf*)     targ_emul=elf32b4300 ;;
353 mips*el-sde-elf*)       targ_emul=elf32ltsmip
354                         targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
355 mips*-sde-elf*)         targ_emul=elf32btsmip
356                         targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
357 mips*el-*-elf*)         targ_emul=elf32elmip ;;
358 mips*-*-elf*)           targ_emul=elf32ebmip ;;
359 mips*-*-rtems*)         targ_emul=elf32ebmip ;;
360 mips*el-*-vxworks*)     targ_emul=elf32elmipvxworks
361                         targ_extra_emuls="elf32ebmipvxworks" ;;
362 mips*-*-vxworks*)       targ_emul=elf32ebmipvxworks
363                         targ_extra_emuls="elf32elmipvxworks" ;;
364 mips*-*-windiss)        targ_emul=elf32mipswindiss ;;
365 mips64*el-*-linux-*)    targ_emul=elf32ltsmipn32
366                         targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
367                         targ_extra_libpath="elf32ltsmip elf64ltsmip" ;;
368 mips64*-*-linux-*)      targ_emul=elf32btsmipn32
369                         targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
370                         targ_extra_libpath="elf32btsmip elf64btsmip" ;;
371 mips*el-*-linux-*)      targ_emul=elf32ltsmip
372                         targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
373 mips*-*-linux-*)        targ_emul=elf32btsmip
374                         targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
375 mips*-*-lnews*)         targ_emul=mipslnews ;;
376 mips*-*-sysv4*)         targ_emul=elf32btsmip
377                         ;;
378 mmix-*-*)               targ_emul=mmo
379                         targ_extra_emuls=elf64mmix
380                         ;;
381 am33_2.0-*-linux*)      targ_emul=elf32am33lin ;;
382 mn10200-*-*)            targ_emul=mn10200 ;;
383 mn10300-*-*)            targ_emul=mn10300
384                         ;;
385 mt-*elf)                targ_emul=elf32mt
386                         ;;
387 msp430-*-*)             targ_emul=msp430x110
388                         targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449"
389                         ;;
390 ns32k-pc532-mach* | ns32k-pc532-ux*)  targ_emul=pc532macha ;;
391 ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
392                         ;;
393 openrisc-*-*)           targ_emul=elf32openrisc ;;
394 or32-*-coff)            targ_emul=or32 ;;
395 or32-*-elf)             targ_emul=or32elf ;;
396 or32-*-rtems*)          targ_emul=or32elf
397                         ;;
398 pdp11-*-*)              targ_emul=pdp11
399                         ;;
400 pjl*-*-*)               targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
401 pj*-*-*)                targ_emul=pjelf
402                         ;;
403 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
404                         targ_emul=elf32ppc_fbsd;
405                         targ_extra_emuls="elf32ppc elf32ppcsim";
406                         targ_extra_libpath=elf32ppc;
407                         tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
408 powerpc*-*-linux*)      case "${targ}" in
409                         *64*)   targ_emul=elf64ppc
410                                 targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
411                                 targ_extra_libpath="elf32ppclinux elf32ppc"
412                                 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
413                                 tdir_elf32ppclinux=$tdir_elf32ppc
414                                 tdir_elf32ppcsim=$tdir_elf32ppc
415                                 ;;
416                         *)      targ_emul=elf32ppclinux
417                                 targ_extra_emuls="elf32ppc elf32ppcsim"
418                                 targ_extra_libpath=elf32ppc
419                                 if test "${want64}" = "true"; then
420                                         targ_extra_emuls="$targ_extra_emuls elf64ppc"
421                                         targ_extra_libpath="$targ_extra_libpath elf64ppc"
422                                 fi ;;
423                         esac ;;
424 powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
425   | powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
426                        case "${targ}" in
427                        *64*)    targ_emul=elf64lppc
428                                 targ_extra_emuls="elf32lppc elf32lppcsim"
429                                 tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
430                                 tdir_elf32lppcsim=$tdir_elf32lppc
431                                 ;;
432                         *)      targ_emul=elf32lppc
433                                 targ_extra_emuls="elf32ppcsim" ;;
434                         esac ;;
435 powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
436   | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*)
437                        case "${targ}" in
438                        *64*)    targ_emul=elf64ppc
439                                 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
440                                 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
441                                 tdir_elf32ppclinux=$tdir_elf32ppc
442                                 tdir_elf32ppcsim=$tdir_elf32ppc
443                                 ;;
444                         *)      targ_emul=elf32ppc
445                                 targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
446                         esac ;;
447 powerpc-*-vxworks*)
448                         targ_emul=elf32ppcvxworks
449                         targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
450 powerpc-*-nto*)         targ_emul=elf32ppcnto ;;
451 powerpcle-*-nto*)       targ_emul=elf32lppcnto ;;
452 powerpc-*-rtems*)       targ_emul=elf32ppc ;;
453 powerpc-*-macos*)       targ_emul=ppcmacos ;;
454 powerpc-*-netware*)     targ_emul=ppcnw ;;
455 powerpcle-*-pe)         targ_emul=ppcpe ;;
456 powerpcle-*-winnt*)     targ_emul=ppcpe ;;
457 powerpcle-*-cygwin*)    targ_emul=ppcpe ;;
458 powerpc-*-aix5*)        targ_emul=aix5ppc ;;
459 powerpc-*-aix*)         targ_emul=aixppc ;;
460 powerpc-*-beos*)        targ_emul=aixppc ;;
461 powerpc-*-windiss*)     targ_emul=elf32ppcwindiss ;;
462 powerpc-*-lynxos*)      targ_emul=ppclynx ;;
463 rs6000-*-aix5*)         targ_emul=aix5rs6 ;;
464 rs6000-*-aix*)          targ_emul=aixrs6
465                         ;;
466 s390x-*-linux*)         targ_emul=elf64_s390
467                         targ_extra_emuls=elf_s390
468                         targ_extra_libpath=$targ_extra_emuls
469                         tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
470 s390x-*-tpf*)           targ_emul=elf64_s390
471                         tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
472 s390-*-linux*)          targ_emul=elf_s390
473                         if test "${want64}" = "true"; then
474                           targ_extra_emuls=elf64_s390
475                           targ_extra_libpath=$targ_extra_emuls
476                           tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
477                         fi
478                         ;;
479 score-*-elf)            targ_emul=scoreelf ;;
480 sh-*-linux*)            targ_emul=shlelf_linux
481                         targ_extra_emuls=shelf_linux
482                         targ_extra_libpath=shelf_linux ;;
483 sh64eb-*-linux*)        targ_emul=shelf32_linux
484                         targ_extra_emuls="shlelf32_linux" ;;
485 sh64-*-linux*)          targ_emul=shlelf32_linux
486                         targ_extra_emuls="shelf32_linux"
487                         targ_extra_libpath=shelf32_linux ;;
488 sh*eb-*-linux*)         targ_emul=shelf_linux ;;
489 sh*-*-linux*)           targ_emul=shlelf_linux ;;
490 sh5le-*-netbsd*)        targ_emul=shlelf32_nbsd
491                         targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
492 sh5-*-netbsd*)          targ_emul=shelf32_nbsd
493                         targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
494 sh64le-*-netbsd*)       targ_emul=shlelf64_nbsd
495                         targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
496 sh64-*-netbsd*)         targ_emul=shelf64_nbsd
497                         targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
498 sh*l*-*-netbsdelf*)     targ_emul=shlelf_nbsd
499                         targ_extra_emuls=shelf_nbsd ;;
500 sh*-*-netbsdelf*)       targ_emul=shelf_nbsd
501                         targ_extra_emuls=shlelf_nbsd ;;
502 sh*-*-symbianelf*)      targ_emul=shlsymbian ;;
503 shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
504                         targ_emul=shlelf
505                         targ_extra_emuls="shelf shl sh" ;;
506 sh-*-rtemscoff*)        targ_emul=sh; targ_extra_emuls=shl ;;
507 sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
508                         targ_emul=shelf
509                         targ_extra_emuls="shlelf sh shl" ;;
510 sh-*-vxworks)           targ_emul=shelf_vxworks
511                         targ_extra_emuls=shlelf_vxworks ;;
512 sh-*-nto*)              targ_emul=shelf_nto
513                         targ_extra_emuls=shlelf_nto ;;
514 sh-*-pe)                targ_emul=shpe ;
515                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
516 sh-*-*)                 targ_emul=sh; targ_extra_emuls=shl ;;
517 sh64le-*-elf*)          targ_emul=shlelf
518                         targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
519                         targ_extra_libpath=$targ_extra_emuls ;;
520 sh64-*-elf*)            targ_emul=shelf
521                         targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
522                         targ_extra_libpath=$targ_extra_emuls ;;
523 sparc64-*-aout*)        targ_emul=sparcaout ;;
524 sparc64-*-elf*)         targ_emul=elf64_sparc ;;
525 sparc-sun-sunos4*)      targ_emul=sun4 ;;
526 sparclite*-*-elf)       targ_emul=elf32_sparc ;;
527 sparclite*-*-coff)      targ_emul=coff_sparc ;;
528 sparclite*-fujitsu-*)   targ_emul=sparcaout ;;
529 sparc*-*-aout)          targ_emul=sparcaout ;;
530 sparc*-*-coff)          targ_emul=coff_sparc ;;
531 sparc*-*-elf)           targ_emul=elf32_sparc ;;
532 sparc*-*-sysv4*)        targ_emul=elf32_sparc ;;
533 sparc*-*-vxworks*)      targ_emul=elf32_sparc_vxworks ;;
534 sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
535                         targ_emul=elf64_sparc_fbsd
536                         targ_extra_emuls="elf64_sparc elf32_sparc"
537                         targ_extra_libpath=$targ_extra_emuls
538                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
539 sparc*-*-linux*aout*)   targ_emul=sparclinux
540                         targ_extra_emuls="elf32_sparc sun4"
541                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
542                         tdir_sun4=sparc-sun-sunos4 ;;
543 sparc64-*-linux-*)      targ_emul=elf64_sparc
544                         targ_extra_emuls="elf32_sparc sparclinux sun4"
545                         targ_extra_libpath=elf32_sparc
546                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
547                         tdir_sparclinux=${tdir_elf32_sparc}aout
548                         tdir_sun4=sparc-sun-sunos4 ;;
549 sparc*-*-linux-*)       targ_emul=elf32_sparc
550                         targ_extra_emuls="sparclinux elf64_sparc sun4"
551                         targ_extra_libpath=elf64_sparc
552                         tdir_sparclinux=${targ_alias}aout
553                         tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
554                         tdir_sun4=sparc-sun-sunos4 ;;
555 sparc64-*-netbsd* | sparc64-*-openbsd*)
556                         targ_emul=elf64_sparc
557                         targ_extra_emuls="elf32_sparc" ;;
558 sparc*-*-netbsd*elf*)   targ_emul=elf32_sparc ;;
559 sparc*-*-netbsd*)       targ_emul=sparcnbsd ;;
560 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
561                         targ_emul=elf32_sparc ;;
562 sparc-*-solaris2*)      targ_emul=elf32_sparc
563                         targ_extra_emuls="elf64_sparc"
564                         targ_extra_libpath=$targ_extra_emuls
565                         tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
566 sparcv9-*-solaris2* | sparc64-*-solaris2*)
567                         targ_emul=elf64_sparc
568                         targ_extra_emuls="elf32_sparc"
569                         targ_extra_libpath=$targ_extra_emuls
570                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
571 sparc*-*-solaris2*)     targ_emul=elf32_sparc ;;
572 sparc*-wrs-vxworks*)    targ_emul=sparcaout ;;
573 sparc*-*-rtems*)        targ_emul=elf32_sparc
574                         ;;
575 spu-*-elf*)             targ_emul=elf32_spu
576                         targ_extra_ofiles="spu_inc.o" ;;
577 tic30-*-*aout*)         targ_emul=tic30aout ;;
578 tic30-*-*coff*)         targ_emul=tic30coff ;;
579 tic4x-*-* | c4x-*-*)    targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
580 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
581 tic80-*-*)              targ_emul=tic80coff
582                         ;;
583 v850-*-*)               targ_emul=v850 ;;
584 v850e-*-*)              targ_emul=v850 ;;
585 v850ea-*-*)             targ_emul=v850
586                         ;;
587 vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
588 vax-*-netbsdelf*)       targ_emul=elf32vax
589                         targ_extra_emuls=vaxnbsd ;;
590 vax-*-netbsdaout* | vax-*-netbsd*)
591                         targ_emul=vaxnbsd
592                         targ_extra_emuls=elf32vax ;;
593 vax-*-linux-*)          targ_emul=elf32vax
594                         ;;
595 w65-*-*)                targ_emul=w65
596                         ;;
597 xc16x-*-elf)            targ_emul=elf32xc16x 
598                         targ_extra_emuls="elf32xc16xl elf32xc16xs"
599                         ;;
600 xstormy16-*-*)          targ_emul=elf32xstormy16
601                         ;;
602 xtensa-*-*)             targ_emul=elf32xtensa
603                         ;;
604 z80-*-coff)             targ_emul=z80
605                         ;;
606 z8k-*-coff)             targ_emul=z8002; targ_extra_emuls=z8001
607                         ;;
608 *-*-ieee*)              targ_emul=vanilla
609                         ;;
610 *-tandem-none)          targ_emul=st2000
611                         ;;
613   echo 2>&1 "*** ld does not support target ${targ}"
614   echo 2>&1 "*** see ld/configure.tgt for supported targets"
615   exit 1
617 esac
619 NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
620 case "${target}" in
622 *-*-freebsd*)
623   NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
624   ;;
626 hppa*64*-*-hpux11*)
627   NATIVE_LIB_DIRS=/usr/lib/pa20_64
628   ;;
630 i[3-7]86-*-sysv4*)
631   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
632   ;;
634 i[3-7]86-*-solaris*)
635   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
636   ;;
638 i[3-7]86-pc-interix*)
639   NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
640   ;;
642 ia64-*-aix*)
643   NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
644   ;;
646 sparc*-*-solaris2*)
647   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
648   ;;
650 spu-*-elf*)
651   # This allows to build a pair of PPU/SPU toolchains with common sysroot.
652   NATIVE_LIB_DIRS='/usr/spu/lib'
653   ;;
655 i[03-9x]86-*-cygwin*)
656   NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
657   ;;
659 *-*-linux*)
660   ;;
662 *-*-freebsd*)
663   ;;
665 *-*-netbsd*)
666   ;;
668 alpha*-*-*)
669   NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
670   ;;
672 esac