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