]>
Commit | Line | Data |
---|---|---|
e407c74b NC |
1 | # configure.tgt |
2 | # | |
a2c58332 | 3 | # Copyright (C) 2013-2022 Free Software Foundation, Inc. |
e407c74b NC |
4 | # |
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. | |
35c08157 | 9 | # |
e407c74b NC |
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. | |
35c08157 | 14 | # |
e407c74b NC |
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/>. | |
18 | ||
252b5132 RH |
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 | |
22 | # information. | |
23 | ||
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 | |
3336653a | 28 | # targ_extra_libpath additional linker emulations using LIB_PATH |
5063daf7 | 29 | # targ_extra_ofiles additional host-compiled objects needed by the emulation |
534d3119 | 30 | # targ64_extra_emuls additional linker emulations to provide if |
6c19b93b | 31 | # --enable-64-bit-bfd is given or if host is 64 bit. |
534d3119 | 32 | # targ64_extra_libpath additional linker emulations using LIB_PATH if |
6c19b93b | 33 | # --enable-64-bit-bfd is given or if host is 64 bit. |
9c8ebd6a DJ |
34 | # NATIVE_LIB_DIRS library directories to search on this host |
35 | # (if we are a native or sysrooted linker) | |
252b5132 RH |
36 | |
37 | targ_extra_emuls= | |
534d3119 | 38 | targ_extra_libpath= |
d871d478 | 39 | targ_extra_ofiles="ldelf.o ldelfgen.o" |
534d3119 L |
40 | targ64_extra_emuls= |
41 | targ64_extra_libpath= | |
252b5132 | 42 | |
ed1c7ad8 NC |
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: | |
47 | ||
48 | if test "${ac_default_ld_warn_rwx_segments}" = unset; then | |
49 | case "${targ}" in | |
50 | # The CRIS default linker script yields just one segment | |
51 | # as intended, so a rwx segment warning is not helpful. | |
b80b72c0 | 52 | # The HPPA's and SPARC's PLT sections use a constructed trampoline |
ed1c7ad8 NC |
53 | # hence it needs to have a RWX segment. |
54 | # Many MIPS targets use executable segments. | |
55 | cris-*-* | crisv32-*-* | \ | |
56 | hppa*-*-* | \ | |
b80b72c0 RO |
57 | mips*-*-* | \ |
58 | sparc*-*-*) | |
ed1c7ad8 NC |
59 | ac_default_ld_warn_rwx_segments=0 |
60 | ;; | |
61 | *) | |
62 | ;; | |
63 | esac | |
64 | fi | |
65 | ||
66 | if test "${ac_default_ld_warn_execstack}" = 2; then | |
67 | case "${targ}" in | |
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. | |
71 | hppa*-*-* | \ | |
72 | mips*-*-*) | |
73 | ac_default_ld_warn_execstack=0 | |
74 | ;; | |
75 | *) | |
76 | ;; | |
77 | esac | |
78 | fi | |
79 | ||
984b909a AM |
80 | # Please try to keep this table more or less in alphabetic order - it |
81 | # makes it much easier to lookup a specific archictecture. | |
252b5132 | 82 | case "${targ}" in |
a06ea964 | 83 | aarch64_be-*-elf) targ_emul=aarch64elfb |
d871d478 AM |
84 | targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" |
85 | ;; | |
1f568f9a | 86 | aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*) |
12a132db | 87 | targ_emul=aarch64elf |
d871d478 AM |
88 | targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" |
89 | ;; | |
a75cf613 | 90 | aarch64-*-cloudabi*) targ_emul=aarch64cloudabi |
d871d478 AM |
91 | targ_extra_emuls=aarch64cloudabib |
92 | ;; | |
15c7659f | 93 | aarch64-*-freebsd*) targ_emul=aarch64fbsd |
d871d478 AM |
94 | targ_extra_emuls="aarch64fbsdb aarch64elf" |
95 | ;; | |
d5451cd4 | 96 | aarch64-*-fuchsia*) targ_emul=aarch64elf |
d871d478 AM |
97 | targ_extra_emuls="aarch64elfb armelf armelfb" |
98 | ;; | |
9a6465c2 JW |
99 | aarch64_be-*-linux-gnu_ilp32) |
100 | targ_emul=aarch64linux32b | |
101 | targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi" | |
d871d478 AM |
102 | targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" |
103 | ;; | |
9a6465c2 JW |
104 | aarch64-*-linux-gnu_ilp32) |
105 | targ_emul=aarch64linux32 | |
106 | targ_extra_libpath="aarch64linux aarch64linuxb aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" | |
d871d478 AM |
107 | targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" |
108 | ;; | |
a06ea964 | 109 | aarch64_be-*-linux*) targ_emul=aarch64linuxb |
56244278 | 110 | targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" |
d871d478 AM |
111 | targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" |
112 | ;; | |
a06ea964 | 113 | aarch64-*-linux*) targ_emul=aarch64linux |
56244278 | 114 | targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" |
d871d478 AM |
115 | targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" |
116 | ;; | |
d85e70a3 AGI |
117 | aarch64-*-haiku*) targ_emul=aarch64haiku |
118 | targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath" | |
119 | ;; | |
c60b3806 JT |
120 | aarch64-*-pe*) |
121 | targ_emul=aarch64pe | |
122 | targ_extra_ofiles="deffilep.o pep-dll-aarch64.o" | |
123 | ;; | |
e729279b | 124 | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) |
6c19b93b | 125 | targ_emul=elf64alpha_fbsd |
e729279b | 126 | targ_extra_emuls="elf64alpha alpha" |
d871d478 AM |
127 | tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` |
128 | ;; | |
129 | alpha*-*-linux*ecoff*) targ_emul=alpha | |
130 | targ_extra_emuls=elf64alpha | |
131 | tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` | |
132 | ;; | |
133 | alpha*-*-linux-*) targ_emul=elf64alpha | |
134 | targ_extra_emuls=alpha | |
135 | tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'` | |
136 | ;; | |
137 | alpha*-*-osf*) targ_emul=alpha | |
138 | targ_extra_ofiles= | |
139 | ;; | |
140 | alpha*-*-gnu*) targ_emul=elf64alpha | |
141 | ;; | |
142 | alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd | |
143 | ;; | |
144 | alpha*-*-openbsd*) targ_emul=elf64alpha | |
145 | ;; | |
8b351884 | 146 | alpha*-*-*vms*) targ_emul=alphavms |
d871d478 | 147 | targ_extra_ofiles= |
e729279b | 148 | ;; |
984b909a AM |
149 | am33_2.0-*-linux*) targ_emul=elf32am33lin # mn10300 variant |
150 | ;; | |
886a2506 | 151 | arc*-*-elf*) targ_emul=arcelf |
5e4f7e05 | 152 | targ_extra_emuls="arclinux arclinux_nps arcv2elf arcv2elfx" |
6c19b93b | 153 | ;; |
d7488716 AB |
154 | arc*-*-linux*) case "${with_cpu}" in |
155 | nps400) targ_emul=arclinux_nps | |
156 | targ_extra_emuls=arclinux | |
157 | ;; | |
158 | *) targ_emul=arclinux | |
159 | targ_extra_emuls=arclinux_nps | |
160 | ;; | |
161 | esac | |
5e4f7e05 | 162 | targ_extra_emuls="${targ_extra_emuls} arcelf arcv2elf arcv2elfx" |
e729279b | 163 | ;; |
d871d478 AM |
164 | arm*-*-cegcc*) targ_emul=arm_wince_pe |
165 | targ_extra_ofiles="deffilep.o pe-dll.o" | |
166 | LIB_PATH='${tooldir}/lib/w32api' | |
167 | ;; | |
361dff73 | 168 | arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*) |
d871d478 AM |
169 | targ_emul=arm_wince_pe |
170 | targ_extra_ofiles="deffilep.o pe-dll.o" | |
171 | ;; | |
172 | arm-*-pe) targ_emul=armpe | |
173 | targ_extra_ofiles="deffilep.o pe-dll.o" | |
174 | ;; | |
1804dbce | 175 | arm*b-*-freebsd*) targ_emul=armelfb_fbsd |
d871d478 AM |
176 | targ_extra_emuls="armelf_fbsd armelf" |
177 | ;; | |
1804dbce | 178 | arm*-*-freebsd* | arm-*-kfreebsd*-gnu) |
6c19b93b | 179 | targ_emul=armelf_fbsd |
d871d478 AM |
180 | targ_extra_emuls="armelfb_fbsd armelf" |
181 | ;; | |
ab4f385b | 182 | armeb-*-netbsd*) targ_emul=armelfb_nbsd; |
d871d478 AM |
183 | targ_extra_emuls="armelf_nbsd armelf" |
184 | ;; | |
ab4f385b | 185 | arm-*-netbsd*) targ_emul=armelf_nbsd; |
d871d478 AM |
186 | targ_extra_emuls="armelfb_nbsd armelf" |
187 | ;; | |
188 | arm-*-nto*) targ_emul=armnto | |
189 | ;; | |
190 | arm-*-phoenix*) targ_emul=armelf | |
191 | ;; | |
01e6c1a4 | 192 | armeb-*-elf | armeb-*-eabi*) |
d871d478 AM |
193 | targ_emul=armelfb |
194 | ;; | |
1f568f9a | 195 | arm-*-elf | arm*-*-eabi* | arm-*-rtems* | arm-*-genode*) |
d871d478 AM |
196 | targ_emul=armelf |
197 | ;; | |
d871d478 AM |
198 | arm-*-kaos*) targ_emul=armelf |
199 | ;; | |
200 | arm9e-*-elf) targ_emul=armelf | |
201 | ;; | |
0e9dfb46 | 202 | arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi |
fffbd2ef JM |
203 | targ_extra_emuls=armelf_linux_eabi |
204 | targ_extra_libpath=$targ_extra_emuls | |
205 | ;; | |
206 | arm*b-*-linux-*) targ_emul=armelfb_linux | |
207 | targ_extra_emuls="armelfb armelf armelf_linux" | |
208 | targ_extra_libpath="armelf_linux" | |
209 | ;; | |
0e9dfb46 | 210 | arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi |
617a5ada CL |
211 | targ_extra_emuls="armelfb_linux_eabi" |
212 | targ_extra_libpath=$targ_extra_emuls | |
213 | ;; | |
214 | arm*-*-uclinuxfdpiceabi) | |
215 | targ_emul=armelf_linux_eabi | |
216 | targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi" | |
fffbd2ef JM |
217 | targ_extra_libpath=$targ_extra_emuls |
218 | ;; | |
6c19b93b | 219 | arm*-*-linux-*) targ_emul=armelf_linux |
fffbd2ef JM |
220 | targ_extra_emuls="armelf armelfb armelfb_linux" |
221 | targ_extra_libpath="armelfb_linux" | |
222 | ;; | |
b38cadfb | 223 | arm*b-*-nacl*) targ_emul=armelfb_nacl |
bbd19b19 | 224 | targ_extra_emuls="armelf_nacl" |
b38cadfb | 225 | targ_extra_libpath=$targ_extra_emuls |
b38cadfb NC |
226 | ;; |
227 | arm*-*-nacl*) targ_emul=armelf_nacl | |
bbd19b19 | 228 | targ_extra_emuls="armelfb_nacl" |
b38cadfb | 229 | targ_extra_libpath=$targ_extra_emuls |
b38cadfb | 230 | ;; |
0e9dfb46 | 231 | arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi |
7bd1c961 PB |
232 | targ_extra_emuls=armelfb_linux_eabi |
233 | targ_extra_libpath=$targ_extra_emuls | |
234 | ;; | |
fffbd2ef JM |
235 | arm*-*-uclinux*) targ_emul=armelf_linux |
236 | targ_extra_emuls="armelf armelfb armelfb_linux" | |
237 | targ_extra_libpath="armelfb_linux" | |
238 | ;; | |
d871d478 AM |
239 | arm-*-vxworks) targ_emul=armelf_vxworks |
240 | ;; | |
241 | arm*-*-conix*) targ_emul=armelf | |
242 | ;; | |
d5451cd4 JC |
243 | arm*-*-fuchsia*) targ_emul=armelf_fuchsia |
244 | targ_extra_emuls="armelfb_fuchsia armelf armelfb" | |
245 | ;; | |
cc5e4073 | 246 | arm*-*-haiku*) targ_emul=armelf_haiku |
d85e70a3 AGI |
247 | targ_extra_emuls=armelf |
248 | ;; | |
75ca919a | 249 | avr-*-*) targ_emul=avr2 |
f36e8886 | 250 | targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny" |
e729279b | 251 | ;; |
c75b4ebd SH |
252 | bfin-*-elf | bfin-*-rtems*) |
253 | targ_emul=elf32bfin | |
c2c09cab NC |
254 | targ_extra_emuls="elf32bfinfd" |
255 | targ_extra_libpath=$targ_extra_emuls | |
256 | ;; | |
3f2dad24 BS |
257 | bfin-*-uclinux*) targ_emul=elf32bfin; |
258 | targ_extra_emuls="elf32bfinfd" | |
259 | targ_extra_libpath=$targ_extra_emuls | |
260 | ;; | |
bec9537e MF |
261 | bfin-*-linux-uclibc*) targ_emul=elf32bfinfd; |
262 | targ_extra_emuls="elf32bfin" | |
3f2dad24 BS |
263 | targ_extra_libpath=$targ_extra_emuls |
264 | ;; | |
d871d478 AM |
265 | bpf-*-*) targ_emul=elf64bpf |
266 | ;; | |
267 | cr16-*-elf*) targ_emul=elf32cr16 | |
268 | ;; | |
1268a053 | 269 | cris-*-*aout*) targ_emul=crisaout |
9d06555c | 270 | targ_extra_emuls="criself crislinux" |
d871d478 AM |
271 | targ_extra_libpath=$targ_extra_emuls |
272 | ;; | |
ed84e695 | 273 | cris-*-linux-* | crisv32-*-linux-*) |
d871d478 AM |
274 | targ_emul=crislinux |
275 | ;; | |
a0055007 | 276 | cris-*-* | crisv32-*-*) targ_emul=criself |
1268a053 | 277 | targ_extra_emuls="crisaout crislinux" |
e729279b NC |
278 | targ_extra_libpath=$targ_extra_emuls |
279 | ;; | |
280 | crx-*-elf*) targ_emul=elf32crx | |
281 | ;; | |
b8891f8d | 282 | |
d871d478 AM |
283 | csky-*-elf*) targ_emul=cskyelf |
284 | ;; | |
285 | csky-*-linux*) targ_emul=cskyelf_linux | |
286 | ;; | |
b8891f8d | 287 | |
d871d478 AM |
288 | d10v-*-*) targ_emul=d10velf |
289 | ;; | |
290 | d30v-*-*ext*) targ_emul=d30v_e | |
291 | targ_extra_emuls="d30velf d30v_o" | |
292 | targ_extra_ofiles=ldelfgen.o | |
293 | ;; | |
294 | d30v-*-*onchip*) targ_emul=d30v_o | |
295 | targ_extra_emuls="d30velf d30v_e" | |
296 | targ_extra_ofiles=ldelfgen.o | |
297 | ;; | |
298 | d30v-*-*) targ_emul=d30velf | |
299 | targ_extra_emuls="d30v_e d30v_o" | |
300 | targ_extra_ofiles=ldelfgen.o | |
fb33b906 | 301 | ;; |
e729279b | 302 | dlx-*-elf*) targ_emul=elf32_dlx |
d871d478 | 303 | targ_extra_ofiles=ldelfgen.o |
252b5132 | 304 | ;; |
319c2dbe | 305 | epiphany-*-*) targ_emul=elf32epiphany |
f204ddb8 | 306 | targ_extra_emuls="elf32epiphany_4x4" |
cfb8c092 | 307 | ;; |
d871d478 AM |
308 | fido*-*-elf*) targ_emul=m68kelf |
309 | ;; | |
e729279b | 310 | fr30-*-*) targ_emul=elf32fr30 |
d871d478 AM |
311 | targ_extra_ofiles=ldelfgen.o |
312 | ;; | |
313 | frv-*-*linux*) targ_emul=elf32frvfd | |
252b5132 | 314 | ;; |
d871d478 AM |
315 | frv-*-*) targ_emul=elf32frv |
316 | targ_extra_emuls="elf32frvfd" | |
252b5132 | 317 | ;; |
984b909a | 318 | ft32-*-*) targ_emul=elf32ft32 |
d871d478 | 319 | targ_extra_ofiles=ldelfgen.o |
20135e4c | 320 | ;; |
e729279b NC |
321 | h8300-*-elf* | h8300-*-rtems*) |
322 | targ_emul=h8300elf; | |
d871d478 AM |
323 | targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" |
324 | ;; | |
5518c738 YS |
325 | h8300-*-linux*) |
326 | targ_emul=h8300elf_linux; | |
d871d478 AM |
327 | targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux" |
328 | ;; | |
329 | hppa*64*-*-linux-*) targ_emul=hppa64linux | |
330 | ;; | |
331 | hppa*64*-hpux*) targ_emul=elf64hppa | |
332 | ;; | |
333 | hppa*-*-linux-*) targ_emul=hppalinux | |
334 | ;; | |
335 | hppa*-*-*elf*) targ_emul=hppaelf | |
336 | ;; | |
337 | hppa*-*-lites*) targ_emul=hppaelf | |
338 | ;; | |
339 | hppa*-*-netbsd*) targ_emul=hppanbsd | |
340 | ;; | |
e729279b | 341 | hppa*-*-openbsd*) targ_emul=hppaobsd |
a1836d49 | 342 | ;; |
d871d478 AM |
343 | i[3-7]86-*-nto-qnx*) targ_emul=i386nto |
344 | ;; | |
345 | i[3-7]86-*-go32) targ_emul=i386go32 | |
346 | targ_extra_ofiles= | |
347 | ;; | |
348 | i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 | |
349 | targ_extra_ofiles= | |
350 | ;; | |
351 | i[3-7]86-*-lynxos*) targ_emul=i386lynx | |
352 | ;; | |
7e0a8112 | 353 | i[3-7]86-*-aros*) targ_emul=elf_i386 |
d871d478 AM |
354 | targ_extra_emuls=elf_iamcu |
355 | ;; | |
7e0a8112 | 356 | i[3-7]86-*-rdos*) targ_emul=elf_i386 |
d871d478 AM |
357 | targ_extra_emuls=elf_iamcu |
358 | ;; | |
d871d478 AM |
359 | i[3-7]86-*-bsd) targ_emul=i386bsd |
360 | targ_extra_ofiles= | |
361 | ;; | |
362 | i[3-7]86-*-bsd386) targ_emul=i386bsd | |
363 | targ_extra_ofiles= | |
364 | ;; | |
365 | i[3-7]86-*-bsdi*) targ_emul=i386bsd | |
366 | targ_extra_ofiles= | |
367 | ;; | |
ed84e695 | 368 | i[3-7]86-*-linux-*) targ_emul=elf_i386 |
c65c21e1 | 369 | targ_extra_emuls="elf_iamcu" |
e961c696 | 370 | targ64_extra_emuls="elf_x86_64 elf32_x86_64" |
d871d478 AM |
371 | targ64_extra_libpath="elf_x86_64 elf32_x86_64" |
372 | ;; | |
f2e2d2f5 | 373 | i[3-7]86-*-redox*) targ_emul=elf_i386 |
d871d478 AM |
374 | targ_extra_emuls=elf_x86_64 |
375 | ;; | |
7e0a8112 | 376 | i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 |
d871d478 AM |
377 | targ_extra_emuls=elf_iamcu |
378 | ;; | |
a6cc6b3b | 379 | i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2 |
e961c696 | 380 | targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64" |
d19628a5 | 381 | targ_extra_libpath=$targ_extra_emuls |
6c19b93b | 382 | ;; |
7e0a8112 | 383 | i[3-7]86-*-unixware) targ_emul=elf_i386 |
d871d478 AM |
384 | targ_extra_emuls=elf_iamcu |
385 | ;; | |
80c7c40a | 386 | i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso |
6c19b93b | 387 | targ_extra_emuls="elf_i386" |
d19628a5 | 388 | targ_extra_libpath=$targ_extra_emuls |
6c19b93b | 389 | ;; |
ab4f385b JE |
390 | i[3-7]86-*-netbsdpe*) targ_emul=i386pe |
391 | targ_extra_ofiles="deffilep.o pe-dll.o" | |
392 | ;; | |
393 | i[3-7]86-*-netbsd* | \ | |
4615568e | 394 | i[3-7]86-*-netbsd*-gnu* | \ |
b88237bc AM |
395 | i[3-7]86-*-knetbsd*-gnu | \ |
396 | i[3-7]86-*-openbsd*) | |
a06a29f2 | 397 | targ_emul=elf_i386 |
d871d478 AM |
398 | targ_extra_emuls="elf_iamcu" |
399 | ;; | |
5197d474 | 400 | i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu |
d871d478 AM |
401 | targ_extra_emuls=elf_i386 |
402 | ;; | |
1f568f9a | 403 | i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*) |
c75b4ebd | 404 | targ_emul=elf_i386 |
d871d478 AM |
405 | targ_extra_emuls=elf_iamcu |
406 | ;; | |
5b806d27 | 407 | i[3-7]86-*-dragonfly*) targ_emul=elf_i386 |
d871d478 AM |
408 | targ_extra_emuls="elf_iamcu i386bsd" |
409 | ;; | |
5b806d27 | 410 | i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) |
6c19b93b | 411 | targ_emul=elf_i386_fbsd |
d871d478 AM |
412 | targ_extra_emuls="elf_i386 elf_iamcu i386bsd" |
413 | ;; | |
7e0a8112 | 414 | i[3-7]86-*-gnu*) targ_emul=elf_i386 |
d871d478 AM |
415 | targ_extra_emuls=elf_iamcu |
416 | ;; | |
417 | i[3-7]86-*-msdos*) targ_emul=i386msdos | |
418 | targ_extra_emuls=i386aout | |
419 | targ_extra_ofiles= | |
420 | ;; | |
421 | i[3-7]86-*-moss*) targ_emul=i386moss | |
422 | targ_extra_emuls=i386msdos | |
d871d478 | 423 | ;; |
80c7c40a | 424 | i[3-7]86-*-winnt*) targ_emul=i386pe ; |
d871d478 AM |
425 | targ_extra_ofiles="deffilep.o pe-dll.o" |
426 | ;; | |
80c7c40a | 427 | i[3-7]86-*-pe) targ_emul=i386pe ; |
d871d478 AM |
428 | targ_extra_ofiles="deffilep.o pe-dll.o" |
429 | ;; | |
80c7c40a | 430 | i[3-7]86-*-cygwin*) targ_emul=i386pe ; |
5063daf7 | 431 | targ_extra_ofiles="deffilep.o pe-dll.o" ; |
d871d478 AM |
432 | test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' |
433 | ;; | |
80c7c40a | 434 | i[3-7]86-*-mingw32*) targ_emul=i386pe ; |
d871d478 AM |
435 | targ_extra_ofiles="deffilep.o pe-dll.o" |
436 | ;; | |
80c7c40a | 437 | i[3-7]86-*-interix*) targ_emul=i386pe_posix; |
d871d478 AM |
438 | targ_extra_ofiles="deffilep.o pe-dll.o" |
439 | ;; | |
440 | i[3-7]86-*-beospe*) targ_emul=i386beos | |
441 | targ_extra_ofiles= | |
442 | ;; | |
443 | i[3-7]86-*-beos*) targ_emul=elf_i386_be | |
444 | ;; | |
d85e70a3 AGI |
445 | i[3-7]86-*-haiku*) targ_emul=elf_i386_haiku |
446 | ;; | |
d871d478 AM |
447 | i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks |
448 | ;; | |
e729279b | 449 | i[3-7]86-*-chaos) targ_emul=elf_i386_chaos |
8af6dd41 | 450 | ;; |
d871d478 AM |
451 | ia16-*-elf*) targ_emul=elf_i386 |
452 | targ_extra_emuls=i386msdos | |
453 | ;; | |
454 | ia64-*-elf*) targ_emul=elf64_ia64 | |
455 | ;; | |
e729279b | 456 | ia64-*-freebsd* | ia64-*-kfreebsd*-gnu) |
6c19b93b | 457 | targ_emul=elf64_ia64_fbsd |
d871d478 AM |
458 | targ_extra_emuls="elf64_ia64" |
459 | ;; | |
460 | ia64-*-netbsd*) targ_emul=elf64_ia64 | |
461 | ;; | |
462 | ia64-*-linux*) targ_emul=elf64_ia64 | |
463 | ;; | |
464 | ia64-*-*vms*) targ_emul=elf64_ia64_vms | |
465 | targ_extra_ofiles=ldelfgen.o | |
466 | ;; | |
e729279b | 467 | ia64-*-aix*) targ_emul=elf64_aix |
7a33bc10 | 468 | ;; |
e729279b | 469 | ip2k-*-elf) targ_emul=elf32ip2k |
252b5132 | 470 | ;; |
d871d478 AM |
471 | iq2000-*-elf) targ_emul=elf32iq2000 |
472 | targ_extra_emuls="elf32iq10" | |
473 | targ_extra_ofiles=ldelfgen.o | |
6c19b93b | 474 | ;; |
d871d478 AM |
475 | lm32-*-*linux*) targ_emul=elf32lm32fd |
476 | ;; | |
477 | lm32-*-*) targ_emul=elf32lm32 | |
478 | targ_extra_emuls="elf32lm32fd" | |
ed71e111 | 479 | ;; |
ae47e309 | 480 | m32c-*-elf) |
8a2a2dbb | 481 | targ_emul=elf32m32c |
7a33bc10 | 482 | ;; |
d871d478 AM |
483 | m32r*le-*-elf*) targ_emul=m32rlelf |
484 | ;; | |
ae47e309 | 485 | m32r*-*-elf*) |
d871d478 AM |
486 | targ_emul=m32relf |
487 | ;; | |
488 | m32r*le-*-linux-*) targ_emul=m32rlelf_linux | |
489 | ;; | |
6c19b93b | 490 | m32r*-*-linux-*) targ_emul=m32relf_linux |
2d92cb7d | 491 | ;; |
5a68afcf | 492 | m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf |
d871d478 AM |
493 | targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" |
494 | ;; | |
5a68afcf | 495 | m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf |
d871d478 AM |
496 | targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" |
497 | ;; | |
ab4f385b | 498 | m68*-*-netbsd*) targ_emul=m68kelfnbsd |
d871d478 | 499 | ;; |
d85e70a3 AGI |
500 | m68*-*-haiku*) targ_emul=m68kelf |
501 | ;; | |
d871d478 AM |
502 | m68*-*-*) targ_emul=m68kelf |
503 | ;; | |
e729279b | 504 | mcore-*-pe) targ_emul=mcorepe ; |
d871d478 AM |
505 | targ_extra_ofiles="deffilep.o pe-dll.o" |
506 | ;; | |
e729279b NC |
507 | mcore-*-elf) targ_emul=elf32mcore |
508 | ;; | |
d871d478 AM |
509 | mep-*-elf) targ_emul=elf32mep |
510 | ;; | |
511 | metag-*-*) targ_emul=elf32metag | |
512 | ;; | |
f23200ad ME |
513 | microblazeel*-linux*) targ_emul="elf32mbel_linux" |
514 | targ_extra_emuls="elf32mb_linux" | |
515 | ;; | |
516 | microblaze*-linux*) targ_emul="elf32mb_linux" | |
517 | targ_extra_emuls="elf32mbel_linux" | |
518 | ;; | |
519 | microblazeel*) targ_emul=elf32microblazeel | |
520 | targ_extra_emuls=elf32microblaze | |
521 | ;; | |
522 | microblaze*) targ_emul=elf32microblaze | |
523 | targ_extra_emuls=elf32microblazeel | |
524 | ;; | |
d871d478 AM |
525 | mips*-sgi-irix5*) targ_emul=elf32bsmip |
526 | ;; | |
dc831978 | 527 | mips*-sgi-irix6*) targ_emul=elf32bmipn32 |
6c19b93b | 528 | targ_extra_emuls="elf32bsmip elf64bmip" |
d871d478 AM |
529 | targ_extra_libpath=$targ_extra_emuls |
530 | ;; | |
d85e70a3 AGI |
531 | mips*el-*-haiku*) targ_emul=elf_mipsel_haiku |
532 | targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" | |
533 | ;; | |
aaa2ab3d NH |
534 | mips*el-*-netbsd*) targ_emul=elf32ltsmip |
535 | targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" | |
536 | ;; | |
537 | mips*-*-netbsd*) targ_emul=elf32btsmip | |
538 | targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" | |
6c19b93b | 539 | ;; |
b7f54058 MR |
540 | mips64el-*-openbsd*) targ_emul=elf64ltsmip |
541 | targ_extra_emuls=elf64btsmip | |
542 | ;; | |
543 | mips64-*-openbsd*) targ_emul=elf64btsmip | |
544 | targ_extra_emuls=elf64ltsmip | |
545 | ;; | |
d871d478 AM |
546 | mips*vr4300el-*-elf*) targ_emul=elf32l4300 |
547 | ;; | |
548 | mips*vr4300-*-elf*) targ_emul=elf32b4300 | |
549 | ;; | |
550 | mips*vr4100el-*-elf*) targ_emul=elf32l4300 | |
551 | ;; | |
552 | mips*vr4100-*-elf*) targ_emul=elf32b4300 | |
553 | ;; | |
554 | mips*vr5000el-*-elf*) targ_emul=elf32l4300 | |
555 | ;; | |
556 | mips*vr5000-*-elf*) targ_emul=elf32b4300 | |
557 | ;; | |
f21cd979 MR |
558 | mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*) |
559 | targ_emul=elf32ltsmip | |
d871d478 AM |
560 | targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" |
561 | ;; | |
a9d58c06 | 562 | mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) |
c76b75fd | 563 | targ_emul=elf32btsmip |
d871d478 AM |
564 | targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" |
565 | ;; | |
e407c74b NC |
566 | mips64*el-ps2-elf*) targ_emul=elf32lr5900n32 |
567 | targ_extra_emuls="elf32lr5900" | |
d871d478 AM |
568 | targ_extra_libpath=$targ_extra_emuls |
569 | ;; | |
e407c74b NC |
570 | mips*el-ps2-elf*) targ_emul=elf32lr5900 |
571 | targ_extra_emuls="elf32lr5900n32" | |
d871d478 AM |
572 | targ_extra_libpath=$targ_extra_emuls |
573 | ;; | |
574 | mips*el-*-elf*) targ_emul=elf32elmip | |
575 | ;; | |
c75b4ebd | 576 | mips*-*-elf* | mips*-*-rtems*) |
d871d478 AM |
577 | targ_emul=elf32ebmip |
578 | ;; | |
0a44bf69 | 579 | mips*el-*-vxworks*) targ_emul=elf32elmipvxworks |
d871d478 AM |
580 | targ_extra_emuls="elf32ebmipvxworks" |
581 | ;; | |
0a44bf69 | 582 | mips*-*-vxworks*) targ_emul=elf32ebmipvxworks |
d871d478 AM |
583 | targ_extra_emuls="elf32elmipvxworks" |
584 | ;; | |
585 | mips*-*-windiss) targ_emul=elf32mipswindiss | |
586 | ;; | |
ed84e695 | 587 | mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 |
7808a785 | 588 | targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" |
d871d478 AM |
589 | targ_extra_libpath=$targ_extra_emuls |
590 | ;; | |
ed84e695 | 591 | mips64*-*-linux-*) targ_emul=elf32btsmipn32 |
7808a785 | 592 | targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" |
d871d478 AM |
593 | targ_extra_libpath=$targ_extra_emuls |
594 | ;; | |
ed84e695 | 595 | mips*el-*-linux-*) targ_emul=elf32ltsmip |
919e35ed | 596 | targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" |
d871d478 AM |
597 | targ_extra_libpath=$targ_extra_emuls |
598 | ;; | |
ed84e695 | 599 | mips*-*-linux-*) targ_emul=elf32btsmip |
919e35ed | 600 | targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" |
d871d478 AM |
601 | targ_extra_libpath=$targ_extra_emuls |
602 | ;; | |
cae4ddc6 | 603 | mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu) |
aeffff67 RS |
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" | |
d871d478 AM |
606 | targ_extra_libpath=$targ_extra_emuls |
607 | ;; | |
cae4ddc6 | 608 | mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) |
aeffff67 RS |
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" | |
d871d478 AM |
611 | targ_extra_libpath=$targ_extra_emuls |
612 | ;; | |
cae4ddc6 | 613 | mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu) |
aeffff67 RS |
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" | |
d871d478 AM |
616 | targ_extra_libpath=$targ_extra_emuls |
617 | ;; | |
cae4ddc6 | 618 | mips*-*-freebsd* | mips*-*-kfreebsd*-gnu) |
aeffff67 RS |
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" | |
d871d478 AM |
621 | targ_extra_libpath=$targ_extra_emuls |
622 | ;; | |
6c19b93b | 623 | mips*-*-sysv4*) targ_emul=elf32btsmip |
e729279b | 624 | ;; |
3c3bdf30 NC |
625 | mmix-*-*) targ_emul=mmo |
626 | targ_extra_emuls=elf64mmix | |
627 | ;; | |
d871d478 AM |
628 | mn10200-*-*) targ_emul=mn10200 |
629 | targ_extra_ofiles=ldelfgen.o | |
630 | ;; | |
e729279b | 631 | mn10300-*-*) targ_emul=mn10300 |
fb33b906 | 632 | ;; |
984b909a AM |
633 | moxie-*-moxiebox*) targ_emul=moxiebox |
634 | targ_extra_ofiles=ldelfgen.o | |
635 | ;; | |
636 | moxie-*-*) targ_emul=elf32moxie | |
252b5132 | 637 | ;; |
6c19b93b | 638 | msp430-*-*) targ_emul=msp430elf |
1ade0651 | 639 | targ_extra_emuls="msp430X" |
d871d478 | 640 | targ_extra_ofiles=ldelfgen.o |
e729279b | 641 | ;; |
984b909a AM |
642 | mt-*elf) targ_emul=elf32mt |
643 | targ_extra_ofiles=ldelfgen.o | |
644 | ;; | |
35c08157 KLC |
645 | nds32*le-*-elf*) targ_emul=nds32elf |
646 | targ_extra_emuls="nds32elf16m nds32belf nds32belf16m" | |
647 | ;; | |
648 | nds32*be-*-elf*) targ_emul=nds32belf | |
649 | targ_extra_emuls="nds32elf nds32elf16m nds32belf16m" | |
650 | ;; | |
d871d478 AM |
651 | nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux |
652 | ;; | |
653 | nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux | |
654 | ;; | |
655 | nios2*-*-linux*) targ_emul=nios2linux | |
656 | ;; | |
657 | nios2*-*-*) targ_emul=nios2elf | |
658 | ;; | |
659 | ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha | |
660 | targ_extra_ofiles= | |
661 | ;; | |
41ee6d14 | 662 | ns32k-*-*bsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd |
d871d478 | 663 | targ_extra_ofiles= |
252b5132 | 664 | ;; |
c75b4ebd | 665 | or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*) |
d871d478 AM |
666 | targ_emul=elf32or1k |
667 | ;; | |
668 | or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux | |
669 | ;; | |
e729279b | 670 | pdp11-*-*) targ_emul=pdp11 |
d871d478 | 671 | targ_extra_ofiles= |
e729279b | 672 | ;; |
6c19b93b | 673 | pjl*-*-*) targ_emul=pjlelf |
d871d478 AM |
674 | targ_extra_emuls="elf_i386 elf_iamcu" |
675 | ;; | |
6c19b93b | 676 | pj*-*-*) targ_emul=pjelf |
d871d478 | 677 | targ_extra_ofiles=ldelfgen.o |
e729279b | 678 | ;; |
13dfd2d0 | 679 | powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) |
bd59d916 AM |
680 | targ_emul=elf32ppc_fbsd |
681 | targ_extra_emuls="elf32ppc elf32ppcsim" | |
fb33b906 | 682 | targ_extra_libpath=elf32ppc; |
d871d478 AM |
683 | tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` |
684 | ;; | |
bd59d916 AM |
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 | |
691 | ;; | |
6afcdeb3 BB |
692 | powerpc64le-*-freebsd*) |
693 | targ_emul=elf64lppc_fbsd | |
694 | targ_extra_emuls="elf64lppc" | |
695 | ;; | |
49926cd0 AM |
696 | powerpc-*-vxworks*) |
697 | targ_emul=elf32ppcvxworks | |
d871d478 AM |
698 | targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" |
699 | ;; | |
49926cd0 AM |
700 | powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ |
701 | | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \ | |
c75b4ebd | 702 | | powerpc*-*-rtems* \ |
49926cd0 AM |
703 | | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*) |
704 | case "${targ}" in | |
4811ccb4 AM |
705 | powerpc64*) |
706 | targ_emul=elf64ppc | |
707 | targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" | |
708 | targ_extra_libpath="elf32ppc elf32ppclinux" ;; | |
709 | *linux*) | |
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 ;; | |
715 | *) | |
716 | targ_emul=elf32ppc | |
717 | targ_extra_emuls="elf32ppclinux elf32ppcsim" | |
718 | targ_extra_libpath=elf32ppclinux | |
719 | targ64_extra_emuls=elf64ppc | |
720 | targ64_extra_libpath=elf64ppc ;; | |
49926cd0 | 721 | esac |
4811ccb4 AM |
722 | td=tdir_elf32ppc |
723 | td64=tdir_elf64ppc | |
724 | s=s/ppc/lppc/g | |
49926cd0 | 725 | case "${targ}" in |
4811ccb4 AM |
726 | powerpcle-* | powerpc64le-*) |
727 | for z in td td64 targ_emul targ_extra_emuls \ | |
728 | targ_extra_libpath targ64_extra_emuls \ | |
729 | targ64_extra_libpath | |
730 | do | |
731 | eval ${z}=\"\`echo \$${z} \| sed -e $s\`\" | |
732 | done | |
733 | s=s/lppc/ppc/g ;; | |
734 | esac | |
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/^[^-]*//'` | |
740 | le=le | |
741 | case "${cpu}" in | |
742 | *little) le=little | |
743 | esac | |
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 | |
752 | do | |
753 | eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\" | |
754 | done | |
755 | for z in targ64_extra_emuls targ64_extra_libpath | |
756 | do | |
757 | eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\" | |
758 | done | |
759 | td=`echo "${td}" | sed -e $s` | |
760 | td64=`echo "${td64}" | sed -e $s` | |
761 | case "${targ}" in | |
762 | powerpcle-* | powerpc64le-*) | |
763 | cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;; | |
764 | *) | |
765 | cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;; | |
766 | esac | |
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}" | |
773 | ;; | |
d871d478 AM |
774 | powerpc-*-nto*) targ_emul=elf32ppcnto |
775 | ;; | |
776 | powerpcle-*-nto*) targ_emul=elf32lppcnto | |
777 | ;; | |
778 | powerpc-*-macos*) targ_emul=ppcmacos | |
779 | targ_extra_ofiles= | |
780 | ;; | |
d871d478 AM |
781 | powerpc-*-aix[5-9]*) targ_emul=aix5ppc |
782 | targ_extra_ofiles= | |
783 | ;; | |
784 | powerpc-*-aix*) targ_emul=aixppc | |
785 | targ_extra_ofiles= | |
786 | ;; | |
787 | powerpc-*-beos*) targ_emul=aixppc | |
788 | targ_extra_ofiles= | |
789 | ;; | |
d85e70a3 AGI |
790 | powerpc-*-haiku*) targ_emul=elf32ppchaiku |
791 | ;; | |
d871d478 AM |
792 | powerpc-*-windiss*) targ_emul=elf32ppcwindiss |
793 | ;; | |
d871d478 AM |
794 | pru*-*-*) targ_emul=pruelf |
795 | ;; | |
fbc09e7a MC |
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 | |
799 | ;; | |
10d98088 | 800 | riscv32*-*-linux*) targ_emul=elf32lriscv |
fbc09e7a MC |
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 | |
803 | ;; | |
804 | riscvbe-*-* | riscv32be*-*-*) | |
805 | targ_emul=elf32briscv | |
806 | targ_extra_emuls="elf64briscv elf32lriscv elf64lriscv" | |
d871d478 AM |
807 | targ_extra_libpath=$targ_extra_emuls |
808 | ;; | |
bb11866d JW |
809 | riscv-*-* | riscv32*-*-*) |
810 | targ_emul=elf32lriscv | |
fbc09e7a MC |
811 | targ_extra_emuls="elf64lriscv elf32briscv elf64briscv" |
812 | targ_extra_libpath=$targ_extra_emuls | |
813 | ;; | |
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" | |
d871d478 AM |
816 | targ_extra_libpath=$targ_extra_emuls |
817 | ;; | |
10d98088 | 818 | riscv64*-*-linux*) targ_emul=elf64lriscv |
fbc09e7a MC |
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 | |
821 | ;; | |
822 | riscv64be*-*-*) targ_emul=elf64briscv | |
823 | targ_extra_emuls="elf32briscv elf64lriscv elf32lriscv" | |
d871d478 AM |
824 | targ_extra_libpath=$targ_extra_emuls |
825 | ;; | |
e23eba97 | 826 | riscv64*-*-*) targ_emul=elf64lriscv |
fbc09e7a | 827 | targ_extra_emuls="elf32lriscv elf64briscv elf32briscv" |
d871d478 AM |
828 | targ_extra_libpath=$targ_extra_emuls |
829 | ;; | |
830 | rs6000-*-aix[5-9]*) targ_emul=aix5rs6 | |
831 | targ_extra_ofiles= | |
832 | ;; | |
e729279b | 833 | rs6000-*-aix*) targ_emul=aixrs6 |
d871d478 AM |
834 | targ_extra_ofiles= |
835 | ;; | |
836 | rl78-*-*) targ_emul=elf32rl78 | |
837 | ;; | |
c578f16e YS |
838 | rx-*-linux*) targ_emul=elf32rx_linux |
839 | ;; | |
d871d478 | 840 | rx-*-*) targ_emul=elf32rx |
e729279b | 841 | ;; |
984b909a AM |
842 | s12z-*-*) targ_emul=m9s12zelf |
843 | targ_extra_ofiles=ldelfgen.o | |
844 | ;; | |
6c19b93b | 845 | s390x-*-linux*) targ_emul=elf64_s390 |
f52d1d64 JJ |
846 | targ_extra_emuls=elf_s390 |
847 | targ_extra_libpath=$targ_extra_emuls | |
d871d478 AM |
848 | tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` |
849 | ;; | |
2fbd2a87 | 850 | s390x-*-tpf*) targ_emul=elf64_s390 |
d871d478 AM |
851 | tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` |
852 | ;; | |
6c19b93b | 853 | s390-*-linux*) targ_emul=elf_s390 |
534d3119 L |
854 | targ64_extra_emuls=elf64_s390 |
855 | targ64_extra_libpath=elf64_s390 | |
856 | tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` | |
e729279b | 857 | ;; |
6c19b93b | 858 | score-*-elf) targ_emul=score7_elf |
d871d478 AM |
859 | targ_extra_emuls=score3_elf |
860 | ;; | |
e729279b | 861 | sh-*-linux*) targ_emul=shlelf_linux |
0e1e4a75 | 862 | targ_extra_emuls="shelf_linux shlelf_fd shelf_fd" |
d871d478 AM |
863 | targ_extra_libpath=shelf_linux |
864 | ;; | |
a39d2e82 | 865 | sh*eb-*-linux*) targ_emul=shelf_linux |
d871d478 AM |
866 | targ_extra_emuls="shelf_fd" |
867 | ;; | |
a39d2e82 | 868 | sh*-*-linux*) targ_emul=shlelf_linux |
d871d478 AM |
869 | targ_extra_emuls="shlelf_fd" |
870 | ;; | |
ab4f385b JE |
871 | sh*l*-*-netbsdaout*) targ_emul=shl |
872 | targ_extra_emuls=sh | |
873 | ;; | |
874 | sh*-*-netbsdaout*) targ_emul=sh | |
875 | targ_extra_emuls=shl | |
876 | ;; | |
877 | sh*l*-*-netbsd*) targ_emul=shlelf_nbsd | |
d871d478 AM |
878 | targ_extra_emuls=shelf_nbsd |
879 | ;; | |
ab4f385b | 880 | sh*-*-netbsd*) targ_emul=shelf_nbsd |
d871d478 AM |
881 | targ_extra_emuls=shlelf_nbsd |
882 | ;; | |
e729279b NC |
883 | shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*) |
884 | targ_emul=shlelf | |
d871d478 AM |
885 | targ_extra_emuls="shelf shl sh" |
886 | ;; | |
55e6e397 | 887 | sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*) |
e729279b | 888 | targ_emul=shelf |
d871d478 AM |
889 | targ_extra_emuls="shlelf sh shl" |
890 | ;; | |
ed6ba298 NS |
891 | sh-*-uclinux* | sh[12]-*-uclinux*) |
892 | targ_emul=shelf_uclinux | |
d871d478 AM |
893 | targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd" |
894 | ;; | |
55e6e397 | 895 | sh-*-vxworks) targ_emul=shelf_vxworks |
d871d478 AM |
896 | targ_extra_emuls=shlelf_vxworks |
897 | ;; | |
e729279b | 898 | sh-*-nto*) targ_emul=shelf_nto |
d871d478 AM |
899 | targ_extra_emuls=shlelf_nto |
900 | ;; | |
e729279b | 901 | sh-*-pe) targ_emul=shpe ; |
d871d478 AM |
902 | targ_extra_ofiles="deffilep.o pe-dll.o" |
903 | ;; | |
904 | sh-*-*) targ_emul=sh; | |
905 | targ_extra_emuls=shl | |
906 | targ_extra_ofiles= | |
907 | ;; | |
e729279b NC |
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 | |
d871d478 AM |
912 | tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` |
913 | ;; | |
e729279b | 914 | sparc64-*-linux-*) targ_emul=elf64_sparc |
c9098af4 | 915 | targ_extra_emuls="elf32_sparc" |
e729279b | 916 | targ_extra_libpath=elf32_sparc |
d871d478 AM |
917 | tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` |
918 | ;; | |
c9098af4 | 919 | sparc64-*-*bsd*) targ_emul=elf64_sparc |
d871d478 AM |
920 | targ_extra_emuls="elf32_sparc" |
921 | ;; | |
c9098af4 AM |
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 | |
d871d478 AM |
926 | tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` |
927 | ;; | |
d85e70a3 AGI |
928 | sparc64-*-haiku*) targ_emul=elf64_sparc |
929 | ;; | |
d871d478 AM |
930 | sparc64-*-*) targ_emul=elf64_sparc |
931 | ;; | |
e729279b | 932 | sparc*-*-linux-*) targ_emul=elf32_sparc |
c9098af4 | 933 | targ_extra_emuls="elf64_sparc" |
e729279b | 934 | targ_extra_libpath=elf64_sparc |
d871d478 AM |
935 | tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` |
936 | ;; | |
e729279b | 937 | sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) |
a6cc6b3b | 938 | targ_emul=elf32_sparc_sol2 |
d871d478 AM |
939 | targ_extra_emuls=elf32_sparc |
940 | ;; | |
a6cc6b3b RO |
941 | sparc-*-solaris2*) targ_emul=elf32_sparc_sol2 |
942 | targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc" | |
e729279b | 943 | targ_extra_libpath=$targ_extra_emuls |
d871d478 AM |
944 | tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` |
945 | ;; | |
946 | sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks | |
947 | ;; | |
948 | sparc*-*-*) targ_emul=elf32_sparc | |
949 | ;; | |
950 | spu-*-elf*) targ_emul=elf32_spu | |
951 | ;; | |
d871d478 AM |
952 | tic30-*-*coff*) targ_emul=tic30coff |
953 | targ_extra_ofiles= | |
954 | ;; | |
955 | tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff | |
956 | targ_extra_emuls="tic3xcoff tic3xcoff_onchip" | |
957 | targ_extra_ofiles= | |
958 | ;; | |
959 | tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff | |
960 | targ_extra_ofiles= | |
961 | ;; | |
2a616379 BS |
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 | |
965 | ;; | |
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 | |
40b36596 | 969 | ;; |
aa137e4d | 970 | tilegx-*-*) targ_emul=elf64tilegx |
fb6cedde | 971 | targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be" |
d871d478 AM |
972 | targ_extra_libpath=$targ_extra_emuls |
973 | ;; | |
fb6cedde WL |
974 | tilegxbe-*-*) targ_emul=elf64tilegx_be |
975 | targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be" | |
d871d478 AM |
976 | targ_extra_libpath=$targ_extra_emuls |
977 | ;; | |
978 | tilepro-*-*) targ_emul=elf32tilepro | |
979 | ;; | |
de863c74 NC |
980 | v850*-*-*) targ_emul=v850_rh850 |
981 | targ_extra_emuls=v850 | |
e729279b | 982 | ;; |
ab4f385b | 983 | vax-*-netbsdaout*) targ_emul=vaxnbsd |
d871d478 AM |
984 | targ_extra_emuls=elf32vax |
985 | ;; | |
ab4f385b JE |
986 | vax-*-netbsd*) targ_emul=elf32vax |
987 | targ_extra_emuls=vaxnbsd | |
988 | ;; | |
6c19b93b | 989 | vax-*-linux-*) targ_emul=elf32vax |
e729279b | 990 | ;; |
c18392d8 EB |
991 | visium-*-elf) targ_emul=elf32visium |
992 | ;; | |
984b909a AM |
993 | x86_64-*-rdos*) targ_emul=elf64rdos |
994 | ;; | |
995 | x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi | |
996 | ;; | |
d85e70a3 AGI |
997 | x86_64-*-haiku*) targ_emul=elf_x86_64_haiku |
998 | targ_extra_emuls="elf_x86_64 elf_i386_haiku" | |
999 | ;; | |
984b909a | 1000 | x86_64-*-linux-gnux32) targ_emul=elf32_x86_64 |
e961c696 JB |
1001 | targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu" |
1002 | targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64" | |
984b909a AM |
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/'` | |
1005 | ;; | |
1006 | x86_64-*-linux-*) targ_emul=elf_x86_64 | |
e961c696 JB |
1007 | targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu" |
1008 | targ_extra_libpath="elf_i386 elf32_x86_64" | |
984b909a AM |
1009 | tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` |
1010 | ;; | |
1011 | x86_64-*-redox*) targ_emul=elf_x86_64 | |
1012 | targ_extra_emuls=elf_i386 | |
1013 | ;; | |
1014 | x86_64-*-solaris2*) targ_emul=elf_x86_64_sol2 | |
e961c696 | 1015 | targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu" |
984b909a AM |
1016 | targ_extra_libpath=$targ_extra_emuls |
1017 | tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` | |
1018 | ;; | |
b88237bc AM |
1019 | x86_64-*-netbsd* | x86_64-*-openbsd*) |
1020 | targ_emul=elf_x86_64 | |
e961c696 | 1021 | targ_extra_emuls="elf_i386 elf_iamcu" |
984b909a | 1022 | tdir_elf_iamcu=`echo ${targ_alias} | \ |
ab4f385b | 1023 | sed -e 's/x86_64/i386/' -e 's/aout//'` |
984b909a | 1024 | tdir_elf_i386=`echo ${targ_alias} | \ |
ab4f385b | 1025 | sed -e 's/x86_64/i386/' -e 's/aout//'` |
984b909a | 1026 | ;; |
1f568f9a | 1027 | x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*) |
984b909a | 1028 | targ_emul=elf_x86_64 |
e961c696 JB |
1029 | targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64" |
1030 | targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64" | |
984b909a AM |
1031 | tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` |
1032 | ;; | |
1033 | x86_64-*-dragonfly*) targ_emul=elf_x86_64 | |
e961c696 | 1034 | targ_extra_emuls="elf_i386 elf_iamcu" |
984b909a AM |
1035 | ;; |
1036 | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) | |
1037 | targ_emul=elf_x86_64_fbsd | |
e961c696 | 1038 | targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu" |
984b909a AM |
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/'` | |
1046 | ;; | |
1047 | x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ; | |
1048 | targ_extra_emuls=i386pe ; | |
c60b3806 | 1049 | targ_extra_ofiles="deffilep.o pep-dll-x86_64.o pe-dll.o" |
984b909a AM |
1050 | ;; |
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' | |
1055 | ;; | |
1056 | x86_64-*-mingw*) targ_emul=i386pep ; | |
1057 | targ_extra_emuls=i386pe | |
1058 | targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" | |
1059 | ;; | |
984b909a AM |
1060 | xgate-*-*) targ_emul=xgateelf |
1061 | targ_extra_ofiles=ldelfgen.o | |
1062 | ;; | |
e729279b NC |
1063 | xstormy16-*-*) targ_emul=elf32xstormy16 |
1064 | ;; | |
f8a52b59 | 1065 | xtensa*-*-*) targ_emul=elf32xtensa |
e729279b | 1066 | ;; |
6655dba2 SB |
1067 | z80-*-elf*) targ_emul=elf32z80 |
1068 | targ_extra_ofiles="ldelf.o ldelfgen.o" | |
1069 | ;; | |
3c9b82ba | 1070 | z80-*-coff) targ_emul=z80 |
d871d478 | 1071 | targ_extra_ofiles= |
3c9b82ba | 1072 | ;; |
d871d478 AM |
1073 | z8k-*-coff) targ_emul=z8002 |
1074 | targ_extra_emuls=z8001 | |
1075 | targ_extra_ofiles= | |
e729279b | 1076 | ;; |
560b3fe2 | 1077 | loongarch32-*) targ_emul=elf32loongarch |
1078 | ;; | |
1079 | loongarch64-*) targ_emul=elf64loongarch | |
1080 | ;; | |
e729279b | 1081 | *-*-ieee*) targ_emul=vanilla |
d871d478 | 1082 | targ_extra_ofiles= |
e729279b | 1083 | ;; |
252b5132 RH |
1084 | *) |
1085 | echo 2>&1 "*** ld does not support target ${targ}" | |
1086 | echo 2>&1 "*** see ld/configure.tgt for supported targets" | |
1087 | exit 1 | |
1088 | ||
1089 | esac | |
9c8ebd6a DJ |
1090 | |
1091 | NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib' | |
1092 | case "${target}" in | |
1093 | ||
5b806d27 | 1094 | *-*-dragonfly*) |
5febff9b | 1095 | NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib' |
5b806d27 NC |
1096 | ;; |
1097 | ||
1098 | *-*-freebsd*) | |
9c8ebd6a DJ |
1099 | NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib' |
1100 | ;; | |
1101 | ||
1102 | hppa*64*-*-hpux11*) | |
1103 | NATIVE_LIB_DIRS=/usr/lib/pa20_64 | |
1104 | ;; | |
1105 | ||
80c7c40a | 1106 | i[3-7]86-*-sysv4*) |
9c8ebd6a DJ |
1107 | NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' |
1108 | ;; | |
1109 | ||
80c7c40a | 1110 | i[3-7]86-*-solaris*) |
9c8ebd6a DJ |
1111 | NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' |
1112 | ;; | |
1113 | ||
80c7c40a | 1114 | i[3-7]86-pc-interix*) |
9c8ebd6a DJ |
1115 | NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib' |
1116 | ;; | |
1117 | ||
1118 | ia64-*-aix*) | |
1119 | NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib' | |
1120 | ;; | |
1121 | ||
1122 | sparc*-*-solaris2*) | |
1123 | NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' | |
1124 | ;; | |
1125 | ||
a6c73b34 | 1126 | spu-*-elf*) |
f9a6a8f0 | 1127 | # This allows one to build a pair of PPU/SPU toolchains with common sysroot. |
d7b99e76 | 1128 | NATIVE_LIB_DIRS='/lib' |
a6c73b34 BE |
1129 | ;; |
1130 | ||
a07ee50e | 1131 | i[03-9x]86-*-cygwin* | x86_64-*-cygwin*) |
d55b850c CF |
1132 | NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api' |
1133 | ;; | |
1134 | ||
9c8ebd6a DJ |
1135 | *-*-linux*) |
1136 | ;; | |
1137 | ||
9c8ebd6a DJ |
1138 | *-*-netbsd*) |
1139 | ;; | |
1140 | ||
1141 | alpha*-*-*) | |
1142 | NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' | |
1143 | ;; | |
1144 | ||
1145 | esac | |
647e4d46 L |
1146 | |
1147 | case "${target}" in | |
1148 | frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*) | |
1149 | # Don't enable -z relro by default since many relro tests fail on these | |
1150 | # targets: | |
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) | |
1164 | ;; | |
1165 | *-*-linux*) | |
1166 | if test ${ac_default_ld_z_relro} = unset; then | |
1167 | ac_default_ld_z_relro=1 | |
1168 | fi | |
1169 | ;; | |
1170 | esac | |
f6aec96d | 1171 | |
fa6ecf94 | 1172 | # Enable -z separate-code and --warn-textrel by default for Linux/x86. |
f6aec96d L |
1173 | case "${target}" in |
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 | |
1177 | fi | |
fa6ecf94 L |
1178 | if test ${ac_default_ld_textrel_check} = unset; then |
1179 | ac_default_ld_textrel_check=yes | |
1180 | fi | |
f6aec96d L |
1181 | ;; |
1182 | esac |