Ignore symbols defined in SHF_EXCLUDE sections
[binutils-gdb.git] / ld / configure.tgt
index bb958dc88c9959a8baf2480e02ea982851305b79..6f3cd4fc37cf114e042472c7bfe32557aa8417ff 100644 (file)
@@ -1,6 +1,6 @@
 # configure.tgt
 #
-#   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2013-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,8 +47,11 @@ targ64_extra_libpath=
 case "${targ}" in
 aarch64_be-*-elf)      targ_emul=aarch64elfb
                        targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
-aarch64-*-elf)         targ_emul=aarch64elf
+aarch64-*-elf | aarch64-*-rtems*)
+                       targ_emul=aarch64elf
                        targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
+aarch64-*-cloudabi*)   targ_emul=aarch64cloudabi
+                       targ_extra_emuls=aarch64cloudabib ;;
 aarch64-*-freebsd*)    targ_emul=aarch64fbsd
                        targ_extra_emuls="aarch64fbsdb aarch64elf" ;;
 aarch64_be-*-linux*)   targ_emul=aarch64linuxb
@@ -72,7 +75,11 @@ alpha*-*-netbsd*)    targ_emul=elf64alpha_nbsd ;;
 alpha*-*-openbsd*)     targ_emul=elf64alpha ;;
 alpha*-*-*vms*)                targ_emul=alphavms
                        ;;
-arc-*-elf*)            targ_emul=arcelf
+arc*-*-elf*)           targ_emul=arcelf
+                       targ_extra_emuls="arcelf_prof arclinux arclinux_prof arcv2elf arcv2elfx"
+                       ;;
+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" ;;
 arm*-*-cegcc*)         targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o"
@@ -96,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 ;;
@@ -264,12 +272,12 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
 i[3-7]86-*-sysv[45]*)  targ_emul=elf_i386
                        targ_extra_emuls=elf_iamcu ;;
 i[3-7]86-*-solaris2*)  targ_emul=elf_i386_sol2
-                        targ_extra_emuls="elf_i386_ldso elf_i386 elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
+                        targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
                        targ_extra_libpath=$targ_extra_emuls
                         ;;
 x86_64-*-solaris2*)
                        targ_emul=elf_x86_64_sol2
-                       targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_l1om elf_k1om"
+                       targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om"
                        targ_extra_libpath=$targ_extra_emuls
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
 i[3-7]86-*-unixware)   targ_emul=elf_i386
@@ -308,7 +316,8 @@ i[3-7]86-*-elfiamcu)        targ_emul=elf_iamcu
                        targ_extra_emuls=elf_i386 ;;
 i[3-7]86-*-elf*)       targ_emul=elf_i386
                        targ_extra_emuls=elf_iamcu ;;
-x86_64-*-elf*)         targ_emul=elf_x86_64
+x86_64-*-elf* | x86_64-*-rtems*)
+                       targ_emul=elf_x86_64
                        targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
                        targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
@@ -484,7 +493,8 @@ mips*vr4100el-*-elf*)       targ_emul=elf32l4300 ;;
 mips*vr4100-*-elf*)    targ_emul=elf32b4300 ;;
 mips*vr5000el-*-elf*)  targ_emul=elf32l4300 ;;
 mips*vr5000-*-elf*)    targ_emul=elf32b4300 ;;
-mips*el-sde-elf*)      targ_emul=elf32ltsmip
+mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
+                       targ_emul=elf32ltsmip
                        targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
                        targ_emul=elf32btsmip
@@ -536,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
@@ -588,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 ;;
@@ -651,7 +698,7 @@ s390-*-linux*)          targ_emul=elf_s390
 score-*-elf)            targ_emul=score7_elf
                        targ_extra_emuls=score3_elf ;;
 sh-*-linux*)           targ_emul=shlelf_linux
-                       targ_extra_emuls="shelf_linux shlelf_fd shelf_fd shlelf shelf"
+                       targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
                        targ_extra_libpath=shelf_linux ;;
 sh64eb-*-linux*)       targ_emul=shelf32_linux
                        targ_extra_emuls="shlelf32_linux" ;;
@@ -659,9 +706,9 @@ sh64-*-linux*)              targ_emul=shlelf32_linux
                        targ_extra_emuls="shelf32_linux"
                        targ_extra_libpath=shelf32_linux ;;
 sh*eb-*-linux*)                targ_emul=shelf_linux
-                       targ_extra_emuls="shelf_fd shelf" ;;
+                       targ_extra_emuls="shelf_fd" ;;
 sh*-*-linux*)          targ_emul=shlelf_linux
-                       targ_extra_emuls="shlelf_fd shlelf" ;;
+                       targ_extra_emuls="shlelf_fd" ;;
 sh5le-*-netbsd*)       targ_emul=shlelf32_nbsd
                        targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
 sh5-*-netbsd*)         targ_emul=shelf32_nbsd
@@ -870,3 +917,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