3 # Copyright (C) 2013-2022 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 default linker script 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-*-* | \
59 ac_default_ld_warn_rwx_segments=0
66 if test "${ac_default_ld_warn_execstack}" = 2; then
68 # The HPPA port needs to support older kernels that
69 # use executable stacks for signals and syscalls.
70 # Many MIPS targets use executable stacks.
73 ac_default_ld_warn_execstack=0
80 # Please try to keep this table more or less in alphabetic order - it
81 # makes it much easier to lookup a specific archictecture.
83 aarch64_be-*-elf) targ_emul=aarch64elfb
84 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf"
86 aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*)
88 targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
90 aarch64-*-cloudabi*) targ_emul=aarch64cloudabi
91 targ_extra_emuls=aarch64cloudabib
93 aarch64-*-freebsd*) targ_emul=aarch64fbsd
94 targ_extra_emuls="aarch64fbsdb aarch64elf"
96 aarch64-*-fuchsia*) targ_emul=aarch64elf
97 targ_extra_emuls="aarch64elfb armelf armelfb"
99 aarch64_be-*-linux-gnu_ilp32)
100 targ_emul=aarch64linux32b
101 targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
102 targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath"
104 aarch64-*-linux-gnu_ilp32)
105 targ_emul=aarch64linux32
106 targ_extra_libpath="aarch64linux aarch64linuxb aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
107 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath"
109 aarch64_be-*-linux*) targ_emul=aarch64linuxb
110 targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
111 targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath"
113 aarch64-*-linux*) targ_emul=aarch64linux
114 targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
115 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath"
117 aarch64-*-haiku*) targ_emul=aarch64haiku
118 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath"
122 targ_extra_ofiles="deffilep.o pep-dll-aarch64.o"
124 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
125 targ_emul=elf64alpha_fbsd
126 targ_extra_emuls="elf64alpha alpha"
127 tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
129 alpha*-*-linux*ecoff*) targ_emul=alpha
130 targ_extra_emuls=elf64alpha
131 tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
133 alpha*-*-linux-*) targ_emul=elf64alpha
134 targ_extra_emuls=alpha
135 tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'`
137 alpha*-*-osf*) targ_emul=alpha
140 alpha*-*-gnu*) targ_emul=elf64alpha
142 alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd
144 alpha*-*-openbsd*) targ_emul=elf64alpha
146 alpha*-*-*vms*) targ_emul=alphavms
149 am33_2.0-*-linux*) targ_emul=elf32am33lin # mn10300 variant
151 arc*-*-elf*) targ_emul=arcelf
152 targ_extra_emuls="arclinux arclinux_nps arcv2elf arcv2elfx"
154 arc*-*-linux*) case "${with_cpu}" in
155 nps400) targ_emul=arclinux_nps
156 targ_extra_emuls=arclinux
158 *) targ_emul=arclinux
159 targ_extra_emuls=arclinux_nps
162 targ_extra_emuls="${targ_extra_emuls} arcelf arcv2elf arcv2elfx"
164 arm*-*-cegcc*) targ_emul=arm_wince_pe
165 targ_extra_ofiles="deffilep.o pe-dll.o"
166 LIB_PATH='${tooldir}/lib/w32api'
168 arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*)
169 targ_emul=arm_wince_pe
170 targ_extra_ofiles="deffilep.o pe-dll.o"
172 arm-*-pe) targ_emul=armpe
173 targ_extra_ofiles="deffilep.o pe-dll.o"
175 arm*b-*-freebsd*) targ_emul=armelfb_fbsd
176 targ_extra_emuls="armelf_fbsd armelf"
178 arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
179 targ_emul=armelf_fbsd
180 targ_extra_emuls="armelfb_fbsd armelf"
182 armeb-*-netbsd*) targ_emul=armelfb_nbsd;
183 targ_extra_emuls="armelf_nbsd armelf"
185 arm-*-netbsd*) targ_emul=armelf_nbsd;
186 targ_extra_emuls="armelfb_nbsd armelf"
188 arm-*-nto*) targ_emul=armnto
190 arm-*-phoenix*) targ_emul=armelf
192 armeb-*-elf | armeb-*-eabi*)
195 arm-*-elf | arm*-*-eabi* | arm-*-rtems* | arm-*-genode*)
198 arm-*-kaos*) targ_emul=armelf
200 arm9e-*-elf) targ_emul=armelf
202 arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
203 targ_extra_emuls=armelf_linux_eabi
204 targ_extra_libpath=$targ_extra_emuls
206 arm*b-*-linux-*) targ_emul=armelfb_linux
207 targ_extra_emuls="armelfb armelf armelf_linux"
208 targ_extra_libpath="armelf_linux"
210 arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
211 targ_extra_emuls="armelfb_linux_eabi"
212 targ_extra_libpath=$targ_extra_emuls
214 arm*-*-uclinuxfdpiceabi)
215 targ_emul=armelf_linux_eabi
216 targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi"
217 targ_extra_libpath=$targ_extra_emuls
219 arm*-*-linux-*) targ_emul=armelf_linux
220 targ_extra_emuls="armelf armelfb armelfb_linux"
221 targ_extra_libpath="armelfb_linux"
223 arm*b-*-nacl*) targ_emul=armelfb_nacl
224 targ_extra_emuls="armelf_nacl"
225 targ_extra_libpath=$targ_extra_emuls
227 arm*-*-nacl*) targ_emul=armelf_nacl
228 targ_extra_emuls="armelfb_nacl"
229 targ_extra_libpath=$targ_extra_emuls
231 arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi
232 targ_extra_emuls=armelfb_linux_eabi
233 targ_extra_libpath=$targ_extra_emuls
235 arm*-*-uclinux*) targ_emul=armelf_linux
236 targ_extra_emuls="armelf armelfb armelfb_linux"
237 targ_extra_libpath="armelfb_linux"
239 arm-*-vxworks) targ_emul=armelf_vxworks
241 arm*-*-conix*) targ_emul=armelf
243 arm*-*-fuchsia*) targ_emul=armelf_fuchsia
244 targ_extra_emuls="armelfb_fuchsia armelf armelfb"
246 arm*-*-haiku*) targ_emul=armelf_haiku
247 targ_extra_emuls=armelf
249 avr-*-*) targ_emul=avr2
250 targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
252 bfin-*-elf | bfin-*-rtems*)
254 targ_extra_emuls="elf32bfinfd"
255 targ_extra_libpath=$targ_extra_emuls
257 bfin-*-uclinux*) targ_emul=elf32bfin;
258 targ_extra_emuls="elf32bfinfd"
259 targ_extra_libpath=$targ_extra_emuls
261 bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
262 targ_extra_emuls="elf32bfin"
263 targ_extra_libpath=$targ_extra_emuls
265 bpf-*-*) targ_emul=elf64bpf
267 cr16-*-elf*) targ_emul=elf32cr16
269 cris-*-*aout*) targ_emul=crisaout
270 targ_extra_emuls="criself crislinux"
271 targ_extra_libpath=$targ_extra_emuls
273 cris-*-linux-* | crisv32-*-linux-*)
276 cris-*-* | crisv32-*-*) targ_emul=criself
277 targ_extra_emuls="crisaout crislinux"
278 targ_extra_libpath=$targ_extra_emuls
280 crx-*-elf*) targ_emul=elf32crx
283 csky-*-elf*) targ_emul=cskyelf
285 csky-*-linux*) targ_emul=cskyelf_linux
288 d10v-*-*) targ_emul=d10velf
290 d30v-*-*ext*) targ_emul=d30v_e
291 targ_extra_emuls="d30velf d30v_o"
292 targ_extra_ofiles=ldelfgen.o
294 d30v-*-*onchip*) targ_emul=d30v_o
295 targ_extra_emuls="d30velf d30v_e"
296 targ_extra_ofiles=ldelfgen.o
298 d30v-*-*) targ_emul=d30velf
299 targ_extra_emuls="d30v_e d30v_o"
300 targ_extra_ofiles=ldelfgen.o
302 dlx-*-elf*) targ_emul=elf32_dlx
303 targ_extra_ofiles=ldelfgen.o
305 epiphany-*-*) targ_emul=elf32epiphany
306 targ_extra_emuls="elf32epiphany_4x4"
308 fido*-*-elf*) targ_emul=m68kelf
310 fr30-*-*) targ_emul=elf32fr30
311 targ_extra_ofiles=ldelfgen.o
313 frv-*-*linux*) targ_emul=elf32frvfd
315 frv-*-*) targ_emul=elf32frv
316 targ_extra_emuls="elf32frvfd"
318 ft32-*-*) targ_emul=elf32ft32
319 targ_extra_ofiles=ldelfgen.o
321 h8300-*-elf* | h8300-*-rtems*)
323 targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
326 targ_emul=h8300elf_linux;
327 targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux"
329 hppa*64*-*-linux-*) targ_emul=hppa64linux
331 hppa*64*-hpux*) targ_emul=elf64hppa
333 hppa*-*-linux-*) targ_emul=hppalinux
335 hppa*-*-*elf*) targ_emul=hppaelf
337 hppa*-*-lites*) targ_emul=hppaelf
339 hppa*-*-netbsd*) targ_emul=hppanbsd
341 hppa*-*-openbsd*) targ_emul=hppaobsd
343 i[3-7]86-*-nto-qnx*) targ_emul=i386nto
345 i[3-7]86-*-go32) targ_emul=i386go32
348 i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32
351 i[3-7]86-*-lynxos*) targ_emul=i386lynx
353 i[3-7]86-*-aros*) targ_emul=elf_i386
354 targ_extra_emuls=elf_iamcu
356 i[3-7]86-*-rdos*) targ_emul=elf_i386
357 targ_extra_emuls=elf_iamcu
359 i[3-7]86-*-bsd) targ_emul=i386bsd
362 i[3-7]86-*-bsd386) targ_emul=i386bsd
365 i[3-7]86-*-bsdi*) targ_emul=i386bsd
368 i[3-7]86-*-linux-*) targ_emul=elf_i386
369 targ_extra_emuls="elf_iamcu"
370 targ64_extra_emuls="elf_x86_64 elf32_x86_64"
371 targ64_extra_libpath="elf_x86_64 elf32_x86_64"
373 i[3-7]86-*-redox*) targ_emul=elf_i386
374 targ_extra_emuls=elf_x86_64
376 i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
377 targ_extra_emuls=elf_iamcu
379 i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
380 targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64"
381 targ_extra_libpath=$targ_extra_emuls
383 i[3-7]86-*-unixware) targ_emul=elf_i386
384 targ_extra_emuls=elf_iamcu
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-*-netbsdpe*) targ_emul=i386pe
391 targ_extra_ofiles="deffilep.o pe-dll.o"
393 i[3-7]86-*-netbsd* | \
394 i[3-7]86-*-netbsd*-gnu* | \
395 i[3-7]86-*-knetbsd*-gnu | \
398 targ_extra_emuls="elf_iamcu"
400 i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
401 targ_extra_emuls=elf_i386
403 i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
405 targ_extra_emuls=elf_iamcu
407 i[3-7]86-*-dragonfly*) targ_emul=elf_i386
408 targ_extra_emuls="elf_iamcu i386bsd"
410 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
411 targ_emul=elf_i386_fbsd
412 targ_extra_emuls="elf_i386 elf_iamcu i386bsd"
414 i[3-7]86-*-gnu*) targ_emul=elf_i386
415 targ_extra_emuls=elf_iamcu
417 i[3-7]86-*-msdos*) targ_emul=i386msdos
418 targ_extra_emuls=i386aout
421 i[3-7]86-*-moss*) targ_emul=i386moss
422 targ_extra_emuls=i386msdos
424 i[3-7]86-*-winnt*) targ_emul=i386pe ;
425 targ_extra_ofiles="deffilep.o pe-dll.o"
427 i[3-7]86-*-pe) targ_emul=i386pe ;
428 targ_extra_ofiles="deffilep.o pe-dll.o"
430 i[3-7]86-*-cygwin*) targ_emul=i386pe ;
431 targ_extra_ofiles="deffilep.o pe-dll.o" ;
432 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
434 i[3-7]86-*-mingw32*) targ_emul=i386pe ;
435 targ_extra_ofiles="deffilep.o pe-dll.o"
437 i[3-7]86-*-interix*) targ_emul=i386pe_posix;
438 targ_extra_ofiles="deffilep.o pe-dll.o"
440 i[3-7]86-*-beospe*) targ_emul=i386beos
443 i[3-7]86-*-beos*) targ_emul=elf_i386_be
445 i[3-7]86-*-haiku*) targ_emul=elf_i386_haiku
447 i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks
449 i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
451 ia16-*-elf*) targ_emul=elf_i386
452 targ_extra_emuls=i386msdos
454 ia64-*-elf*) targ_emul=elf64_ia64
456 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
457 targ_emul=elf64_ia64_fbsd
458 targ_extra_emuls="elf64_ia64"
460 ia64-*-netbsd*) targ_emul=elf64_ia64
462 ia64-*-linux*) targ_emul=elf64_ia64
464 ia64-*-*vms*) targ_emul=elf64_ia64_vms
465 targ_extra_ofiles=ldelfgen.o
467 ia64-*-aix*) targ_emul=elf64_aix
469 ip2k-*-elf) targ_emul=elf32ip2k
471 iq2000-*-elf) targ_emul=elf32iq2000
472 targ_extra_emuls="elf32iq10"
473 targ_extra_ofiles=ldelfgen.o
475 lm32-*-*linux*) targ_emul=elf32lm32fd
477 lm32-*-*) targ_emul=elf32lm32
478 targ_extra_emuls="elf32lm32fd"
483 m32r*le-*-elf*) targ_emul=m32rlelf
488 m32r*le-*-linux-*) targ_emul=m32rlelf_linux
490 m32r*-*-linux-*) targ_emul=m32relf_linux
492 m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
493 targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb"
495 m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
496 targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb"
498 m68*-*-netbsd*) targ_emul=m68kelfnbsd
500 m68*-*-haiku*) targ_emul=m68kelf
502 m68*-*-*) targ_emul=m68kelf
504 mcore-*-pe) targ_emul=mcorepe ;
505 targ_extra_ofiles="deffilep.o pe-dll.o"
507 mcore-*-elf) targ_emul=elf32mcore
509 mep-*-elf) targ_emul=elf32mep
511 metag-*-*) targ_emul=elf32metag
513 microblazeel*-linux*) targ_emul="elf32mbel_linux"
514 targ_extra_emuls="elf32mb_linux"
516 microblaze*-linux*) targ_emul="elf32mb_linux"
517 targ_extra_emuls="elf32mbel_linux"
519 microblazeel*) targ_emul=elf32microblazeel
520 targ_extra_emuls=elf32microblaze
522 microblaze*) targ_emul=elf32microblaze
523 targ_extra_emuls=elf32microblazeel
525 mips*-sgi-irix5*) targ_emul=elf32bsmip
527 mips*-sgi-irix6*) targ_emul=elf32bmipn32
528 targ_extra_emuls="elf32bsmip elf64bmip"
529 targ_extra_libpath=$targ_extra_emuls
531 mips*el-*-haiku*) targ_emul=elf_mipsel_haiku
532 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
534 mips*el-*-netbsd*) targ_emul=elf32ltsmip
535 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
537 mips*-*-netbsd*) targ_emul=elf32btsmip
538 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
540 mips64el-*-openbsd*) targ_emul=elf64ltsmip
541 targ_extra_emuls=elf64btsmip
543 mips64-*-openbsd*) targ_emul=elf64btsmip
544 targ_extra_emuls=elf64ltsmip
546 mips*vr4300el-*-elf*) targ_emul=elf32l4300
548 mips*vr4300-*-elf*) targ_emul=elf32b4300
550 mips*vr4100el-*-elf*) targ_emul=elf32l4300
552 mips*vr4100-*-elf*) targ_emul=elf32b4300
554 mips*vr5000el-*-elf*) targ_emul=elf32l4300
556 mips*vr5000-*-elf*) targ_emul=elf32b4300
558 mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
559 targ_emul=elf32ltsmip
560 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
562 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
563 targ_emul=elf32btsmip
564 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
566 mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
567 targ_extra_emuls="elf32lr5900"
568 targ_extra_libpath=$targ_extra_emuls
570 mips*el-ps2-elf*) targ_emul=elf32lr5900
571 targ_extra_emuls="elf32lr5900n32"
572 targ_extra_libpath=$targ_extra_emuls
574 mips*el-*-elf*) targ_emul=elf32elmip
576 mips*-*-elf* | mips*-*-rtems*)
579 mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
580 targ_extra_emuls="elf32ebmipvxworks"
582 mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
583 targ_extra_emuls="elf32elmipvxworks"
585 mips*-*-windiss) targ_emul=elf32mipswindiss
587 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
588 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
589 targ_extra_libpath=$targ_extra_emuls
591 mips64*-*-linux-*) targ_emul=elf32btsmipn32
592 targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
593 targ_extra_libpath=$targ_extra_emuls
595 mips*el-*-linux-*) targ_emul=elf32ltsmip
596 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
597 targ_extra_libpath=$targ_extra_emuls
599 mips*-*-linux-*) targ_emul=elf32btsmip
600 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
601 targ_extra_libpath=$targ_extra_emuls
603 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
604 targ_emul=elf32ltsmipn32_fbsd
605 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
606 targ_extra_libpath=$targ_extra_emuls
608 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
609 targ_emul=elf32btsmipn32_fbsd
610 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
611 targ_extra_libpath=$targ_extra_emuls
613 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
614 targ_emul=elf32ltsmip_fbsd
615 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
616 targ_extra_libpath=$targ_extra_emuls
618 mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
619 targ_emul=elf32btsmip_fbsd
620 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
621 targ_extra_libpath=$targ_extra_emuls
623 mips*-*-sysv4*) targ_emul=elf32btsmip
625 mmix-*-*) targ_emul=mmo
626 targ_extra_emuls=elf64mmix
628 mn10200-*-*) targ_emul=mn10200
629 targ_extra_ofiles=ldelfgen.o
631 mn10300-*-*) targ_emul=mn10300
633 moxie-*-moxiebox*) targ_emul=moxiebox
634 targ_extra_ofiles=ldelfgen.o
636 moxie-*-*) targ_emul=elf32moxie
638 msp430-*-*) targ_emul=msp430elf
639 targ_extra_emuls="msp430X"
640 targ_extra_ofiles=ldelfgen.o
642 mt-*elf) targ_emul=elf32mt
643 targ_extra_ofiles=ldelfgen.o
645 nds32*le-*-elf*) targ_emul=nds32elf
646 targ_extra_emuls="nds32elf16m nds32belf nds32belf16m"
648 nds32*be-*-elf*) targ_emul=nds32belf
649 targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
651 nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux
653 nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux
655 nios2*-*-linux*) targ_emul=nios2linux
657 nios2*-*-*) targ_emul=nios2elf
659 ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha
662 ns32k-*-*bsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
665 or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*)
668 or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux
670 pdp11-*-*) targ_emul=pdp11
673 pjl*-*-*) targ_emul=pjlelf
674 targ_extra_emuls="elf_i386 elf_iamcu"
676 pj*-*-*) targ_emul=pjelf
677 targ_extra_ofiles=ldelfgen.o
679 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
680 targ_emul=elf32ppc_fbsd
681 targ_extra_emuls="elf32ppc elf32ppcsim"
682 targ_extra_libpath=elf32ppc;
683 tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
685 powerpc64-*-freebsd*)
686 targ_emul=elf64ppc_fbsd
687 targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
688 targ_extra_libpath="elf32ppc_fbsd elf32ppc"
689 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
690 tdir_elf32ppc_fbsd=$tdir_elf32ppc
692 powerpc64le-*-freebsd*)
693 targ_emul=elf64lppc_fbsd
694 targ_extra_emuls="elf64lppc"
697 targ_emul=elf32ppcvxworks
698 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
700 powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
701 | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
702 | powerpc*-*-rtems* \
703 | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
707 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
708 targ_extra_libpath="elf32ppc elf32ppclinux" ;;
710 targ_emul=elf32ppclinux
711 targ_extra_emuls="elf32ppc elf32ppcsim"
712 targ_extra_libpath=elf32ppc
713 targ64_extra_emuls=elf64ppc
714 targ64_extra_libpath=elf64ppc ;;
717 targ_extra_emuls="elf32ppclinux elf32ppcsim"
718 targ_extra_libpath=elf32ppclinux
719 targ64_extra_emuls=elf64ppc
720 targ64_extra_libpath=elf64ppc ;;
726 powerpcle-* | powerpc64le-*)
727 for z in td td64 targ_emul targ_extra_emuls \
728 targ_extra_libpath targ64_extra_emuls \
731 eval ${z}=\"\`echo \$${z} \| sed -e $s\`\"
735 # Why oh why did we set tooldir based on target_alias
736 # rather than on target?
737 eval tdir_${targ_emul}="${targ_alias}"
738 cpu=`echo "${targ_alias}" | sed -e 's/-.*//'`
739 rest=`echo "${targ_alias}" | sed -e 's/^[^-]*//'`
744 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
745 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}'/;s/be64$/64be/'`"${rest}"
746 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
747 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
748 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
749 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
750 # Now provide the other endian
751 for z in targ_extra_emuls targ_extra_libpath
753 eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\"
755 for z in targ64_extra_emuls targ64_extra_libpath
757 eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\"
759 td=`echo "${td}" | sed -e $s`
760 td64=`echo "${td64}" | sed -e $s`
762 powerpcle-* | powerpc64le-*)
763 cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;;
765 cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;;
767 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
768 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}/`"${rest}"
769 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
770 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
771 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
772 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
774 powerpc-*-nto*) targ_emul=elf32ppcnto
776 powerpcle-*-nto*) targ_emul=elf32lppcnto
778 powerpc-*-macos*) targ_emul=ppcmacos
781 powerpc-*-aix[5-9]*) targ_emul=aix5ppc
784 powerpc-*-aix*) targ_emul=aixppc
787 powerpc-*-beos*) targ_emul=aixppc
790 powerpc-*-haiku*) targ_emul=elf32ppchaiku
792 powerpc-*-windiss*) targ_emul=elf32ppcwindiss
794 pru*-*-*) targ_emul=pruelf
796 riscv32be*-*-linux*) targ_emul=elf32briscv
797 targ_extra_emuls="elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64"
798 targ_extra_libpath=$targ_extra_emuls
800 riscv32*-*-linux*) targ_emul=elf32lriscv
801 targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64"
802 targ_extra_libpath=$targ_extra_emuls
804 riscvbe-*-* | riscv32be*-*-*)
805 targ_emul=elf32briscv
806 targ_extra_emuls="elf64briscv elf32lriscv elf64lriscv"
807 targ_extra_libpath=$targ_extra_emuls
809 riscv-*-* | riscv32*-*-*)
810 targ_emul=elf32lriscv
811 targ_extra_emuls="elf64lriscv elf32briscv elf64briscv"
812 targ_extra_libpath=$targ_extra_emuls
814 riscv64be*-*-linux*) targ_emul=elf64briscv
815 targ_extra_emuls="elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32"
816 targ_extra_libpath=$targ_extra_emuls
818 riscv64*-*-linux*) targ_emul=elf64lriscv
819 targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32"
820 targ_extra_libpath=$targ_extra_emuls
822 riscv64be*-*-*) targ_emul=elf64briscv
823 targ_extra_emuls="elf32briscv elf64lriscv elf32lriscv"
824 targ_extra_libpath=$targ_extra_emuls
826 riscv64*-*-*) targ_emul=elf64lriscv
827 targ_extra_emuls="elf32lriscv elf64briscv elf32briscv"
828 targ_extra_libpath=$targ_extra_emuls
830 rs6000-*-aix[5-9]*) targ_emul=aix5rs6
833 rs6000-*-aix*) targ_emul=aixrs6
836 rl78-*-*) targ_emul=elf32rl78
838 rx-*-linux*) targ_emul=elf32rx_linux
840 rx-*-*) targ_emul=elf32rx
842 s12z-*-*) targ_emul=m9s12zelf
843 targ_extra_ofiles=ldelfgen.o
845 s390x-*-linux*) targ_emul=elf64_s390
846 targ_extra_emuls=elf_s390
847 targ_extra_libpath=$targ_extra_emuls
848 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
850 s390x-*-tpf*) targ_emul=elf64_s390
851 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
853 s390-*-linux*) targ_emul=elf_s390
854 targ64_extra_emuls=elf64_s390
855 targ64_extra_libpath=elf64_s390
856 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
858 score-*-elf) targ_emul=score7_elf
859 targ_extra_emuls=score3_elf
861 sh-*-linux*) targ_emul=shlelf_linux
862 targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
863 targ_extra_libpath=shelf_linux
865 sh*eb-*-linux*) targ_emul=shelf_linux
866 targ_extra_emuls="shelf_fd"
868 sh*-*-linux*) targ_emul=shlelf_linux
869 targ_extra_emuls="shlelf_fd"
871 sh*l*-*-netbsdaout*) targ_emul=shl
874 sh*-*-netbsdaout*) targ_emul=sh
877 sh*l*-*-netbsd*) targ_emul=shlelf_nbsd
878 targ_extra_emuls=shelf_nbsd
880 sh*-*-netbsd*) targ_emul=shelf_nbsd
881 targ_extra_emuls=shlelf_nbsd
883 shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
885 targ_extra_emuls="shelf shl sh"
887 sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
889 targ_extra_emuls="shlelf sh shl"
891 sh-*-uclinux* | sh[12]-*-uclinux*)
892 targ_emul=shelf_uclinux
893 targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd"
895 sh-*-vxworks) targ_emul=shelf_vxworks
896 targ_extra_emuls=shlelf_vxworks
898 sh-*-nto*) targ_emul=shelf_nto
899 targ_extra_emuls=shlelf_nto
901 sh-*-pe) targ_emul=shpe ;
902 targ_extra_ofiles="deffilep.o pe-dll.o"
904 sh-*-*) targ_emul=sh;
908 sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
909 targ_emul=elf64_sparc_fbsd
910 targ_extra_emuls="elf64_sparc elf32_sparc"
911 targ_extra_libpath=$targ_extra_emuls
912 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
914 sparc64-*-linux-*) targ_emul=elf64_sparc
915 targ_extra_emuls="elf32_sparc"
916 targ_extra_libpath=elf32_sparc
917 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
919 sparc64-*-*bsd*) targ_emul=elf64_sparc
920 targ_extra_emuls="elf32_sparc"
922 sparc64-*-solaris2* | sparcv9-*-solaris2*)
923 targ_emul=elf64_sparc_sol2
924 targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc"
925 targ_extra_libpath=$targ_extra_emuls
926 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
928 sparc64-*-haiku*) targ_emul=elf64_sparc
930 sparc64-*-*) targ_emul=elf64_sparc
932 sparc*-*-linux-*) targ_emul=elf32_sparc
933 targ_extra_emuls="elf64_sparc"
934 targ_extra_libpath=elf64_sparc
935 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
937 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
938 targ_emul=elf32_sparc_sol2
939 targ_extra_emuls=elf32_sparc
941 sparc-*-solaris2*) targ_emul=elf32_sparc_sol2
942 targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc"
943 targ_extra_libpath=$targ_extra_emuls
944 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
946 sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks
948 sparc*-*-*) targ_emul=elf32_sparc
950 spu-*-elf*) targ_emul=elf32_spu
952 tic30-*-*coff*) targ_emul=tic30coff
955 tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff
956 targ_extra_emuls="tic3xcoff tic3xcoff_onchip"
959 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff
962 tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
963 targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
964 targ_extra_libpath=$targ_extra_emuls
966 tic6x-*-uclinux) targ_emul=elf32_tic6x_linux_le
967 targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be"
968 targ_extra_libpath=$targ_extra_emuls
970 tilegx-*-*) targ_emul=elf64tilegx
971 targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be"
972 targ_extra_libpath=$targ_extra_emuls
974 tilegxbe-*-*) targ_emul=elf64tilegx_be
975 targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be"
976 targ_extra_libpath=$targ_extra_emuls
978 tilepro-*-*) targ_emul=elf32tilepro
980 v850*-*-*) targ_emul=v850_rh850
981 targ_extra_emuls=v850
983 vax-*-netbsdaout*) targ_emul=vaxnbsd
984 targ_extra_emuls=elf32vax
986 vax-*-netbsd*) targ_emul=elf32vax
987 targ_extra_emuls=vaxnbsd
989 vax-*-linux-*) targ_emul=elf32vax
991 visium-*-elf) targ_emul=elf32visium
993 x86_64-*-rdos*) targ_emul=elf64rdos
995 x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi
997 x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
998 targ_extra_emuls="elf_x86_64 elf_i386_haiku"
1000 x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
1001 targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
1002 targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"
1003 tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1004 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1006 x86_64-*-linux-*) targ_emul=elf_x86_64
1007 targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu"
1008 targ_extra_libpath="elf_i386 elf32_x86_64"
1009 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1011 x86_64-*-redox*) targ_emul=elf_x86_64
1012 targ_extra_emuls=elf_i386
1014 x86_64-*-solaris2*) targ_emul=elf_x86_64_sol2
1015 targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu"
1016 targ_extra_libpath=$targ_extra_emuls
1017 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1019 x86_64-*-netbsd* | x86_64-*-openbsd*)
1020 targ_emul=elf_x86_64
1021 targ_extra_emuls="elf_i386 elf_iamcu"
1022 tdir_elf_iamcu=`echo ${targ_alias} | \
1023 sed -e 's/x86_64/i386/' -e 's/aout//'`
1024 tdir_elf_i386=`echo ${targ_alias} | \
1025 sed -e 's/x86_64/i386/' -e 's/aout//'`
1027 x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
1028 targ_emul=elf_x86_64
1029 targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
1030 targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
1031 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1033 x86_64-*-dragonfly*) targ_emul=elf_x86_64
1034 targ_extra_emuls="elf_i386 elf_iamcu"
1036 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
1037 targ_emul=elf_x86_64_fbsd
1038 targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu"
1039 targ_extra_libpath="elf_i386_fbsd"
1040 tdir_elf_i386_fbsd=`echo ${targ_alias} \
1041 | sed -e 's/x86_64/i386/'`
1042 tdir_elf_iamcu=`echo ${targ_alias} \
1043 | sed -e 's/x86_64/i386/'`
1044 tdir_elf_i386=`echo ${targ_alias} \
1045 | sed -e 's/x86_64/i386/'`
1047 x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
1048 targ_extra_emuls=i386pe ;
1049 targ_extra_ofiles="deffilep.o pep-dll-x86_64.o pe-dll.o"
1051 x86_64-*-cygwin) targ_emul=i386pep ;
1052 targ_extra_emuls=i386pe
1053 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
1054 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
1056 x86_64-*-mingw*) targ_emul=i386pep ;
1057 targ_extra_emuls=i386pe
1058 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
1060 xgate-*-*) targ_emul=xgateelf
1061 targ_extra_ofiles=ldelfgen.o
1063 xstormy16-*-*) targ_emul=elf32xstormy16
1065 xtensa*-*-*) targ_emul=elf32xtensa
1067 z80-*-elf*) targ_emul=elf32z80
1068 targ_extra_ofiles="ldelf.o ldelfgen.o"
1070 z80-*-coff) targ_emul=z80
1073 z8k-*-coff) targ_emul=z8002
1074 targ_extra_emuls=z8001
1077 loongarch32-*) targ_emul=elf32loongarch
1079 loongarch64-*) targ_emul=elf64loongarch
1081 *-*-ieee*) targ_emul=vanilla
1085 echo 2>&1 "*** ld does not support target ${targ}"
1086 echo 2>&1 "*** see ld/configure.tgt for supported targets"
1091 NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
1095 NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
1099 NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
1103 NATIVE_LIB_DIRS=/usr/lib/pa20_64
1107 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1110 i[3-7]86-*-solaris*)
1111 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1114 i[3-7]86-pc-interix*)
1115 NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
1119 NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
1123 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1127 # This allows one to build a pair of PPU/SPU toolchains with common sysroot.
1128 NATIVE_LIB_DIRS='/lib'
1131 i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
1132 NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
1142 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1148 frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*)
1149 # Don't enable -z relro by default since many relro tests fail on these
1151 # FAIL: strip -z relro (relro1)
1152 # FAIL: strip -z relro -shared (relro1)
1153 # FAIL: objcopy -z relro (relro1)
1154 # FAIL: objcopy -z relro -shared (relro1)
1155 # FAIL: objcopy -z relro (tdata1)
1156 # FAIL: objcopy -shared -z relro (tdata1)
1157 # FAIL: objcopy -z relro (tdata2)
1158 # FAIL: objcopy -shared -z relro (tdata2)
1159 # FAIL: objcopy -z relro (tdata3)
1160 # FAIL: objcopy -shared -z relro (tdata3)
1161 # FAIL: objcopy -shared -z relro (tbss1)
1162 # FAIL: objcopy -shared -z relro (tbss2)
1163 # FAIL: objcopy -shared -z relro (tbss3)
1166 if test ${ac_default_ld_z_relro} = unset; then
1167 ac_default_ld_z_relro=1
1172 # Enable -z separate-code and --warn-textrel by default for Linux/x86.
1174 i[3-7]86-*-linux-* | x86_64-*-linux-*)
1175 if test ${ac_default_ld_z_separate_code} = unset; then
1176 ac_default_ld_z_separate_code=1
1178 if test ${ac_default_ld_textrel_check} = unset; then
1179 ac_default_ld_textrel_check=yes