3 # Copyright (C) 2013-2025 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 # This has to come after aarch64-*-linux* for aarch64-*-linux-gnu to hit the Linux branch.
122 targ_extra_emuls="aarch64elf aarch64elfb armelf armelfb"
124 aarch64-*-haiku*) targ_emul=aarch64haiku
125 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath"
127 aarch64-*-nto*) targ_emul=aarch64nto
128 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
130 aarch64-*-pe* | aarch64-*-mingw*)
132 targ_extra_emuls="arm64pe"
133 targ_extra_ofiles="deffilep.o pep-dll-aarch64.o pe-dll.o pdb.o"
135 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
136 targ_emul=elf64alpha_fbsd
137 targ_extra_emuls="elf64alpha alpha"
138 tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
140 alpha*-*-linux*ecoff*) targ_emul=alpha
141 targ_extra_emuls=elf64alpha
142 tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
144 alpha*-*-linux-*) targ_emul=elf64alpha
145 targ_extra_emuls=alpha
146 tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'`
148 alpha*-*-osf*) targ_emul=alpha
151 alpha*-*-gnu*) targ_emul=elf64alpha
153 alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd
155 alpha*-*-openbsd*) targ_emul=elf64alpha
157 alpha*-*-*vms*) targ_emul=alphavms
160 am33_2.0-*-linux*) targ_emul=elf32am33lin # mn10300 variant
162 arc*-*-elf*) targ_emul=arcelf
163 targ_extra_emuls="arclinux arclinux_nps arcv2elf arcv2elfx"
165 arc*-*-linux*) case "${with_cpu}" in
166 nps400) targ_emul=arclinux_nps
167 targ_extra_emuls=arclinux
169 *) targ_emul=arclinux
170 targ_extra_emuls=arclinux_nps
173 targ_extra_emuls="${targ_extra_emuls} arcelf arcv2elf arcv2elfx"
175 arm*-*-cegcc*) targ_emul=arm_wince_pe
176 targ_extra_ofiles="deffilep.o pe-dll.o"
177 LIB_PATH='${tooldir}/lib/w32api'
179 arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*)
180 targ_emul=arm_wince_pe
181 targ_extra_ofiles="deffilep.o pe-dll.o"
183 arm-*-pe) targ_emul=armpe
184 targ_extra_ofiles="deffilep.o pe-dll.o"
186 arm*b-*-freebsd*) targ_emul=armelfb_fbsd
187 targ_extra_emuls="armelf_fbsd armelf"
189 arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
190 targ_emul=armelf_fbsd
191 targ_extra_emuls="armelfb_fbsd armelf"
193 armeb-*-netbsd*) targ_emul=armelfb_nbsd;
194 targ_extra_emuls="armelf_nbsd armelf"
196 arm-*-netbsd*) targ_emul=armelf_nbsd;
197 targ_extra_emuls="armelfb_nbsd armelf"
199 arm-*-nto*) targ_emul=armnto
201 arm-*-phoenix*) targ_emul=armelf
203 armeb-*-elf | armeb-*-eabi*)
206 arm-*-elf | arm*-*-eabi* | arm-*-rtems* | arm-*-genode*)
209 arm-*-kaos*) targ_emul=armelf
211 arm9e-*-elf) targ_emul=armelf
213 arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
214 targ_extra_emuls=armelf_linux_eabi
215 targ_extra_libpath=$targ_extra_emuls
217 arm*b-*-linux-*) targ_emul=armelfb_linux
218 targ_extra_emuls="armelfb armelf armelf_linux"
219 targ_extra_libpath="armelf_linux"
221 arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
222 targ_extra_emuls="armelfb_linux_eabi"
223 targ_extra_libpath=$targ_extra_emuls
225 arm*-*-uclinuxfdpiceabi)
226 targ_emul=armelf_linux_eabi
227 targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi"
228 targ_extra_libpath=$targ_extra_emuls
230 arm*-*-linux-*) targ_emul=armelf_linux
231 targ_extra_emuls="armelf armelfb armelfb_linux"
232 targ_extra_libpath="armelfb_linux"
234 arm*b-*-nacl*) targ_emul=armelfb_nacl
235 targ_extra_emuls="armelf_nacl"
236 targ_extra_libpath=$targ_extra_emuls
238 arm*-*-nacl*) targ_emul=armelf_nacl
239 targ_extra_emuls="armelfb_nacl"
240 targ_extra_libpath=$targ_extra_emuls
242 arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi
243 targ_extra_emuls=armelfb_linux_eabi
244 targ_extra_libpath=$targ_extra_emuls
246 arm*-*-uclinux*) targ_emul=armelf_linux
247 targ_extra_emuls="armelf armelfb armelfb_linux"
248 targ_extra_libpath="armelfb_linux"
250 arm-*-vxworks) targ_emul=armelf_vxworks
252 arm*-*-conix*) targ_emul=armelf
254 arm*-*-fuchsia*) targ_emul=armelf_fuchsia
255 targ_extra_emuls="armelfb_fuchsia armelf armelfb"
257 arm*-*-haiku*) targ_emul=armelf_haiku
258 targ_extra_emuls=armelf
260 avr-*-*) targ_emul=avr2
261 targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega2_flmap avrxmega3 avrxmega4 avrxmega4_flmap avrxmega5 avrxmega6 avrxmega7 avrtiny"
263 bfin-*-elf | bfin-*-rtems*)
265 targ_extra_emuls="elf32bfinfd"
266 targ_extra_libpath=$targ_extra_emuls
268 bfin-*-uclinux*) targ_emul=elf32bfin;
269 targ_extra_emuls="elf32bfinfd"
270 targ_extra_libpath=$targ_extra_emuls
272 bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
273 targ_extra_emuls="elf32bfin"
274 targ_extra_libpath=$targ_extra_emuls
276 bpf-*-*) targ_emul=elf64bpf
278 cr16-*-elf*) targ_emul=elf32cr16
280 cris-*-*aout*) targ_emul=crisaout
281 targ_extra_emuls="criself crislinux"
282 targ_extra_libpath=$targ_extra_emuls
284 cris-*-linux-* | crisv32-*-linux-*)
287 cris-*-* | crisv32-*-*) targ_emul=criself
288 targ_extra_emuls="crisaout crislinux"
289 targ_extra_libpath=$targ_extra_emuls
291 crx-*-elf*) targ_emul=elf32crx
294 csky-*-elf*) targ_emul=cskyelf
296 csky-*-linux*) targ_emul=cskyelf_linux
299 d10v-*-*) targ_emul=d10velf
301 d30v-*-*ext*) targ_emul=d30v_e
302 targ_extra_emuls="d30velf d30v_o"
303 targ_extra_ofiles=ldelfgen.o
305 d30v-*-*onchip*) targ_emul=d30v_o
306 targ_extra_emuls="d30velf d30v_e"
307 targ_extra_ofiles=ldelfgen.o
309 d30v-*-*) targ_emul=d30velf
310 targ_extra_emuls="d30v_e d30v_o"
311 targ_extra_ofiles=ldelfgen.o
313 dlx-*-elf*) targ_emul=elf32_dlx
314 targ_extra_ofiles=ldelfgen.o
316 epiphany-*-*) targ_emul=elf32epiphany
317 targ_extra_emuls="elf32epiphany_4x4"
319 fido*-*-elf*) targ_emul=m68kelf
321 fr30-*-*) targ_emul=elf32fr30
322 targ_extra_ofiles=ldelfgen.o
324 frv-*-*linux*) targ_emul=elf32frvfd
326 frv-*-*) targ_emul=elf32frv
327 targ_extra_emuls="elf32frvfd"
329 ft32-*-*) targ_emul=elf32ft32
330 targ_extra_ofiles=ldelfgen.o
332 h8300-*-elf* | h8300-*-rtems*)
334 targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
337 targ_emul=h8300elf_linux;
338 targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux"
340 hppa*64*-*-linux-*) targ_emul=hppa64linux
342 hppa*64*-hpux*) targ_emul=elf64hppa
344 hppa*-*-linux-*) targ_emul=hppalinux
346 hppa*-*-*elf*) targ_emul=hppaelf
348 hppa*-*-lites*) targ_emul=hppaelf
350 hppa*-*-netbsd*) targ_emul=hppanbsd
352 hppa*-*-openbsd*) targ_emul=hppaobsd
354 i[3-7]86-*-nto-qnx*) targ_emul=i386nto
356 i[3-7]86-*-go32) targ_emul=i386go32
359 i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32
362 i[3-7]86-*-lynxos*) targ_emul=i386lynx
364 i[3-7]86-*-aros*) targ_emul=elf_i386
365 targ_extra_emuls=elf_iamcu
367 i[3-7]86-*-rdos*) targ_emul=elf_i386
368 targ_extra_emuls=elf_iamcu
370 i[3-7]86-*-bsd) targ_emul=i386bsd
373 i[3-7]86-*-bsd386) targ_emul=i386bsd
376 i[3-7]86-*-bsdi*) targ_emul=i386bsd
379 i[3-7]86-*-linux-*) targ_emul=elf_i386
380 targ_extra_emuls="elf_iamcu"
381 targ64_extra_emuls="elf_x86_64 elf32_x86_64"
382 targ64_extra_libpath="elf_x86_64 elf32_x86_64"
384 i[3-7]86-*-redox*) targ_emul=elf_i386
385 targ_extra_emuls=elf_x86_64
387 i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
388 targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64"
389 targ_extra_libpath=$targ_extra_emuls
391 i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
392 targ_extra_emuls="elf_i386"
393 targ_extra_libpath=$targ_extra_emuls
395 i[3-7]86-*-netbsd* | \
396 i[3-7]86-*-netbsd*-gnu* | \
397 i[3-7]86-*-knetbsd*-gnu | \
400 targ_extra_emuls="elf_iamcu"
402 i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
403 targ_extra_emuls=elf_i386
405 i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
407 targ_extra_emuls=elf_iamcu
409 i[3-7]86-*-dragonfly*) targ_emul=elf_i386
410 targ_extra_emuls="elf_iamcu i386bsd"
412 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
413 targ_emul=elf_i386_fbsd
414 targ_extra_emuls="elf_i386 elf_iamcu i386bsd"
416 i[3-7]86-*-gnu*) targ_emul=elf_i386
417 targ_extra_emuls=elf_iamcu
419 i[3-7]86-*-msdos*) targ_emul=i386msdos
420 targ_extra_emuls=i386aout
423 i[3-7]86-*-moss*) targ_emul=i386moss
424 targ_extra_emuls=i386msdos
426 i[3-7]86-*-winnt*) targ_emul=i386pe ;
427 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
429 i[3-7]86-*-pe) targ_emul=i386pe ;
430 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
432 i[3-7]86-*-cygwin*) targ_emul=i386pe ;
433 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o" ;
434 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
436 i[3-7]86-*-mingw32*) targ_emul=i386pe ;
437 targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
439 i[3-7]86-*-interix*) targ_emul=i386pe_posix;
440 targ_extra_ofiles="deffilep.o pe-dll.o"
442 i[3-7]86-*-beospe*) targ_emul=i386beos
445 i[3-7]86-*-beos*) targ_emul=elf_i386_be
447 i[3-7]86-*-haiku*) targ_emul=elf_i386_haiku
449 i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks
451 i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
453 ia16-*-elf*) targ_emul=elf_i386
454 targ_extra_emuls=i386msdos
456 ia64-*-elf*) targ_emul=elf64_ia64
458 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
459 targ_emul=elf64_ia64_fbsd
460 targ_extra_emuls="elf64_ia64"
462 ia64-*-netbsd*) targ_emul=elf64_ia64
464 ia64-*-linux*) targ_emul=elf64_ia64
466 ia64-*-*vms*) targ_emul=elf64_ia64_vms
467 targ_extra_ofiles=ldelfgen.o
469 ia64-*-aix*) targ_emul=elf64_aix
471 ip2k-*-elf) targ_emul=elf32ip2k
473 iq2000-*-elf) targ_emul=elf32iq2000
474 targ_extra_emuls="elf32iq10"
475 targ_extra_ofiles=ldelfgen.o
477 lm32-*-*linux*) targ_emul=elf32lm32fd
479 lm32-*-*) targ_emul=elf32lm32
480 targ_extra_emuls="elf32lm32fd"
482 kvx-*-linux*) targ_emul=elf64kvx_linux
483 targ_extra_emuls="elf64kvx"
485 kvx-*-*) targ_emul=elf64kvx;
486 targ_extra_emuls="elf64kvx_linux elf32kvx"
491 m32r*le-*-elf*) targ_emul=m32rlelf
496 m32r*le-*-linux-*) targ_emul=m32rlelf_linux
498 m32r*-*-linux-*) targ_emul=m32relf_linux
500 m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
501 targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb"
503 m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
504 targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb"
506 m68*-*-netbsd*) targ_emul=m68kelfnbsd
508 m68*-*-haiku*) targ_emul=m68kelf
510 m68*-*-*) targ_emul=m68kelf
512 mcore-*-pe) targ_emul=mcorepe ;
513 targ_extra_ofiles="deffilep.o pe-dll.o"
515 mcore-*-elf) targ_emul=elf32mcore
517 mep-*-elf) targ_emul=elf32mep
519 metag-*-*) targ_emul=elf32metag
521 microblazeel*-linux*) targ_emul="elf32mbel_linux"
522 targ_extra_emuls="elf32mb_linux"
524 microblaze*-linux*) targ_emul="elf32mb_linux"
525 targ_extra_emuls="elf32mbel_linux"
527 microblazeel*) targ_emul=elf32microblazeel
528 targ_extra_emuls=elf32microblaze
530 microblaze*) targ_emul=elf32microblaze
531 targ_extra_emuls=elf32microblazeel
533 mips*-sgi-irix5*) targ_emul=elf32bsmip
535 mips*-sgi-irix6*) targ_emul=elf32bmipn32
536 targ_extra_emuls="elf32bsmip elf64bmip"
537 targ_extra_libpath=$targ_extra_emuls
539 mips*el-*-haiku*) targ_emul=elf_mipsel_haiku
540 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
542 mips*el-*-netbsd*) targ_emul=elf32ltsmip
543 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
545 mips*-*-netbsd*) targ_emul=elf32btsmip
546 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
548 mips64el-*-openbsd*) targ_emul=elf64ltsmip
549 targ_extra_emuls=elf64btsmip
551 mips64-*-openbsd*) targ_emul=elf64btsmip
552 targ_extra_emuls=elf64ltsmip
554 mips*vr4300el-*-elf*) targ_emul=elf32l4300
556 mips*vr4300-*-elf*) targ_emul=elf32b4300
558 mips*vr4100el-*-elf*) targ_emul=elf32l4300
560 mips*vr4100-*-elf*) targ_emul=elf32b4300
562 mips*vr5000el-*-elf*) targ_emul=elf32l4300
564 mips*vr5000-*-elf*) targ_emul=elf32b4300
566 mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
567 targ_emul=elf32ltsmip
568 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
570 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
571 targ_emul=elf32btsmip
572 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
574 mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
575 targ_extra_emuls="elf32lr5900"
576 targ_extra_libpath=$targ_extra_emuls
578 mips*el-ps2-elf*) targ_emul=elf32lr5900
579 targ_extra_emuls="elf32lr5900n32"
580 targ_extra_libpath=$targ_extra_emuls
582 mips*el-*-elf*) targ_emul=elf32elmip
584 mips*-*-elf* | mips*-*-rtems*)
587 mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
588 targ_extra_emuls="elf32ebmipvxworks"
590 mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
591 targ_extra_emuls="elf32elmipvxworks"
593 mips*-*-windiss) targ_emul=elf32mipswindiss
595 mips64*el-*-linux-gnuabi64)
596 targ_emul=elf64ltsmip
597 targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
598 targ_extra_libpath=$targ_extra_emuls
600 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
601 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
602 targ_extra_libpath=$targ_extra_emuls
604 mips64*-*-linux-gnuabi64)
605 targ_emul=elf64btsmip
606 targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
607 targ_extra_libpath=$targ_extra_emuls
609 mips64*-*-linux-*) targ_emul=elf32btsmipn32
610 targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
611 targ_extra_libpath=$targ_extra_emuls
613 mips*el-*-linux-*) targ_emul=elf32ltsmip
614 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
615 targ_extra_libpath=$targ_extra_emuls
617 mips*-*-linux-*) targ_emul=elf32btsmip
618 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
619 targ_extra_libpath=$targ_extra_emuls
621 mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
622 targ_emul=elf32ltsmipn32_fbsd
623 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
624 targ_extra_libpath=$targ_extra_emuls
626 mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
627 targ_emul=elf32btsmipn32_fbsd
628 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
629 targ_extra_libpath=$targ_extra_emuls
631 mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
632 targ_emul=elf32ltsmip_fbsd
633 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
634 targ_extra_libpath=$targ_extra_emuls
636 mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
637 targ_emul=elf32btsmip_fbsd
638 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
639 targ_extra_libpath=$targ_extra_emuls
641 mips*-*-sysv4*) targ_emul=elf32btsmip
643 mmix-*-*) targ_emul=mmo
644 targ_extra_emuls=elf64mmix
646 mn10200-*-*) targ_emul=mn10200
647 targ_extra_ofiles=ldelfgen.o
649 mn10300-*-*) targ_emul=mn10300
651 moxie-*-moxiebox*) targ_emul=moxiebox
652 targ_extra_ofiles=ldelfgen.o
654 moxie-*-*) targ_emul=elf32moxie
656 msp430-*-*) targ_emul=msp430elf
657 targ_extra_emuls="msp430X"
658 targ_extra_ofiles=ldelfgen.o
660 mt-*elf) targ_emul=elf32mt
661 targ_extra_ofiles=ldelfgen.o
663 nds32*le-*-elf*) targ_emul=nds32elf
664 targ_extra_emuls="nds32elf16m nds32belf nds32belf16m"
666 nds32*be-*-elf*) targ_emul=nds32belf
667 targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
669 nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux
671 nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux
673 ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha
676 ns32k-*-*bsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
679 or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*)
682 or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux
684 pdp11-*-*) targ_emul=pdp11
687 pjl*-*-*) targ_emul=pjlelf
688 targ_extra_emuls="elf_i386 elf_iamcu"
690 pj*-*-*) targ_emul=pjelf
691 targ_extra_ofiles=ldelfgen.o
693 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
694 targ_emul=elf32ppc_fbsd
695 targ_extra_emuls="elf32ppc elf32ppcsim"
696 targ_extra_libpath=elf32ppc;
697 tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
699 powerpc64-*-freebsd*)
700 targ_emul=elf64ppc_fbsd
701 targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
702 targ_extra_libpath="elf32ppc_fbsd elf32ppc"
703 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
704 tdir_elf32ppc_fbsd=$tdir_elf32ppc
706 powerpc64le-*-freebsd*)
707 targ_emul=elf64lppc_fbsd
708 targ_extra_emuls="elf64lppc"
711 targ_emul=elf32ppcvxworks
712 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
714 powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
715 | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
716 | powerpc*-*-rtems* \
717 | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
721 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
722 targ_extra_libpath="elf32ppc elf32ppclinux" ;;
724 targ_emul=elf32ppclinux
725 targ_extra_emuls="elf32ppc elf32ppcsim"
726 targ_extra_libpath=elf32ppc
727 targ64_extra_emuls=elf64ppc
728 targ64_extra_libpath=elf64ppc ;;
731 targ_extra_emuls="elf32ppclinux elf32ppcsim"
732 targ_extra_libpath=elf32ppclinux
733 targ64_extra_emuls=elf64ppc
734 targ64_extra_libpath=elf64ppc ;;
740 powerpcle-* | powerpc64le-*)
741 for z in td td64 targ_emul targ_extra_emuls \
742 targ_extra_libpath targ64_extra_emuls \
745 eval ${z}=\"\`echo \$${z} \| sed -e $s\`\"
749 # Why oh why did we set tooldir based on target_alias
750 # rather than on target?
751 eval tdir_${targ_emul}="${targ_alias}"
752 cpu=`echo "${targ_alias}" | sed -e 's/-.*//'`
753 rest=`echo "${targ_alias}" | sed -e 's/^[^-]*//'`
758 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
759 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}'/;s/be64$/64be/'`"${rest}"
760 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
761 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
762 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
763 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
764 # Now provide the other endian
765 for z in targ_extra_emuls targ_extra_libpath
767 eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\"
769 for z in targ64_extra_emuls targ64_extra_libpath
771 eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\"
773 td=`echo "${td}" | sed -e $s`
774 td64=`echo "${td64}" | sed -e $s`
776 powerpcle-* | powerpc64le-*)
777 cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;;
779 cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;;
781 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}"
782 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}/`"${rest}"
783 eval test -n \"\$${td}\" || eval ${td}="${ta32}"
784 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}"
785 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
786 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
788 powerpc-*-nto*) targ_emul=elf32ppcnto
790 powerpcle-*-nto*) targ_emul=elf32lppcnto
792 powerpc-*-macos*) targ_emul=ppcmacos
795 powerpc-*-aix[5-9]*) targ_emul=aix5ppc
798 powerpc-*-aix*) targ_emul=aixppc
801 powerpc-*-beos*) targ_emul=aixppc
804 powerpc-*-haiku*) targ_emul=elf32ppchaiku
806 powerpc-*-windiss*) targ_emul=elf32ppcwindiss
808 pru*-*-*) targ_emul=pruelf
810 riscv32be*-*-linux*) targ_emul=elf32briscv
811 targ_extra_emuls="elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64"
812 targ_extra_libpath=$targ_extra_emuls
814 riscv32*-*-linux*) targ_emul=elf32lriscv
815 targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64"
816 targ_extra_libpath=$targ_extra_emuls
818 riscvbe-*-* | riscv32be*-*-*)
819 targ_emul=elf32briscv
820 targ_extra_emuls="elf64briscv elf32lriscv elf64lriscv"
821 targ_extra_libpath=$targ_extra_emuls
823 riscv-*-* | riscv32*-*-*)
824 targ_emul=elf32lriscv
825 targ_extra_emuls="elf64lriscv elf32briscv elf64briscv"
826 targ_extra_libpath=$targ_extra_emuls
828 riscv64be*-*-linux*) targ_emul=elf64briscv
829 targ_extra_emuls="elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32"
830 targ_extra_libpath=$targ_extra_emuls
832 riscv64*-*-linux*) targ_emul=elf64lriscv
833 targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32 elf64briscv elf64briscv_lp64f elf64briscv_lp64 elf32briscv elf32briscv_ilp32f elf32briscv_ilp32"
834 targ_extra_libpath=$targ_extra_emuls
836 riscv64be*-*-*) targ_emul=elf64briscv
837 targ_extra_emuls="elf32briscv elf64lriscv elf32lriscv"
838 targ_extra_libpath=$targ_extra_emuls
840 riscv64*-*-*) targ_emul=elf64lriscv
841 targ_extra_emuls="elf32lriscv elf64briscv elf32briscv"
842 targ_extra_libpath=$targ_extra_emuls
844 rs6000-*-aix[5-9]*) targ_emul=aix5rs6
847 rs6000-*-aix*) targ_emul=aixrs6
850 rl78-*-*) targ_emul=elf32rl78
852 rx-*-linux*) targ_emul=elf32rx_linux
854 rx-*-*) targ_emul=elf32rx
856 s12z-*-*) targ_emul=m9s12zelf
857 targ_extra_ofiles=ldelfgen.o
859 s390x-*-linux*) targ_emul=elf64_s390
860 targ_extra_emuls=elf_s390
861 targ_extra_libpath=$targ_extra_emuls
862 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
864 s390x-*-tpf*) targ_emul=elf64_s390
865 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'`
867 s390-*-linux*) targ_emul=elf_s390
868 targ64_extra_emuls=elf64_s390
869 targ64_extra_libpath=elf64_s390
870 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
872 score-*-elf) targ_emul=score7_elf
873 targ_extra_emuls=score3_elf
875 sh-*-linux*) targ_emul=shlelf_linux
876 targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
877 targ_extra_libpath=shelf_linux
879 sh*eb-*-linux*) targ_emul=shelf_linux
880 targ_extra_emuls="shelf_fd"
882 sh*-*-linux*) targ_emul=shlelf_linux
883 targ_extra_emuls="shlelf_fd"
885 sh*l*-*-netbsd*) targ_emul=shlelf_nbsd
886 targ_extra_emuls=shelf_nbsd
888 sh*-*-netbsd*) targ_emul=shelf_nbsd
889 targ_extra_emuls=shlelf_nbsd
891 shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
893 targ_extra_emuls="shelf shl sh"
895 sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
897 targ_extra_emuls="shlelf sh shl"
899 sh-*-uclinux* | sh[12]-*-uclinux*)
900 targ_emul=shelf_uclinux
901 targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd"
903 sh-*-vxworks) targ_emul=shelf_vxworks
904 targ_extra_emuls=shlelf_vxworks
906 sh-*-nto*) targ_emul=shelf_nto
907 targ_extra_emuls=shlelf_nto
909 sh-*-pe) targ_emul=shpe ;
910 targ_extra_ofiles="deffilep.o pe-dll.o"
912 sh-*-*) targ_emul=sh;
916 sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
917 targ_emul=elf64_sparc_fbsd
918 targ_extra_emuls="elf64_sparc elf32_sparc"
919 targ_extra_libpath=$targ_extra_emuls
920 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
922 sparc64-*-linux-*) targ_emul=elf64_sparc
923 targ_extra_emuls="elf32_sparc"
924 targ_extra_libpath=elf32_sparc
925 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
927 sparc64-*-*bsd*) targ_emul=elf64_sparc
928 targ_extra_emuls="elf32_sparc"
930 sparc64-*-solaris2* | sparcv9-*-solaris2*)
931 targ_emul=elf64_sparc_sol2
932 targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc"
933 targ_extra_libpath=$targ_extra_emuls
934 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
936 sparc64-*-haiku*) targ_emul=elf64_sparc
938 sparc64-*-*) targ_emul=elf64_sparc
940 sparc*-*-linux-*) targ_emul=elf32_sparc
941 targ_extra_emuls="elf64_sparc"
942 targ_extra_libpath=elf64_sparc
943 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
945 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
946 targ_emul=elf32_sparc_sol2
947 targ_extra_emuls=elf32_sparc
949 sparc-*-solaris2*) targ_emul=elf32_sparc_sol2
950 targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc"
951 targ_extra_libpath=$targ_extra_emuls
952 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
954 sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks
956 sparc*-*-*) targ_emul=elf32_sparc
958 spu-*-elf*) targ_emul=elf32_spu
960 tic30-*-*coff*) targ_emul=tic30coff
963 tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff
964 targ_extra_emuls="tic3xcoff tic3xcoff_onchip"
967 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff
970 tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
971 targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
972 targ_extra_libpath=$targ_extra_emuls
974 tic6x-*-uclinux) targ_emul=elf32_tic6x_linux_le
975 targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be"
976 targ_extra_libpath=$targ_extra_emuls
978 tilegx-*-*) targ_emul=elf64tilegx
979 targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be"
980 targ_extra_libpath=$targ_extra_emuls
982 tilegxbe-*-*) targ_emul=elf64tilegx_be
983 targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be"
984 targ_extra_libpath=$targ_extra_emuls
986 tilepro-*-*) targ_emul=elf32tilepro
988 v850*-*-*) targ_emul=v850_rh850
989 targ_extra_emuls=v850
991 vax-*-netbsdaout*) targ_emul=vaxnbsd
992 targ_extra_emuls=elf32vax
994 vax-*-netbsd*) targ_emul=elf32vax
995 targ_extra_emuls=vaxnbsd
997 vax-*-linux-*) targ_emul=elf32vax
999 visium-*-elf) targ_emul=elf32visium
1001 x86_64-*-rdos*) targ_emul=elf64rdos
1003 x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi
1005 x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
1006 targ_extra_emuls="elf_x86_64 elf_i386_haiku"
1008 x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
1009 targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
1010 targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"
1011 tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1012 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
1014 x86_64-*-linux-*) targ_emul=elf_x86_64
1015 targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu"
1016 targ_extra_libpath="elf_i386 elf32_x86_64"
1017 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1019 x86_64-*-redox*) targ_emul=elf_x86_64
1020 targ_extra_emuls=elf_i386
1022 x86_64-*-solaris2*) targ_emul=elf_x86_64_sol2
1023 targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu"
1024 targ_extra_libpath=$targ_extra_emuls
1025 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1027 x86_64-*-netbsd* | x86_64-*-openbsd*)
1028 targ_emul=elf_x86_64
1029 targ_extra_emuls="elf_i386 elf_iamcu"
1030 tdir_elf_iamcu=`echo ${targ_alias} | \
1031 sed -e 's/x86_64/i386/' -e 's/aout//'`
1032 tdir_elf_i386=`echo ${targ_alias} | \
1033 sed -e 's/x86_64/i386/' -e 's/aout//'`
1035 x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
1036 targ_emul=elf_x86_64
1037 targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
1038 targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
1039 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1041 x86_64-*-dragonfly*) targ_emul=elf_x86_64
1042 targ_extra_emuls="elf_i386 elf_iamcu"
1044 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
1045 targ_emul=elf_x86_64_fbsd
1046 targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu"
1047 targ_extra_libpath="elf_i386_fbsd"
1048 tdir_elf_i386_fbsd=`echo ${targ_alias} \
1049 | sed -e 's/x86_64/i386/'`
1050 tdir_elf_iamcu=`echo ${targ_alias} \
1051 | sed -e 's/x86_64/i386/'`
1052 tdir_elf_i386=`echo ${targ_alias} \
1053 | sed -e 's/x86_64/i386/'`
1055 x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
1056 targ_extra_emuls=i386pe ;
1057 targ_extra_ofiles="deffilep.o pdb.o pep-dll-x86_64.o pe-dll.o"
1059 x86_64-*-cygwin) targ_emul=i386pep ;
1060 targ_extra_emuls=i386pe
1061 targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
1062 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
1064 x86_64-*-mingw*) targ_emul=i386pep ;
1065 targ_extra_emuls=i386pe
1066 targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
1068 x86_64-*-gnu*) targ_emul=elf_x86_64
1069 targ_extra_emuls="elf32_x86_64 elf_iamcu elf_i386"
1070 targ_extra_libpath="elf_i386 elf32_x86_64"
1071 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
1073 xgate-*-*) targ_emul=xgateelf
1074 targ_extra_ofiles=ldelfgen.o
1076 xstormy16-*-*) targ_emul=elf32xstormy16
1078 xtensa*-*-*) targ_emul=elf32xtensa
1080 z80-*-elf*) targ_emul=elf32z80
1081 targ_extra_ofiles="ldelf.o ldelfgen.o"
1083 z80-*-coff) targ_emul=z80
1086 z8k-*-coff) targ_emul=z8002
1087 targ_extra_emuls=z8001
1090 loongarch32-*) targ_emul=elf32loongarch
1092 loongarch64-*) targ_emul=elf64loongarch
1094 *-*-ieee*) targ_emul=vanilla
1098 echo 2>&1 "*** ld does not support target ${targ}"
1099 echo 2>&1 "*** see ld/configure.tgt for supported targets"
1104 NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
1108 NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
1112 NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib /usr/lib32'
1116 NATIVE_LIB_DIRS=/usr/lib/pa20_64
1120 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1123 i[3-7]86-*-solaris*)
1124 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1127 i[3-7]86-pc-interix*)
1128 NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
1132 NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
1136 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1140 # This allows one to build a pair of PPU/SPU toolchains with common sysroot.
1141 NATIVE_LIB_DIRS='/lib'
1144 i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
1145 NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
1155 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
1161 frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*)
1162 # Don't enable -z relro by default since many relro tests fail on these
1164 # FAIL: strip -z relro (relro1)
1165 # FAIL: strip -z relro -shared (relro1)
1166 # FAIL: objcopy -z relro (relro1)
1167 # FAIL: objcopy -z relro -shared (relro1)
1168 # FAIL: objcopy -z relro (tdata1)
1169 # FAIL: objcopy -shared -z relro (tdata1)
1170 # FAIL: objcopy -z relro (tdata2)
1171 # FAIL: objcopy -shared -z relro (tdata2)
1172 # FAIL: objcopy -z relro (tdata3)
1173 # FAIL: objcopy -shared -z relro (tdata3)
1174 # FAIL: objcopy -shared -z relro (tbss1)
1175 # FAIL: objcopy -shared -z relro (tbss2)
1176 # FAIL: objcopy -shared -z relro (tbss3)
1179 if test ${ac_default_ld_z_relro} = unset; then
1180 ac_default_ld_z_relro=1
1185 # Enable -z separate-code and --warn-textrel by default for Linux/x86.
1187 i[3-7]86-*-linux-* | x86_64-*-linux-*)
1188 if test ${ac_default_ld_z_separate_code} = unset; then
1189 ac_default_ld_z_separate_code=1
1191 if test ${ac_default_ld_textrel_check} = unset; then
1192 ac_default_ld_textrel_check=yes