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