X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fconfigure.tgt;h=c196e6848028e204eb20b205354f632d73ddc63b;hb=80bb3407f6891aff5dbed5b2fd5c3dae8f227319;hp=aabcfc0cd745e16197b794044437d66eda887d12;hpb=12a132db164ea95e9e457427c2c97005f94c5a70;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/configure.tgt b/ld/configure.tgt index aabcfc0cd7..c196e68480 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -78,7 +78,7 @@ alpha*-*-*vms*) targ_emul=alphavms arc*-*-elf*) targ_emul=arcelf targ_extra_emuls="arcelf_prof arclinux arclinux_prof arcv2elf arcv2elfx" ;; -arc*-*-linux-uclibc*) targ_emul=arclinux +arc*-*-linux*) targ_emul=arclinux targ_extra_emuls="arclinux_prof arcelf arcelf_prof arcv2elf arcv2elfx" ;; arm-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; @@ -103,6 +103,7 @@ arm-*-netbsd*) targ_emul=armnbsd; targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;; arm-*-nto*) targ_emul=armnto ;; arm-*-openbsd*) targ_emul=armnbsd ;; +arm-*-phoenix*) targ_emul=armelf ;; arm-*-rtems*) targ_emul=armelf ;; armeb-*-elf | armeb-*-eabi*) targ_emul=armelfb ;; @@ -545,7 +546,6 @@ mips*-*-sysv4*) targ_emul=elf32btsmip mmix-*-*) targ_emul=mmo targ_extra_emuls=elf64mmix ;; -am34-*-linux*) targ_emul=elf32am33lin ;; am33_2.0-*-linux*) targ_emul=elf32am33lin ;; mn10200-*-*) targ_emul=mn10200 ;; mn10300-*-*) targ_emul=mn10300 @@ -597,37 +597,75 @@ powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \ | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*) case "${targ}" in - *64*) targ_emul=elf64ppc - targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" - targ_extra_libpath="elf32ppc elf32ppclinux" - td=tdir_elf32ppc - case "${targ}" in - powerpc*le-*) td=tdir_elf32lppc;; - esac - eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'` - eval ${td}linux=\$${td} - eval ${td}sim=\$${td} - ;; - *linux*) targ_emul=elf32ppclinux - targ_extra_emuls="elf32ppc elf32ppcsim" - targ_extra_libpath=elf32ppc - targ64_extra_emuls=elf64ppc - targ64_extra_libpath=elf64ppc - ;; - *) targ_emul=elf32ppc - targ_extra_emuls="elf32ppclinux elf32ppcsim" - targ_extra_libpath=elf32ppclinux - targ64_extra_emuls=elf64ppc - targ64_extra_libpath=elf64ppc - ;; + powerpc64*) + targ_emul=elf64ppc + targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" + targ_extra_libpath="elf32ppc elf32ppclinux" ;; + *linux*) + targ_emul=elf32ppclinux + targ_extra_emuls="elf32ppc elf32ppcsim" + targ_extra_libpath=elf32ppc + targ64_extra_emuls=elf64ppc + targ64_extra_libpath=elf64ppc ;; + *) + targ_emul=elf32ppc + targ_extra_emuls="elf32ppclinux elf32ppcsim" + targ_extra_libpath=elf32ppclinux + targ64_extra_emuls=elf64ppc + targ64_extra_libpath=elf64ppc ;; esac + td=tdir_elf32ppc + td64=tdir_elf64ppc + s=s/ppc/lppc/g case "${targ}" in - powerpc*le-*) - for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath - do - eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\" - done - esac ;; + powerpcle-* | powerpc64le-*) + for z in td td64 targ_emul targ_extra_emuls \ + targ_extra_libpath targ64_extra_emuls \ + targ64_extra_libpath + do + eval ${z}=\"\`echo \$${z} \| sed -e $s\`\" + done + s=s/lppc/ppc/g ;; + esac + # Why oh why did we set tooldir based on target_alias + # rather than on target? + eval tdir_${targ_emul}="${targ_alias}" + cpu=`echo "${targ_alias}" | sed -e 's/-.*//'` + rest=`echo "${targ_alias}" | sed -e 's/^[^-]*//'` + le=le + case "${cpu}" in + *little) le=little + esac + ta32=`echo "${cpu}" | sed -e s/64//`"${rest}" + ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}'/;s/be64$/64be/'`"${rest}" + eval test -n \"\$${td}\" || eval ${td}="${ta32}" + eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}" + eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" + eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" + # Now provide the other endian + for z in targ_extra_emuls targ_extra_libpath + do + eval ${z}=\"\$${z} \`echo ${targ_emul} \$${z} \| sed -e $s\`\" + done + for z in targ64_extra_emuls targ64_extra_libpath + do + eval ${z}=\"\$${z} \`echo \$${z} \| sed -e $s\`\" + done + td=`echo "${td}" | sed -e $s` + td64=`echo "${td64}" | sed -e $s` + case "${targ}" in + powerpcle-* | powerpc64le-*) + cpu=`echo "${cpu}" | sed -e s/${le}\$//` ;; + *) + cpu=`echo "${cpu}" | sed -e s/be\$//`${le} ;; + esac + ta32=`echo "${cpu}" | sed -e s/64//`"${rest}" + ta64=`echo "${cpu}" | sed -e 's/64//;s/$/64/;s/'${le}'64$/64'${le}/`"${rest}" + eval test -n \"\$${td}\" || eval ${td}="${ta32}" + eval test -n \"\$${td}linux\" || eval ${td}linux="${ta32}" + eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" + eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" + ;; powerpc-*-nto*) targ_emul=elf32ppcnto ;; powerpcle-*-nto*) targ_emul=elf32lppcnto ;; powerpc-*-rtems*) targ_emul=elf32ppc ;; @@ -641,6 +679,12 @@ powerpc-*-aix*) targ_emul=aixppc ;; powerpc-*-beos*) targ_emul=aixppc ;; powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;; powerpc-*-lynxos*) targ_emul=ppclynx ;; +riscv32*-*-*) targ_emul=elf32lriscv + targ_extra_emuls="elf64lriscv" + targ_extra_libpath=$targ_extra_emuls ;; +riscv64*-*-*) targ_emul=elf64lriscv + targ_extra_emuls="elf32lriscv" + targ_extra_libpath=$targ_extra_emuls ;; rs6000-*-aix[5-9]*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; @@ -879,3 +923,28 @@ alpha*-*-*) ;; esac + +case "${target}" in +frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*) + # Don't enable -z relro by default since many relro tests fail on these + # targets: + # FAIL: strip -z relro (relro1) + # FAIL: strip -z relro -shared (relro1) + # FAIL: objcopy -z relro (relro1) + # FAIL: objcopy -z relro -shared (relro1) + # FAIL: objcopy -z relro (tdata1) + # FAIL: objcopy -shared -z relro (tdata1) + # FAIL: objcopy -z relro (tdata2) + # FAIL: objcopy -shared -z relro (tdata2) + # FAIL: objcopy -z relro (tdata3) + # FAIL: objcopy -shared -z relro (tdata3) + # FAIL: objcopy -shared -z relro (tbss1) + # FAIL: objcopy -shared -z relro (tbss2) + # FAIL: objcopy -shared -z relro (tbss3) + ;; +*-*-linux*) + if test ${ac_default_ld_z_relro} = unset; then + ac_default_ld_z_relro=1 + fi + ;; +esac