]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libatomic/configure.tgt
Work around Solaris ld bug linking __tls_get_addr on 64-bit x86
[thirdparty/gcc.git] / libatomic / configure.tgt
index 6d77c9482a5120e929870be5b4715696e1d22fab..ecbb7d33cc11b451f83479009e9d2b43510f3f76 100644 (file)
@@ -1,5 +1,5 @@
 # -*- shell-script -*-
-#  Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#  Copyright (C) 2012-2019 Free Software Foundation, Inc.
 #  Contributed by Richard Henderson <rth@redhat.com>.
 #
 #  This file is part of the GNU Atomic Library (libatomic).
@@ -37,8 +37,19 @@ case "${target_cpu}" in
        ARCH=alpha
        ;;
   rs6000 | powerpc*)   ARCH=powerpc ;;
+  riscv*)              ARCH=riscv ;;
   sh*)                 ARCH=sh ;;
 
+  aarch64*)
+       ARCH=aarch64
+       case "${target}" in
+           aarch64*-*-linux*)
+               if test -n "$enable_aarch64_lse"; then
+                   try_ifunc=yes
+               fi
+               ;;
+       esac
+       ;;
   arm*)
        ARCH=arm
        case "${target}" in
@@ -108,11 +119,21 @@ fi
 
 # Other system configury
 case "${target}" in
+  aarch64*-*-linux*)
+       # OS support for atomic primitives.
+       config_path="${config_path} linux/aarch64 posix"
+       ;;
+
   arm*-*-linux*)
        # OS support for atomic primitives.
        config_path="${config_path} linux/arm posix"
        ;;
 
+  s390*-*-linux*)
+       # OS support for atomic primitives.
+       config_path="${config_path} s390 posix"
+       ;;
+
   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
   | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
   | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
@@ -152,3 +173,14 @@ case "${target}" in
        UNSUPPORTED=1
        ;;
 esac
+
+# glibc will pass hwcap to ifunc resolver functions as an argument.
+# The type may be different on different architectures.
+case "${target}" in
+  aarch64*-*-*)
+       IFUNC_RESOLVER_ARGS="uint64_t hwcap"
+       ;;
+  *)
+       IFUNC_RESOLVER_ARGS="void"
+       ;;
+esac