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