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