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