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 ;; 510mipsn64*el-*-netbsd*) targ_emul=elf64ltsmip 511 targ_extra_emuls="elf64btsmip elf32ltsmip elf32btsmip elf32btsmipn32 elf32ltsmipn32" 512 targ_extra_libpath=$targ_extra_emuls 513 ;; 514mips64*-*-netbsd*) targ_emul=elf32btsmipn32 515 targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip" 516 targ_extra_libpath=$targ_extra_emuls 517 ;; 518mipsn64*-*-netbsd*) targ_emul=elf64btsmip 519 targ_extra_emuls="elf64ltsmip elf64btsmip elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32" 520 targ_extra_libpath=$targ_extra_emuls 521 ;; 522mips*el-*-netbsd*) targ_emul=elf32ltsmip 523 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" 524 ;; 525mips*-*-netbsd*) targ_emul=elf32btsmip 526 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" 527 ;; 528mips64el-*-openbsd*) targ_emul=elf64ltsmip 529 targ_extra_emuls=elf64btsmip 530 ;; 531mips64-*-openbsd*) targ_emul=elf64btsmip 532 targ_extra_emuls=elf64ltsmip 533 ;; 534mips*vr4300el-*-elf*) targ_emul=elf32l4300 535 ;; 536mips*vr4300-*-elf*) targ_emul=elf32b4300 537 ;; 538mips*vr4100el-*-elf*) targ_emul=elf32l4300 539 ;; 540mips*vr4100-*-elf*) targ_emul=elf32b4300 541 ;; 542mips*vr5000el-*-elf*) targ_emul=elf32l4300 543 ;; 544mips*vr5000-*-elf*) targ_emul=elf32b4300 545 ;; 546mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*) 547 targ_emul=elf32ltsmip 548 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" 549 ;; 550mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) 551 targ_emul=elf32btsmip 552 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" 553 ;; 554mips64*el-ps2-elf*) targ_emul=elf32lr5900n32 555 targ_extra_emuls="elf32lr5900" 556 targ_extra_libpath=$targ_extra_emuls 557 ;; 558mips*el-ps2-elf*) targ_emul=elf32lr5900 559 targ_extra_emuls="elf32lr5900n32" 560 targ_extra_libpath=$targ_extra_emuls 561 ;; 562mips*el-*-elf*) targ_emul=elf32elmip 563 ;; 564mips*-*-elf* | mips*-*-rtems*) 565 targ_emul=elf32ebmip 566 ;; 567mips*el-*-vxworks*) targ_emul=elf32elmipvxworks 568 targ_extra_emuls="elf32ebmipvxworks" 569 ;; 570mips*-*-vxworks*) targ_emul=elf32ebmipvxworks 571 targ_extra_emuls="elf32elmipvxworks" 572 ;; 573mips*-*-windiss) targ_emul=elf32mipswindiss 574 ;; 575mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 576 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" 577 targ_extra_libpath=$targ_extra_emuls 578 ;; 579mips64*-*-linux-*) targ_emul=elf32btsmipn32 580 targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" 581 targ_extra_libpath=$targ_extra_emuls 582 ;; 583mips*el-*-linux-*) targ_emul=elf32ltsmip 584 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" 585 targ_extra_libpath=$targ_extra_emuls 586 ;; 587mips*-*-linux-*) targ_emul=elf32btsmip 588 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" 589 targ_extra_libpath=$targ_extra_emuls 590 ;; 591mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu) 592 targ_emul=elf32ltsmipn32_fbsd 593 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" 594 targ_extra_libpath=$targ_extra_emuls 595 ;; 596mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) 597 targ_emul=elf32btsmipn32_fbsd 598 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" 599 targ_extra_libpath=$targ_extra_emuls 600 ;; 601mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu) 602 targ_emul=elf32ltsmip_fbsd 603 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" 604 targ_extra_libpath=$targ_extra_emuls 605 ;; 606mips*-*-freebsd* | mips*-*-kfreebsd*-gnu) 607 targ_emul=elf32btsmip_fbsd 608 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" 609 targ_extra_libpath=$targ_extra_emuls 610 ;; 611mips*-*-sysv4*) targ_emul=elf32btsmip 612 ;; 613mmix-*-*) targ_emul=mmo 614 targ_extra_emuls=elf64mmix 615 ;; 616mn10200-*-*) targ_emul=mn10200 617 targ_extra_ofiles=ldelfgen.o 618 ;; 619mn10300-*-*) targ_emul=mn10300 620 ;; 621moxie-*-moxiebox*) targ_emul=moxiebox 622 targ_extra_ofiles=ldelfgen.o 623 ;; 624moxie-*-*) targ_emul=elf32moxie 625 ;; 626msp430-*-*) targ_emul=msp430elf 627 targ_extra_emuls="msp430X" 628 targ_extra_ofiles=ldelfgen.o 629 ;; 630mt-*elf) targ_emul=elf32mt 631 targ_extra_ofiles=ldelfgen.o 632 ;; 633nds32*le-*-elf*) targ_emul=nds32elf 634 targ_extra_emuls="nds32elf16m nds32belf nds32belf16m" 635 ;; 636nds32*be-*-elf*) targ_emul=nds32belf 637 targ_extra_emuls="nds32elf nds32elf16m nds32belf16m" 638 ;; 639nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux 640 ;; 641nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux 642 ;; 643nios2*-*-linux*) targ_emul=nios2linux 644 ;; 645nios2*-*-*) targ_emul=nios2elf 646 ;; 647ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha 648 targ_extra_ofiles= 649 ;; 650ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd 651 targ_extra_ofiles= 652 ;; 653or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*) 654 targ_emul=elf32or1k 655 ;; 656or1k-*-netbsd* | or1knd-*-netbsd*) targ_emul=elf32or1k_nbsd 657 ;; 658or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux 659 ;; 660pdp11-*-*) targ_emul=pdp11 661 targ_extra_ofiles= 662 ;; 663pjl*-*-*) targ_emul=pjlelf 664 targ_extra_emuls="elf_i386 elf_iamcu" 665 ;; 666pj*-*-*) targ_emul=pjelf 667 targ_extra_ofiles=ldelfgen.o 668 ;; 669powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) 670 targ_emul=elf32ppc_fbsd 671 targ_extra_emuls="elf32ppc elf32ppcsim" 672 targ_extra_libpath=elf32ppc; 673 tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` 674 ;; 675powerpc64-*-freebsd*) 676 targ_emul=elf64ppc_fbsd 677 targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc" 678 targ_extra_libpath="elf32ppc_fbsd elf32ppc" 679 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` 680 tdir_elf32ppc_fbsd=$tdir_elf32ppc 681 ;; 682powerpc-*-netbsd*) 683 targ_emul=elf32ppc_nbsd 684 targ_extra_emuls="elf32ppc elf32ppcsim" 685 targ_extra_libpath=elf32ppc; 686 tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` 687 targ64_extra_emuls=elf64ppc 688 targ64_extra_libpath=elf64ppc 689 ;; 690powerpc64-*-netbsd*) 691 targ_emul=elf64ppc 692 targ_extra_emuls="elf32ppc elf32ppc_nbsd elf32ppcsim" 693 targ_extra_libpath="elf32ppc_nbsd elf32ppc" 694 tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` 695 tdir_elf32ppc_fbsd=$tdir_elf32ppc 696 ;; 697powerpc-*-vxworks*) 698 targ_emul=elf32ppcvxworks 699 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" 700 ;; 701powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ 702 | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \ 703 | powerpc*-*-rtems* \ 704 | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*) 705 case "${targ}" in 706 powerpc64*) 707 targ_emul=elf64ppc 708 targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" 709 targ_extra_libpath="elf32ppc elf32ppclinux" ;; 710 *linux*) 711 targ_emul=elf32ppclinux 712 targ_extra_emuls="elf32ppc elf32ppcsim" 713 targ_extra_libpath=elf32ppc 714 targ64_extra_emuls=elf64ppc 715 targ64_extra_libpath=elf64ppc ;; 716 *) 717 targ_emul=elf32ppc 718 targ_extra_emuls="elf32ppclinux elf32ppcsim" 719 targ_extra_libpath=elf32ppclinux 720 targ64_extra_emuls=elf64ppc 721 targ64_extra_libpath=elf64ppc ;; 722 esac 723 td=tdir_elf32ppc 724 td64=tdir_elf64ppc 725 s=s/ppc/lppc/g 726 case "${targ}" in 727 powerpcle-* | powerpc64le-*) 728 for z in td td64 targ_emul targ_extra_emuls \ 729 targ_extra_libpath targ64_extra_emuls \ 730 targ64_extra_libpath 731 do 732 eval ${z}=\"\`echo \$${z} \| sed -e $s\`\" 733 done 734 s=s/lppc/ppc/g ;; 735 esac 736 # Why oh why did we set tooldir based on target_alias 737 # rather than on target? 738 eval tdir_${targ_emul}="${targ_alias}" 739 cpu=`echo "${targ_alias}" | sed -e 's/-.*//'` 740 rest=`echo "${targ_alias}" | sed -e 's/^[^-]*//'` 741 le=le 742 case "${cpu}" in 743 *little) le=little 744 esac 745 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}" 746 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}'/;s/be64$/64be/'`"${rest}" 747 eval test -n \"\$${td}\" || eval ${td}="${ta32}" 748 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}" 749 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" 750 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" 751 # Now provide the other endian 752 for z in targ_extra_emuls targ_extra_libpath 753 do 754 eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\" 755 done 756 for z in targ64_extra_emuls targ64_extra_libpath 757 do 758 eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\" 759 done 760 td=`echo "${td}" | sed -e $s` 761 td64=`echo "${td64}" | sed -e $s` 762 case "${targ}" in 763 powerpcle-* | powerpc64le-*) 764 cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;; 765 *) 766 cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;; 767 esac 768 ta32=`echo "${cpu}" | sed -e s/64//`"${rest}" 769 ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}/`"${rest}" 770 eval test -n \"\$${td}\" || eval ${td}="${ta32}" 771 eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}" 772 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" 773 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" 774 ;; 775powerpc-*-nto*) targ_emul=elf32ppcnto 776 ;; 777powerpcle-*-nto*) targ_emul=elf32lppcnto 778 ;; 779powerpc-*-macos*) targ_emul=ppcmacos 780 targ_extra_ofiles= 781 ;; 782powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*) 783 targ_emul=ppcpe 784 targ_extra_ofiles="deffilep.o pe-dll.o" 785 ;; 786powerpc-*-aix[5-9]*) targ_emul=aix5ppc 787 targ_extra_ofiles= 788 ;; 789powerpc-*-aix*) targ_emul=aixppc 790 targ_extra_ofiles= 791 ;; 792powerpc-*-beos*) targ_emul=aixppc 793 targ_extra_ofiles= 794 ;; 795powerpc-*-windiss*) targ_emul=elf32ppcwindiss 796 ;; 797powerpc-*-lynxos*) targ_emul=ppclynx 798 ;; 799pru*-*-*) targ_emul=pruelf 800 ;; 801riscv32*-*-linux* | riscv-*-netbsd* | riscv32*-*-netbsd*) 802 targ_emul=elf32lriscv 803 targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64" 804 targ_extra_libpath=$targ_extra_emuls 805 ;; 806riscv-*-* | riscv32*-*-*) 807 targ_emul=elf32lriscv 808 targ_extra_emuls="elf64lriscv" 809 targ_extra_libpath=$targ_extra_emuls 810 ;; 811riscv64*-*-linux* | riscv64*-*-netbsd*) 812 targ_emul=elf64lriscv 813 targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32" 814 targ_extra_libpath=$targ_extra_emuls 815 ;; 816riscv64*-*-*) targ_emul=elf64lriscv 817 targ_extra_emuls="elf32lriscv" 818 targ_extra_libpath=$targ_extra_emuls 819 ;; 820rs6000-*-aix[5-9]*) targ_emul=aix5rs6 821 targ_extra_ofiles= 822 ;; 823rs6000-*-aix*) targ_emul=aixrs6 824 targ_extra_ofiles= 825 ;; 826rl78-*-*) targ_emul=elf32rl78 827 ;; 828rx-*-*) targ_emul=elf32rx 829 ;; 830s12z-*-*) targ_emul=m9s12zelf 831 targ_extra_ofiles=ldelfgen.o 832 ;; 833s390x-*-linux*) targ_emul=elf64_s390 834 targ_extra_emuls=elf_s390 835 targ_extra_libpath=$targ_extra_emuls 836 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` 837 ;; 838s390x-*-tpf*) targ_emul=elf64_s390 839 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` 840 ;; 841s390-*-linux*) targ_emul=elf_s390 842 targ64_extra_emuls=elf64_s390 843 targ64_extra_libpath=elf64_s390 844 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` 845 ;; 846score-*-elf) targ_emul=score7_elf 847 targ_extra_emuls=score3_elf 848 ;; 849sh-*-linux*) targ_emul=shlelf_linux 850 targ_extra_emuls="shelf_linux shlelf_fd shelf_fd" 851 targ_extra_libpath=shelf_linux 852 ;; 853sh*eb-*-linux*) targ_emul=shelf_linux 854 targ_extra_emuls="shelf_fd" 855 ;; 856sh*-*-linux*) targ_emul=shlelf_linux 857 targ_extra_emuls="shlelf_fd" 858 ;; 859sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd 860 targ_extra_emuls=shelf_nbsd 861 ;; 862sh*-*-netbsdelf*) targ_emul=shelf_nbsd 863 targ_extra_emuls=shlelf_nbsd 864 ;; 865shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*) 866 targ_emul=shlelf 867 targ_extra_emuls="shelf shl sh" 868 ;; 869sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*) 870 targ_emul=shelf 871 targ_extra_emuls="shlelf sh shl" 872 ;; 873sh-*-uclinux* | sh[12]-*-uclinux*) 874 targ_emul=shelf_uclinux 875 targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd" 876 ;; 877sh-*-vxworks) targ_emul=shelf_vxworks 878 targ_extra_emuls=shlelf_vxworks 879 ;; 880sh-*-nto*) targ_emul=shelf_nto 881 targ_extra_emuls=shlelf_nto 882 ;; 883sh-*-pe) targ_emul=shpe ; 884 targ_extra_ofiles="deffilep.o pe-dll.o" 885 ;; 886sh-*-*) targ_emul=sh; 887 targ_extra_emuls=shl 888 targ_extra_ofiles= 889 ;; 890sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu) 891 targ_emul=elf64_sparc_fbsd 892 targ_extra_emuls="elf64_sparc elf32_sparc" 893 targ_extra_libpath=$targ_extra_emuls 894 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` 895 ;; 896sparc64-*-linux-*) targ_emul=elf64_sparc 897 targ_extra_emuls="elf32_sparc" 898 targ_extra_libpath=elf32_sparc 899 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` 900 ;; 901sparc64-*-*bsd*) targ_emul=elf64_sparc 902 targ_extra_emuls="elf32_sparc" 903 ;; 904sparc64-*-solaris2* | sparcv9-*-solaris2*) 905 targ_emul=elf64_sparc_sol2 906 targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc" 907 targ_extra_libpath=$targ_extra_emuls 908 tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` 909 ;; 910sparc64-*-*) targ_emul=elf64_sparc 911 ;; 912sparc*-*-linux-*) targ_emul=elf32_sparc 913 targ_extra_emuls="elf64_sparc" 914 targ_extra_libpath=elf64_sparc 915 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` 916 ;; 917sparc64-*-netbsd*) targ_emul=elf64_sparc 918 targ_extra_emuls="elf32_sparc" 919 ;; 920sparc64-*-openbsd*) targ_emul=elf64_sparc 921 targ_extra_emuls="elf32_sparc" 922 ;; 923sparc*-*-netbsd*elf*) targ_emul=elf32_sparc 924 ;; 925sparc*-*-netbsd*) targ_emul=sparcnbsd 926 ;; 927sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) 928 targ_emul=elf32_sparc_sol2 929 targ_extra_emuls=elf32_sparc 930 ;; 931sparc-*-solaris2*) targ_emul=elf32_sparc_sol2 932 targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc" 933 targ_extra_libpath=$targ_extra_emuls 934 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` 935 ;; 936sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks 937 ;; 938sparc*-*-*) targ_emul=elf32_sparc 939 ;; 940spu-*-elf*) targ_emul=elf32_spu 941 ;; 942tic30-*-*aout*) targ_emul=tic30aout 943 targ_extra_ofiles= 944 ;; 945tic30-*-*coff*) targ_emul=tic30coff 946 targ_extra_ofiles= 947 ;; 948tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff 949 targ_extra_emuls="tic3xcoff tic3xcoff_onchip" 950 targ_extra_ofiles= 951 ;; 952tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff 953 targ_extra_ofiles= 954 ;; 955tic6x-*-elf) targ_emul=elf32_tic6x_elf_le 956 targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be" 957 targ_extra_libpath=$targ_extra_emuls 958 ;; 959tic6x-*-uclinux) targ_emul=elf32_tic6x_linux_le 960 targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be" 961 targ_extra_libpath=$targ_extra_emuls 962 ;; 963tilegx-*-*) targ_emul=elf64tilegx 964 targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be" 965 targ_extra_libpath=$targ_extra_emuls 966 ;; 967tilegxbe-*-*) targ_emul=elf64tilegx_be 968 targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be" 969 targ_extra_libpath=$targ_extra_emuls 970 ;; 971tilepro-*-*) targ_emul=elf32tilepro 972 ;; 973v850*-*-*) targ_emul=v850_rh850 974 targ_extra_emuls=v850 975 ;; 976vax-*-netbsdelf*) targ_emul=elf32vax 977 targ_extra_emuls=vaxnbsd 978 ;; 979vax-*-netbsdaout* | vax-*-netbsd*) 980 targ_emul=vaxnbsd 981 targ_extra_emuls=elf32vax 982 ;; 983vax-*-linux-*) targ_emul=elf32vax 984 ;; 985visium-*-elf) targ_emul=elf32visium 986 ;; 987x86_64-*-rdos*) targ_emul=elf64rdos 988 ;; 989x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi 990 ;; 991x86_64-*-linux-gnux32) targ_emul=elf32_x86_64 992 targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om" 993 targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64 elf_l1om elf_k1om" 994 tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` 995 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` 996 ;; 997x86_64-*-linux-*) targ_emul=elf_x86_64 998 targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om" 999 targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om" 1000 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` 1001 ;; 1002x86_64-*-redox*) targ_emul=elf_x86_64 1003 targ_extra_emuls=elf_i386 1004 ;; 1005x86_64-*-solaris2*) targ_emul=elf_x86_64_sol2 1006 targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om" 1007 targ_extra_libpath=$targ_extra_emuls 1008 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` 1009 ;; 1010x86_64-*-netbsd*) targ_emul=elf_x86_64 1011 targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" 1012 tdir_elf_iamcu=`echo ${targ_alias} | \ 1013 sed -e 's/x86_64/i386/'` 1014 case "${tdir_elf_iamcu}" in 1015 *-netbsdelf*) ;; 1016 *) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \ 1017 sed -e 's/netbsd/netbsdelf/'`;; 1018 esac 1019 tdir_elf_i386=`echo ${targ_alias} | \ 1020 sed -e 's/x86_64/i386/'` 1021 case "${tdir_elf_i386}" in 1022 *-netbsdelf*) ;; 1023 *) tdir_elf_i386=`echo ${tdir_elf_i386} | \ 1024 sed -e 's/netbsd/netbsdelf/'`;; 1025 esac 1026 ;; 1027x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia*) 1028 targ_emul=elf_x86_64 1029 targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om" 1030 targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om" 1031 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` 1032 ;; 1033x86_64-*-dragonfly*) targ_emul=elf_x86_64 1034 targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" 1035 ;; 1036x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) 1037 targ_emul=elf_x86_64_fbsd 1038 targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd" 1039 targ_extra_libpath="elf_i386_fbsd" 1040 tdir_elf_i386_fbsd=`echo ${targ_alias} \ 1041 | sed -e 's/x86_64/i386/'` 1042 tdir_elf_iamcu=`echo ${targ_alias} \ 1043 | sed -e 's/x86_64/i386/'` 1044 tdir_elf_i386=`echo ${targ_alias} \ 1045 | sed -e 's/x86_64/i386/'` 1046 ;; 1047x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ; 1048 targ_extra_emuls=i386pe ; 1049 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" 1050 ;; 1051x86_64-*-cygwin) targ_emul=i386pep ; 1052 targ_extra_emuls=i386pe 1053 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" 1054 test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' 1055 ;; 1056x86_64-*-mingw*) targ_emul=i386pep ; 1057 targ_extra_emuls=i386pe 1058 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" 1059 ;; 1060x86_64-*-nacl*) targ_emul=elf32_x86_64_nacl 1061 targ_extra_emuls="elf_i386_nacl elf_x86_64_nacl armelf_nacl armelfb_nacl" 1062 targ_extra_libpath=$targ_extra_emuls 1063 tdir_elf_i386_nacl=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` 1064 ;; 1065xc16x-*-elf) targ_emul=elf32xc16x 1066 targ_extra_emuls="elf32xc16xl elf32xc16xs" 1067 ;; 1068xgate-*-*) targ_emul=xgateelf 1069 targ_extra_ofiles=ldelfgen.o 1070 ;; 1071xstormy16-*-*) targ_emul=elf32xstormy16 1072 ;; 1073xtensa*-*-*) targ_emul=elf32xtensa 1074 ;; 1075z80-*-elf*) targ_emul=elf32z80 1076 targ_extra_ofiles="ldelf.o ldelfgen.o" 1077 ;; 1078z80-*-coff) targ_emul=z80 1079 targ_extra_ofiles= 1080 ;; 1081z8k-*-coff) targ_emul=z8002 1082 targ_extra_emuls=z8001 1083 targ_extra_ofiles= 1084 ;; 1085*-*-ieee*) targ_emul=vanilla 1086 targ_extra_ofiles= 1087 ;; 1088*) 1089 echo 2>&1 "*** ld does not support target ${targ}" 1090 echo 2>&1 "*** see ld/configure.tgt for supported targets" 1091 exit 1 1092 1093esac 1094 1095NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib' 1096case "${target}" in 1097 1098*-*-dragonfly*) 1099 NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib' 1100 ;; 1101 1102*-*-freebsd*) 1103 NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib' 1104 ;; 1105 1106hppa*64*-*-hpux11*) 1107 NATIVE_LIB_DIRS=/usr/lib/pa20_64 1108 ;; 1109 1110i[3-7]86-*-sysv4*) 1111 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' 1112 ;; 1113 1114i[3-7]86-*-solaris*) 1115 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' 1116 ;; 1117 1118i[3-7]86-pc-interix*) 1119 NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib' 1120 ;; 1121 1122ia64-*-aix*) 1123 NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib' 1124 ;; 1125 1126sparc*-*-solaris2*) 1127 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' 1128 ;; 1129 1130spu-*-elf*) 1131 # This allows to build a pair of PPU/SPU toolchains with common sysroot. 1132 NATIVE_LIB_DIRS='/lib' 1133 ;; 1134 1135i[03-9x]86-*-cygwin* | x86_64-*-cygwin*) 1136 NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api' 1137 ;; 1138 1139*-*-linux*) 1140 ;; 1141 1142*-*-netbsd*) 1143 ;; 1144 1145alpha*-*-*) 1146 NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' 1147 ;; 1148 1149esac 1150 1151case "${target}" in 1152frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*) 1153 # Don't enable -z relro by default since many relro tests fail on these 1154 # targets: 1155 # FAIL: strip -z relro (relro1) 1156 # FAIL: strip -z relro -shared (relro1) 1157 # FAIL: objcopy -z relro (relro1) 1158 # FAIL: objcopy -z relro -shared (relro1) 1159 # FAIL: objcopy -z relro (tdata1) 1160 # FAIL: objcopy -shared -z relro (tdata1) 1161 # FAIL: objcopy -z relro (tdata2) 1162 # FAIL: objcopy -shared -z relro (tdata2) 1163 # FAIL: objcopy -z relro (tdata3) 1164 # FAIL: objcopy -shared -z relro (tdata3) 1165 # FAIL: objcopy -shared -z relro (tbss1) 1166 # FAIL: objcopy -shared -z relro (tbss2) 1167 # FAIL: objcopy -shared -z relro (tbss3) 1168 ;; 1169*-*-linux*) 1170 if test ${ac_default_ld_z_relro} = unset; then 1171 ac_default_ld_z_relro=1 1172 fi 1173 ;; 1174esac 1175 1176# Enable -z separate-code by default for Linux/x86. 1177case "${target}" in 1178i[3-7]86-*-linux-* | x86_64-*-linux-*) 1179 if test ${ac_default_ld_z_separate_code} = unset; then 1180 ac_default_ld_z_separate_code=1 1181 fi 1182 ;; 1183esac 1184