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