gas/testsuite: properly exclude aout in all/weakref1u
[binutils-gdb.git] / ld / configure.tgt
index 925ce076179f0cc7fbe9a1d2380c5f9d42a0b6b6..4f9e1b30bf935cf5fbde330dcae69299a7937da6 100644 (file)
@@ -1,6 +1,6 @@
 # configure.tgt
 #
-#   Copyright (C) 2013-2021 Free Software Foundation, Inc.
+#   Copyright (C) 2013-2022 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
@@ -40,6 +40,42 @@ targ_extra_ofiles="ldelf.o ldelfgen.o"
 targ64_extra_emuls=
 targ64_extra_libpath=
 
+# By default the linker will generate warnings if it is creating an
+# executable stack or a segment with all three of read, write and
+# execute permissions.  These settings are not appropriate for all
+# targets however, so we can change them here:
+
+if test "${ac_default_ld_warn_rwx_segments}" = unset; then
+  case "${targ}" in
+      # The CRIS default linker script yields just one segment
+      # as intended, so a rwx segment warning is not helpful.
+      # The HPPA's PLT section uses a constructed trampoline
+      # hence it needs to have a RWX segment.
+      # Many MIPS targets use executable segments.
+    cris-*-* | crisv32-*-* | \
+    hppa*-*-* | \
+    mips*-*-*)
+      ac_default_ld_warn_rwx_segments=0
+      ;;
+    *)
+      ;;
+  esac
+fi
+
+if test "${ac_default_ld_warn_execstack}" = 2; then
+  case "${targ}" in
+      # The HPPA port needs to support older kernels that
+      # use executable stacks for signals and syscalls.
+      # Many MIPS targets use executable stacks.
+    hppa*-*-* | \
+    mips*-*-*)
+      ac_default_ld_warn_execstack=0
+      ;;
+    *)
+      ;;
+  esac
+fi
+
 # Please try to keep this table more or less in alphabetic order - it
 # makes it much easier to lookup a specific archictecture.
 case "${targ}" in
@@ -202,7 +238,7 @@ arm*-*-conix*)              targ_emul=armelf
 arm*-*-fuchsia*)       targ_emul=armelf_fuchsia
                        targ_extra_emuls="armelfb_fuchsia armelf armelfb"
                        ;;
-arm*-*-haiku*)         arg_emul=armelf_haiku
+arm*-*-haiku*)         targ_emul=armelf_haiku
                        targ_extra_emuls=armelf
                        ;;
 avr-*-*)               targ_emul=avr2
@@ -326,7 +362,7 @@ i[3-7]86-*-bsdi*)   targ_emul=i386bsd
                        ;;
 i[3-7]86-*-linux-*)    targ_emul=elf_i386
                        targ_extra_emuls="elf_iamcu"
-                       targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
+                       targ64_extra_emuls="elf_x86_64 elf32_x86_64"
                        targ64_extra_libpath="elf_x86_64 elf32_x86_64"
                        ;;
 i[3-7]86-*-redox*)     targ_emul=elf_i386
@@ -336,7 +372,7 @@ 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_iamcu 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"
                        targ_extra_libpath=$targ_extra_emuls
                        ;;
 i[3-7]86-*-unixware)   targ_emul=elf_i386
@@ -957,27 +993,27 @@ x86_64-*-haiku*)  targ_emul=elf_x86_64_haiku
                        targ_extra_emuls="elf_x86_64 elf_i386_haiku"
                        ;;
 x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
-                       targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
-                       targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64 elf_l1om elf_k1om"
+                       targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
+                       targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"
                        tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
                        ;;
 x86_64-*-linux-*)      targ_emul=elf_x86_64
-                       targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
-                       targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
+                       targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu"
+                       targ_extra_libpath="elf_i386 elf32_x86_64"
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
                        ;;
 x86_64-*-redox*)       targ_emul=elf_x86_64
                        targ_extra_emuls=elf_i386
                        ;;
 x86_64-*-solaris2*)    targ_emul=elf_x86_64_sol2
-                       targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om"
+                       targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu"
                        targ_extra_libpath=$targ_extra_emuls
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
                        ;;
 x86_64-*-netbsd* | x86_64-*-openbsd*)
                        targ_emul=elf_x86_64
-                       targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om"
+                       targ_extra_emuls="elf_i386 elf_iamcu"
                        tdir_elf_iamcu=`echo ${targ_alias} | \
                            sed -e 's/x86_64/i386/' -e 's/aout//'`
                        tdir_elf_i386=`echo ${targ_alias} | \
@@ -985,16 +1021,16 @@ x86_64-*-netbsd* | x86_64-*-openbsd*)
                        ;;
 x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
                        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"
+                       targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
+                       targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
                        ;;
 x86_64-*-dragonfly*)   targ_emul=elf_x86_64
-                       targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om"
+                       targ_extra_emuls="elf_i386 elf_iamcu"
                        ;;
 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
                        targ_emul=elf_x86_64_fbsd
-                       targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd"
+                       targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu"
                        targ_extra_libpath="elf_i386_fbsd"
                        tdir_elf_i386_fbsd=`echo ${targ_alias} \
                            | sed -e 's/x86_64/i386/'`
@@ -1016,9 +1052,6 @@ x86_64-*-mingw*)  targ_emul=i386pep ;
                        targ_extra_emuls=i386pe
                        targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
                        ;;
-xc16x-*-elf)           targ_emul=elf32xc16x
-                       targ_extra_emuls="elf32xc16xl elf32xc16xs"
-                       ;;
 xgate-*-*)             targ_emul=xgateelf
                        targ_extra_ofiles=ldelfgen.o
                        ;;