3 # Copyright (C) 2013-2023 Free Software Foundation, Inc.
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # 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
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)
39 targ_extra_ofiles="ldelf.o ldelfgen.o"
43 # By default the linker will generate warnings if it is creating an
44 # executable stack or a segment with all three of read, write and
45 # execute permissions. These settings are not appropriate for all
46 # targets however, so we can change them here:
48 if test "${ac_default_ld_warn_rwx_segments}" = unset; then
50 # The CRIS and V850 default linker scripts yields just one segment
51 # as intended, so a rwx segment warning is not helpful.
52 # The HPPA's and SPARC's PLT sections use a constructed trampoline
53 # hence it needs to have a RWX segment.
54 # Many MIPS targets use executable segments.
55 cris-*-* | crisv32-*-* | \
61 ac_default_ld_warn_rwx_segments=0
68 if test "${ac_default_ld_warn_execstack}" = 2; then
70 # The HPPA port needs to support older kernels that
71 # use executable stacks for signals and syscalls.
72 # Many MIPS targets use executable stacks.
75 ac_default_ld_warn_execstack=0
82 # Please try to keep this table more or less in alphabetic order - it
83 # makes it much easier to lookup a specific archictecture.
85 aarch64_be-*-elf) targ_emul=aarch64elfb
86 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf"
88 aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*)
90 targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
92 aarch64-*-cloudabi*) targ_emul=aarch64cloudabi
93 targ_extra_emuls=aarch64cloudabib
95 aarch64-*-freebsd*) targ_emul=aarch64fbsd
96 targ_extra_emuls="aarch64fbsdb aarch64elf"
98 aarch64-*-fuchsia*) targ_emul=aarch64elf
99 targ_extra_emuls="aarch64elfb armelf armelfb"
101 aarch64_be-*-linux-gnu_ilp32)
102 targ_emul=aarch64linux32b
103 targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
104 targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath"
106 aarch64-*-linux-gnu_ilp32)
107 targ_emul=aarch64linux32
108 targ_extra_libpath="aarch64linux aarch64linuxb aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
109 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath"
111 aarch64_be-*-linux*) targ_emul=aarch64linuxb
112 targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
113 targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath"
115 aarch64-*-linux*) targ_emul=aarch64linux
116 targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
117 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath"
119 aarch64-*-haiku*) targ_emul=aarch64haiku
120 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath"
122 aarch64-*-nto*) targ_emul=aarch64nto
123 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
125 aarch64-*-pe* | aarch64-*-mingw*)
127 targ_extra_emuls="arm64pe"
128 targ_extra_ofiles="deffilep.o pep-dll-aarch64.o pe-dll.o pdb.o"
130 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
131 targ_emul=elf64alpha_fbsd
132 targ_extra_emuls="elf64alpha alpha"
133 tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
135 alpha*-*-linux*ecoff*) targ_emul=alpha
136 targ_extra_emuls=elf64alpha
137 tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
139 alpha*-*-linux-*) targ_emul=elf64alpha
140 targ_extra_emuls=alpha
141 tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'`
143 alpha*-*-osf*) targ_emul=alpha
146 alpha*-*-gnu*) targ_emul=elf64alpha
148 alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd
150 alpha*-*-openbsd*) targ_emul=elf64alpha
152 alpha*-*-*vms*) targ_emul=alphavms
155 am33_2.0-*-linux*) targ_emul=elf32am33lin # mn10300 variant
157 arc*-*-elf*) targ_emul=arcelf
158 targ_extra_emuls="arclinux arclinux_nps arcv2elf arcv2elfx"
160 arc*-*-linux*) case "${with_cpu}" in
161 nps400) targ_emul=arclinux_nps
162 targ_extra_emuls=arclinux
164 *) targ_emul=arclinux
165 targ_extra_emuls=arclinux_nps
168 targ_extra_emuls="${targ_extra_emuls} arcelf arcv2elf arcv2elfx"
170 arm*-*-cegcc*) targ_emul=arm_wince_pe
171 targ_extra_ofiles="deffilep.o pe-dll.o"
172 LIB_PATH='${tooldir}/lib/w32api'
174 arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*)
175 targ_emul=arm_wince_pe
176 targ_extra_ofiles="deffilep.o pe-dll.o"
178 arm-*-pe) targ_emul=armpe
179 targ_extra_ofiles="deffilep.o pe-dll.o"
181 arm*b-*-freebsd*) targ_emul=armelfb_fbsd
182 targ_extra_emuls="armelf_fbsd armelf"
184 arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
185 targ_emul=armelf_fbsd
186 targ_extra_emuls="armelfb_fbsd armelf"
188 armeb-*-netbsd*) targ_emul=armelfb_nbsd;
189 targ_extra_emuls="armelf_nbsd armelf"
191 arm-*-netbsd*) targ_emul=armelf_nbsd;
192 targ_extra_emuls="armelfb_nbsd armelf"
194 arm-*-nto*) targ_emul=armnto
196 arm-*-phoenix*) targ_emul=armelf
198 armeb-*-elf | armeb-*-eabi*)
201 arm-*-elf | arm*-*-eabi* | arm-*-rtems* | arm-*-genode*)
204 arm-*-kaos*) targ_emul=armelf
206 arm9e-*-elf) targ_emul=armelf
208 arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
209 targ_extra_emuls=armelf_linux_eabi
210 targ_extra_libpath=$targ_extra_emuls
212 arm*b-*-linux-*) targ_emul=armelfb_linux
213 targ_extra_emuls="armelfb armelf armelf_linux"
214 targ_extra_libpath="armelf_linux"
216 arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
217 targ_extra_emuls="armelfb_linux_eabi"
218 targ_extra_libpath=$targ_extra_emuls
220 arm*-*-uclinuxfdpiceabi)
221 targ_emul=armelf_linux_eabi
222 targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi"
223 targ_extra_libpath=$targ_extra_emuls
225 arm*-*-linux-*) targ_emul=armelf_linux
226 targ_extra_emuls="armelf armelfb armelfb_linux"
227 targ_extra_libpath="armelfb_linux"
229 arm*b-*-nacl*) targ_emul=armelfb_nacl
230 targ_extra_emuls="armelf_nacl"
231 targ_extra_libpath=$targ_extra_emuls
233 arm*-*-nacl*) targ_emul=armelf_nacl
234 targ_extra_emuls="armelfb_nacl"
235 targ_extra_libpath=$targ_extra_emuls
237 arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi
238 targ_extra_emuls=armelfb_linux_eabi
239 targ_extra_libpath=$targ_extra_emuls
241 arm*-*-uclinux*) targ_emul=armelf_linux
242 targ_extra_emuls="armelf armelfb armelfb_linux"
243 targ_extra_libpath="armelfb_linux"
245 arm-*-vxworks) targ_emul=armelf_vxworks
247 arm*-*-conix*) targ_emul=armelf
249 arm*-*-fuchsia*) targ_emul=armelf_fuchsia
250 targ_extra_emuls="armelfb_fuchsia armelf armelfb"
252 arm*-*-haiku*) targ_emul=armelf_haiku
253 targ_extra_emuls=armelf
255 avr-*-*) targ_emul=avr2
256 targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega2_flmap avrxmega3 avrxmega4 avrxmega4_flmap avrxmega5 avrxmega6 avrxmega7 avrtiny"
258 bfin-*-elf | bfin-*-rtems*)
260 targ_extra_emuls="elf32bfinfd"
261 targ_extra_libpath=$targ_extra_emuls
263 bfin-*-uclinux*) targ_emul=elf32bfin;
264 targ_extra_emuls="elf32bfinfd"
265 targ_extra_libpath=$targ_extra_emuls
267 bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
268 targ_extra_emuls="elf32bfin"
269 targ_extra_libpath=$targ_extra_emuls
271 bpf-*-*) targ_emul=elf64bpf
273 cr16-*-elf*) targ_emul=elf32cr16
275 cris-*-*aout*) targ_emul=crisaout
276 targ_extra_emuls="criself crislinux"
277 targ_extra_libpath=$targ_extra_emuls
279 cris-*-linux-* | crisv32-*-linux-*)
282 cris-*-* | crisv32-*-*) targ_emul=criself
283 targ_extra_emuls="crisaout crislinux"
284 targ_extra_libpath=$targ_extra_emuls
286 crx-*-elf*) targ_emul=elf32crx
289 csky-*-elf*) targ_emul=cskyelf
291 csky-*-linux*) targ_emul=cskyelf_linux
294 d10v-*-*) targ_emul=d10velf
296 d30v-*-*ext*) targ_emul=d30v_e
297 targ_extra_emuls="d30velf d30v_o"
298 targ_extra_ofiles=ldelfgen.o
300 d30v-*-*onchip*) targ_emul=d30v_o
301 targ_extra_emuls="d30velf d30v_e"
302 targ_extra_ofiles=ldelfgen.o
304 d30v-*-*) targ_emul=d30velf
305 targ_extra_emuls="d30v_e d30v_o"
306 targ_extra_ofiles=ldelfgen.o
308 dlx-*-elf*) targ_emul=elf32_dlx
309 targ_extra_ofiles=ldelfgen.o
311 epiphany-*-*) targ_emul=elf32epiphany
312 targ_extra_emuls="elf32epiphany_4x4"
314 fido*-*-elf*) targ_emul=m68kelf
316 fr30-*-*) targ_emul=elf32fr30
317 targ_extra_ofiles=ldelfgen.o
319 frv-*-*linux*) targ_emul=elf32frvfd
321 frv-*-*) targ_emul=elf32frv
322 targ_extra_emuls="elf32frvfd"
324 ft32-*-*) targ_emul=elf32ft32
325 targ_extra_ofiles=ldelfgen.o
327 h8300-*-elf* | h8300-*-rtems*)
329 targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
332 targ_emul=h8300elf_linux;
333 targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux"
335 hppa*64*-*-linux-*) targ_emul=hppa64linux
337 hppa*64*-hpux*) targ_emul=elf64hppa
339 hppa*-*-linux-*) targ_emul=hppalinux
341 hppa*-*-*elf*) targ_emul=hppaelf
343 hppa*-*-lites*) targ_emul=hppaelf
345 hppa*-*-netbsd*) targ_emul=hppanbsd
347 hppa*-*-openbsd*) targ_emul=hppaobsd
349 i[3-7]86-*-nto-qnx*) targ_emul=i386nto
351 i[3-7]86-*-go32) targ_emul=i386go32
354 i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32
357 i[3-7]86-*-lynxos*) targ_emul=i386lynx
359 i[3-7]86-*-aros*) targ_emul=elf_i386
360 targ_extra_emuls=elf_iamcu
362 i[3-7]86-*-rdos*) targ_emul=elf_i386
363 targ_extra_emuls=elf_iamcu
365 i[3-7]86-*-bsd) targ_emul=i386bsd
368 i[3-7]86-*-bsd386) targ_emul=i386bsd
371 i[3-7]86-*-bsdi*) targ_emul=i386bsd
374 i[3-7]86-*-linux-*) targ_emul=elf_i386
375 targ_extra_emuls="elf_iamcu"
376 targ64_extra_emuls="elf_x86_64 elf32_x86_64"
377 targ64_extra_libpath="elf_x86_64 elf32_x86_64"
379 i[3-7]86-*-redox*) targ_emul=elf_i386
380 targ_extra_emuls=elf_x86_64
382 i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
383 targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64"
384 targ_extra_libpath=$targ_extra_emuls
386 i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
387 targ_extra_emuls="elf_i386"
388 targ_extra_libpath=$targ_extra_emuls
390 i[3-7]86-*-netbsd* | \
391 i[3-7]86-*-netbsd*-gnu* | \
392 i[3-7]86-*-knetbsd*-gnu | \
395 targ_extra_emuls="elf_iamcu"
397 i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
398 targ_extra_emuls=elf_i386
400 i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
402 targ_extra_emuls=elf_iamcu
404 i[3-7]86-*-dragonfly*) targ_emul=elf_i386
405 targ_extra_emuls="elf_iamcu i386bsd"
407 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
408 targ_emul=elf_i386_fbsd
409 targ_extra_emuls="elf_i386 elf_iamcu i386bsd"
411 i[3-7]86-*-gnu*) targ_emul=elf_i386
412 targ_extra_emuls=elf_iamcu
414 i[3-7]86-*-msdos*) targ_emul=i386msdos
415 targ_extra_emuls=i386aout
418 i[3-7]86-*-moss*) targ_emul=i386moss
419 targ_extra_emuls=i386msdos
421 i[3-7]86-*-winnt*) targ_emul=i386pe ;
422 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
424 i[3-7]86-*-pe) targ_emul=i386pe ;
425 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
427 i[3-7]86-*-cygwin*) targ_emul=i386pe ;
428 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o" ;
429 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
431 i[3-7]86-*-mingw32*) targ_emul=i386pe ;
432 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
434 i[3-7]86-*-interix*) targ_emul=i386pe_posix;
435 targ_extra_ofiles="deffilep.o pe-dll.o"
437 i[3-7]86-*-beospe*) targ_emul=i386beos
440 i[3-7]86-*-beos*) targ_emul=elf_i386_be
442 i[3-7]86-*-haiku*) targ_emul=elf_i386_haiku
444 i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks
446 i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
448 ia16-*-elf*) targ_emul=elf_i386
449 targ_extra_emuls=i386msdos
451 ia64-*-elf*) targ_emul=elf64_ia64
453 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
454 targ_emul=elf64_ia64_fbsd
455 targ_extra_emuls="elf64_ia64"
457 ia64-*-netbsd*) targ_emul=elf64_ia64
459 ia64-*-linux*) targ_emul=elf64_ia64
461 ia64-*-*vms*) targ_emul=elf64_ia64_vms
462 targ_extra_ofiles=ldelfgen.o
464 ia64-*-aix*) targ_emul=elf64_aix
466 ip2k-*-elf) targ_emul=elf32ip2k
468 iq2000-*-elf) targ_emul=elf32iq2000
469 targ_extra_emuls="elf32iq10"
470 targ_extra_ofiles=ldelfgen.o
472 lm32-*-*linux*) targ_emul=elf32lm32fd
474 lm32-*-*) targ_emul=elf32lm32
475 targ_extra_emuls="elf32lm32fd"
477 kvx-*-linux*) targ_emul=elf64kvx_linux
478 targ_extra_emuls="elf64kvx"
480 kvx-*-*) targ_emul=elf64kvx;
481 targ_extra_emuls="elf64kvx_linux elf32kvx"
486 m32r*le-*-elf*) targ_emul=m32rlelf
491 m32r*le-*-linux-*) targ_emul=m32rlelf_linux
493 m32r*-*-linux-*) targ_emul=m32relf_linux
495 m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
496 targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb"
498 m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
499 targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb"
501 m68*-*-netbsd*) targ_emul=m68kelfnbsd
503 m68*-*-haiku*) targ_emul=m68kelf
505 m68*-*-*) targ_emul=m68kelf
507 mcore-*-pe) targ_emul=mcorepe ;
508 targ_extra_ofiles="deffilep.o pe-dll.o"
510 mcore-*-elf) targ_emul=elf32mcore
512 mep-*-elf) targ_emul=elf32mep
514 metag-*-*) targ_emul=elf32metag
516 microblazeel*-linux*) targ_emul="elf32mbel_linux"
517 targ_extra_emuls="elf32mb_linux"
519 microblaze*-linux*) targ_emul="elf32mb_linux"
520 targ_extra_emuls="elf32mbel_linux"
522 microblazeel*) targ_emul=elf32microblazeel
523 targ_extra_emuls=elf32microblaze
525 microblaze*) targ_emul=elf32microblaze
526 targ_extra_emuls=elf32microblazeel
528 mips*-sgi-irix5*) targ_emul=elf32bsmip
530 mips*-sgi-irix6*) targ_emul=elf32bmipn32
531 targ_extra_emuls="elf32bsmip elf64bmip"
532 targ_extra_libpath=$targ_extra_emuls
534 mips*el-*-haiku*) targ_emul=elf_mipsel_haiku
535 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
537 mips*el-*-netbsd*) targ_emul=elf32ltsmip
538 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
540 mips*-*-netbsd*) targ_emul=elf32btsmip
541 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
543 mips64el-*-openbsd*) targ_emul=elf64ltsmip
544 targ_extra_emuls=elf64btsmip
546 mips64-*-openbsd*) targ_emul=elf64btsmip
547 targ_extra_emuls=elf64ltsmip
549 mips*vr4300el-*-elf*) targ_emul=elf32l4300
551 mips*vr4300-*-elf*) targ_emul=elf32b4300
553 mips*vr4100el-*-elf*) targ_emul=elf32l4300
555 mips*vr4100-*-elf*) targ_emul=elf32b4300
557 mips*vr5000el-*-elf*) targ_emul=elf32l4300
559 mips*vr5000-*-elf*) targ_emul=elf32b4300
561 mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
562 targ_emul=elf32ltsmip
563 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
565 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
566 targ_emul=elf32btsmip
567 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
569 mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
570 targ_extra_emuls="elf32lr5900"
571 targ_extra_libpath=$targ_extra_emuls
573 mips*el-ps2-elf*) targ_emul=elf32lr5900
574 targ_extra_emuls="elf32lr5900n32"
575 targ_extra_libpath=$targ_extra_emuls
577 mips*el-*-elf*) targ_emul=elf32elmip
579 mips*-*-elf* | mips*-*-rtems*)
582 mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
583 targ_extra_emuls="elf32ebmipvxworks"
585 mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
586 targ_extra_emuls="elf32elmipvxworks"
588 mips*-*-windiss) targ_emul=elf32mipswindiss
590 mips64*el-*-linux-gnuabi64)
591 targ_emul=elf64ltsmip
592 targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
593 targ_extra_libpath=$targ_extra_emuls
595 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
596 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
597 targ_extra_libpath=$targ_extra_emuls
599 mips64*-*-linux-gnuabi64)
600 targ_emul=elf64btsmip
601 targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
602 targ_extra_libpath=$targ_extra_emuls
604 mips64*-*-linux-*) targ_emul=elf32btsmipn32
605 targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
606 targ_extra_libpath=$targ_extra_emuls
608 mips*el-*-linux-*) targ_emul=elf32ltsmip
609 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
610 targ_extra_libpath=$targ_extra_emuls
612 mips*-*-linux-*) targ_emul=elf32btsmip
613 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
614 targ_extra_libpath=$targ_extra_emuls
616 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
617 targ_emul=elf32ltsmipn32_fbsd
618 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
619 targ_extra_libpath=$targ_extra_emuls
621 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
622 targ_emul=elf32btsmipn32_fbsd
623 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
624 targ_extra_libpath=$targ_extra_emuls
626 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
627 targ_emul=elf32ltsmip_fbsd
628 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
629 targ_extra_libpath=$targ_extra_emuls
631 mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
632 targ_emul=elf32btsmip_fbsd
633 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
634 targ_extra_libpath=$targ_extra_emuls
636 mips*-*-sysv4*) targ_emul=elf32btsmip
638 mmix-*-*) targ_emul=mmo
639 targ_extra_emuls=elf64mmix
641 mn10200-*-*) targ_emul=mn10200
642 targ_extra_ofiles=ldelfgen.o
644 mn10300-*-*) targ_emul=mn10300
646 moxie-*-moxiebox*) targ_emul=moxiebox
647 targ_extra_ofiles=ldelfgen.o
649 moxie-*-*) targ_emul=elf32moxie
651 msp430-*-*) targ_emul=msp430elf
652 targ_extra_emuls="msp430X"
653 targ_extra_ofiles=ldelfgen.o
655 mt-*elf) targ_emul=elf32mt
656 targ_extra_ofiles=ldelfgen.o
658 nds32*le-*-elf*) targ_emul=nds32elf
659 targ_extra_emuls="nds32elf16m nds32belf nds32belf16m"
661 nds32*be-*-elf*) targ_emul=nds32belf
662 targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
664 nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux
666 nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux
668 nios2*-*-linux*) targ_emul=nios2linux
670 nios2*-*-*) targ_emul=nios2elf
672 ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha
675 ns32k-*-*bsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
678 or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*)
681 or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux
683 pdp11-*-*) targ_emul=pdp11
686 pjl*-*-*) targ_emul=pjlelf
687 targ_extra_emuls="elf_i386 elf_iamcu"
689 pj*-*-*) targ_emul=pjelf
690 targ_extra_ofiles=ldelfgen.o
692 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
693 targ_emul=elf32ppc_fbsd
694 targ_extra_emuls="elf32ppc elf32ppcsim"
695 targ_extra_libpath=elf32ppc;
696 tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
698 powerpc64-*-freebsd*)
699 targ_emul=elf64ppc_fbsd
700 targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
701 targ_extra_libpath="elf32ppc_fbsd elf32ppc"
702 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
703 tdir_elf32ppc_fbsd=$tdir_elf32ppc
705 powerpc64le-*-freebsd*)
706 targ_emul=elf64lppc_fbsd
707 targ_extra_emuls="elf64lppc"
710 targ_emul=elf32ppcvxworks
711 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
713 powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
714 | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
715 | powerpc*-*-rtems* \
716 | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
720 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
721 targ_extra_libpath="elf32ppc elf32ppclinux" ;;
723 targ_emul=elf32ppclinux
724 targ_extra_emuls="elf32ppc elf32ppcsim"
725 targ_extra_libpath=elf32ppc
726 targ64_extra_emuls=elf64ppc
727 targ64_extra_libpath=elf64ppc ;;
730 targ_extra_emuls="elf32ppclinux elf32ppcsim"
731 targ_extra_libpath=elf32ppclinux
732 targ64_extra_emuls=elf64ppc
733 targ64_extra_libpath=elf64ppc ;;
739 powerpcle-* | powerpc64le-*)
740 for z in td td64 targ_emul targ_extra_emuls \
741 targ_extra_libpath targ64_extra_emuls \
744 eval ${z}=\"\`echo \$${z} \| sed -e $s\`\"
748 # Why oh why did we set tooldir based on target_alias
749 # rather than on target?
750 eval tdir_${targ_emul}="${targ_alias}"
751 cpu=`echo "${targ_alias}" | sed -e 's/-.*//'`
752 rest=`echo "${targ_alias}" | sed -e 's/^[^-]*//'`
757 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
758 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}'/;s/be64$/64be/'`"${rest}"
759 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
760 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
761 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
762 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
763 # Now provide the other endian
764 for z in targ_extra_emuls targ_extra_libpath
766 eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\"
768 for z in targ64_extra_emuls targ64_extra_libpath
770 eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\"
772 td=`echo "${td}" | sed -e $s`
773 td64=`echo "${td64}" | sed -e $s`
775 powerpcle-* | powerpc64le-*)
776 cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;;
778 cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;;
780 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
781 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}/`"${rest}"
782 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
783 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
784 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
785 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
787 powerpc-*-nto*) targ_emul=elf32ppcnto
789 powerpcle-*-nto*) targ_emul=elf32lppcnto
791 powerpc-*-macos*) targ_emul=ppcmacos
794 powerpc-*-aix[5-9]*) targ_emul=aix5ppc
797 powerpc-*-aix*) targ_emul=aixppc
800 powerpc-*-beos*) targ_emul=aixppc
803 powerpc-*-haiku*) targ_emul=elf32ppchaiku
805 powerpc-*-windiss*) targ_emul=elf32ppcwindiss
807 pru*-*-*) targ_emul=pruelf
809 riscv32be*-*-linux*) targ_emul=elf32briscv
810 targ_extra_emuls="elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64"
811 targ_extra_libpath=$targ_extra_emuls
813 riscv32*-*-linux*) targ_emul=elf32lriscv
814 targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64"
815 targ_extra_libpath=$targ_extra_emuls
817 riscvbe-*-* | riscv32be*-*-*)
818 targ_emul=elf32briscv
819 targ_extra_emuls="elf64briscv elf32lriscv elf64lriscv"
820 targ_extra_libpath=$targ_extra_emuls
822 riscv-*-* | riscv32*-*-*)
823 targ_emul=elf32lriscv
824 targ_extra_emuls="elf64lriscv elf32briscv elf64briscv"
825 targ_extra_libpath=$targ_extra_emuls
827 riscv64be*-*-linux*) targ_emul=elf64briscv
828 targ_extra_emuls="elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32"
829 targ_extra_libpath=$targ_extra_emuls
831 riscv64*-*-linux*) targ_emul=elf64lriscv
832 targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32"
833 targ_extra_libpath=$targ_extra_emuls
835 riscv64be*-*-*) targ_emul=elf64briscv
836 targ_extra_emuls="elf32briscv elf64lriscv elf32lriscv"
837 targ_extra_libpath=$targ_extra_emuls
839 riscv64*-*-*) targ_emul=elf64lriscv
840 targ_extra_emuls="elf32lriscv elf64briscv elf32briscv"
841 targ_extra_libpath=$targ_extra_emuls
843 rs6000-*-aix[5-9]*) targ_emul=aix5rs6
846 rs6000-*-aix*) targ_emul=aixrs6
849 rl78-*-*) targ_emul=elf32rl78
851 rx-*-linux*) targ_emul=elf32rx_linux
853 rx-*-*) targ_emul=elf32rx
855 s12z-*-*) targ_emul=m9s12zelf
856 targ_extra_ofiles=ldelfgen.o
858 s390x-*-linux*) targ_emul=elf64_s390
859 targ_extra_emuls=elf_s390
860 targ_extra_libpath=$targ_extra_emuls
861 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
863 s390x-*-tpf*) targ_emul=elf64_s390
864 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
866 s390-*-linux*) targ_emul=elf_s390
867 targ64_extra_emuls=elf64_s390
868 targ64_extra_libpath=elf64_s390
869 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
871 score-*-elf) targ_emul=score7_elf
872 targ_extra_emuls=score3_elf
874 sh-*-linux*) targ_emul=shlelf_linux
875 targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
876 targ_extra_libpath=shelf_linux
878 sh*eb-*-linux*) targ_emul=shelf_linux
879 targ_extra_emuls="shelf_fd"
881 sh*-*-linux*) targ_emul=shlelf_linux
882 targ_extra_emuls="shlelf_fd"
884 sh*l*-*-netbsd*) targ_emul=shlelf_nbsd
885 targ_extra_emuls=shelf_nbsd
887 sh*-*-netbsd*) targ_emul=shelf_nbsd
888 targ_extra_emuls=shlelf_nbsd
890 shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
892 targ_extra_emuls="shelf shl sh"
894 sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
896 targ_extra_emuls="shlelf sh shl"
898 sh-*-uclinux* | sh[12]-*-uclinux*)
899 targ_emul=shelf_uclinux
900 targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd"
902 sh-*-vxworks) targ_emul=shelf_vxworks
903 targ_extra_emuls=shlelf_vxworks
905 sh-*-nto*) targ_emul=shelf_nto
906 targ_extra_emuls=shlelf_nto
908 sh-*-pe) targ_emul=shpe ;
909 targ_extra_ofiles="deffilep.o pe-dll.o"
911 sh-*-*) targ_emul=sh;
915 sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
916 targ_emul=elf64_sparc_fbsd
917 targ_extra_emuls="elf64_sparc elf32_sparc"
918 targ_extra_libpath=$targ_extra_emuls
919 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
921 sparc64-*-linux-*) targ_emul=elf64_sparc
922 targ_extra_emuls="elf32_sparc"
923 targ_extra_libpath=elf32_sparc
924 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
926 sparc64-*-*bsd*) targ_emul=elf64_sparc
927 targ_extra_emuls="elf32_sparc"
929 sparc64-*-solaris2* | sparcv9-*-solaris2*)
930 targ_emul=elf64_sparc_sol2
931 targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc"
932 targ_extra_libpath=$targ_extra_emuls
933 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
935 sparc64-*-haiku*) targ_emul=elf64_sparc
937 sparc64-*-*) targ_emul=elf64_sparc
939 sparc*-*-linux-*) targ_emul=elf32_sparc
940 targ_extra_emuls="elf64_sparc"
941 targ_extra_libpath=elf64_sparc
942 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
944 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
945 targ_emul=elf32_sparc_sol2
946 targ_extra_emuls=elf32_sparc
948 sparc-*-solaris2*) targ_emul=elf32_sparc_sol2
949 targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc"
950 targ_extra_libpath=$targ_extra_emuls
951 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
953 sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks
955 sparc*-*-*) targ_emul=elf32_sparc
957 spu-*-elf*) targ_emul=elf32_spu
959 tic30-*-*coff*) targ_emul=tic30coff
962 tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff
963 targ_extra_emuls="tic3xcoff tic3xcoff_onchip"
966 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff
969 tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
970 targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
971 targ_extra_libpath=$targ_extra_emuls
973 tic6x-*-uclinux) targ_emul=elf32_tic6x_linux_le
974 targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be"
975 targ_extra_libpath=$targ_extra_emuls
977 tilegx-*-*) targ_emul=elf64tilegx
978 targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be"
979 targ_extra_libpath=$targ_extra_emuls
981 tilegxbe-*-*) targ_emul=elf64tilegx_be
982 targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be"
983 targ_extra_libpath=$targ_extra_emuls
985 tilepro-*-*) targ_emul=elf32tilepro
987 v850*-*-*) targ_emul=v850_rh850
988 targ_extra_emuls=v850
990 vax-*-netbsdaout*) targ_emul=vaxnbsd
991 targ_extra_emuls=elf32vax
993 vax-*-netbsd*) targ_emul=elf32vax
994 targ_extra_emuls=vaxnbsd
996 vax-*-linux-*) targ_emul=elf32vax
998 visium-*-elf) targ_emul=elf32visium
1000 x86_64-*-rdos*) targ_emul=elf64rdos
1002 x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi
1004 x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
1005 targ_extra_emuls="elf_x86_64 elf_i386_haiku"
1007 x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
1008 targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
1009 targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"
1010 tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1011 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1013 x86_64-*-linux-*) targ_emul=elf_x86_64
1014 targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu"
1015 targ_extra_libpath="elf_i386 elf32_x86_64"
1016 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1018 x86_64-*-redox*) targ_emul=elf_x86_64
1019 targ_extra_emuls=elf_i386
1021 x86_64-*-solaris2*) targ_emul=elf_x86_64_sol2
1022 targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu"
1023 targ_extra_libpath=$targ_extra_emuls
1024 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1026 x86_64-*-netbsd* | x86_64-*-openbsd*)
1027 targ_emul=elf_x86_64
1028 targ_extra_emuls="elf_i386 elf_iamcu"
1029 tdir_elf_iamcu=`echo ${targ_alias} | \
1030 sed -e 's/x86_64/i386/' -e 's/aout//'`
1031 tdir_elf_i386=`echo ${targ_alias} | \
1032 sed -e 's/x86_64/i386/' -e 's/aout//'`
1034 x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
1035 targ_emul=elf_x86_64
1036 targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
1037 targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
1038 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1040 x86_64-*-dragonfly*) targ_emul=elf_x86_64
1041 targ_extra_emuls="elf_i386 elf_iamcu"
1043 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
1044 targ_emul=elf_x86_64_fbsd
1045 targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu"
1046 targ_extra_libpath="elf_i386_fbsd"
1047 tdir_elf_i386_fbsd=`echo ${targ_alias} \
1048 | sed -e 's/x86_64/i386/'`
1049 tdir_elf_iamcu=`echo ${targ_alias} \
1050 | sed -e 's/x86_64/i386/'`
1051 tdir_elf_i386=`echo ${targ_alias} \
1052 | sed -e 's/x86_64/i386/'`
1054 x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
1055 targ_extra_emuls=i386pe ;
1056 targ_extra_ofiles="deffilep.o pdb.o pep-dll-x86_64.o pe-dll.o"
1058 x86_64-*-cygwin) targ_emul=i386pep ;
1059 targ_extra_emuls=i386pe
1060 targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
1061 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
1063 x86_64-*-mingw*) targ_emul=i386pep ;
1064 targ_extra_emuls=i386pe
1065 targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
1067 x86_64-*-gnu*) targ_emul=elf_x86_64
1068 targ_extra_emuls="elf32_x86_64 elf_iamcu elf_i386"
1069 targ_extra_libpath="elf_i386 elf32_x86_64"
1070 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1072 xgate-*-*) targ_emul=xgateelf
1073 targ_extra_ofiles=ldelfgen.o
1075 xstormy16-*-*) targ_emul=elf32xstormy16
1077 xtensa*-*-*) targ_emul=elf32xtensa
1079 z80-*-elf*) targ_emul=elf32z80
1080 targ_extra_ofiles="ldelf.o ldelfgen.o"
1082 z80-*-coff) targ_emul=z80
1085 z8k-*-coff) targ_emul=z8002
1086 targ_extra_emuls=z8001
1089 loongarch32-*) targ_emul=elf32loongarch
1091 loongarch64-*) targ_emul=elf64loongarch
1093 *-*-ieee*) targ_emul=vanilla
1097 echo 2>&1 "*** ld does not support target ${targ}"
1098 echo 2>&1 "*** see ld/configure.tgt for supported targets"
1103 NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
1107 NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
1111 NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
1115 NATIVE_LIB_DIRS=/usr/lib/pa20_64
1119 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1122 i[3-7]86-*-solaris*)
1123 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1126 i[3-7]86-pc-interix*)
1127 NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
1131 NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
1135 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1139 # This allows one to build a pair of PPU/SPU toolchains with common sysroot.
1140 NATIVE_LIB_DIRS='/lib'
1143 i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
1144 NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
1154 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1160 frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*)
1161 # Don't enable -z relro by default since many relro tests fail on these
1163 # FAIL: strip -z relro (relro1)
1164 # FAIL: strip -z relro -shared (relro1)
1165 # FAIL: objcopy -z relro (relro1)
1166 # FAIL: objcopy -z relro -shared (relro1)
1167 # FAIL: objcopy -z relro (tdata1)
1168 # FAIL: objcopy -shared -z relro (tdata1)
1169 # FAIL: objcopy -z relro (tdata2)
1170 # FAIL: objcopy -shared -z relro (tdata2)
1171 # FAIL: objcopy -z relro (tdata3)
1172 # FAIL: objcopy -shared -z relro (tdata3)
1173 # FAIL: objcopy -shared -z relro (tbss1)
1174 # FAIL: objcopy -shared -z relro (tbss2)
1175 # FAIL: objcopy -shared -z relro (tbss3)
1178 if test ${ac_default_ld_z_relro} = unset; then
1179 ac_default_ld_z_relro=1
1184 # Enable -z separate-code and --warn-textrel by default for Linux/x86.
1186 i[3-7]86-*-linux-* | x86_64-*-linux-*)
1187 if test ${ac_default_ld_z_separate_code} = unset; then
1188 ac_default_ld_z_separate_code=1
1190 if test ${ac_default_ld_textrel_check} = unset; then
1191 ac_default_ld_textrel_check=yes