coarray_43.f90: Add "-latomic" option if libatomic_available.
[gcc.git] / libgcc / configure.ac
index 860a5f5810032c158c29d6249bd7888377f0e36a..ea2030fa06d5ec562b4b2b8d57d71eb1474dea9c 100644 (file)
@@ -374,26 +374,30 @@ esac
 esac
 
 case ${host} in
+# At present, we cannot turn -mfloat128 on via #pragma GCC target,
+# so just check if we have VSX (ISA 2.06) support to build the
+# software libraries, and whether the assembler can handle xsaddqp
+# for hardware support.
 powerpc*-*-linux*)
-  AC_CACHE_CHECK([whether the PowerPC compiler can do __float128],
+  AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries],
                 [libgcc_cv_powerpc_float128],
                 [AC_COMPILE_IFELSE(
-    [#pragma GCC target ("vsx,float128")
-     __float128 add (__float128 *a) { return *a + *(a+1); }],
+    [#pragma GCC target ("vsx")
+     vector double dadd (vector double a, vector double b) { return a + b; }],
     [libgcc_cv_powerpc_float128=yes],
     [libgcc_cv_powerpc_float128=no])])
 
-  AC_CACHE_CHECK([whether the PowerPC compiler can do hardware __float128],
+  AC_CACHE_CHECK([for PowerPC ISA 3.0 to build hardware __float128 libraries],
                 [libgcc_cv_powerpc_float128_hw],
                 [AC_COMPILE_IFELSE(
-    [#pragma GCC target ("cpu=power9,float128,float128-hardware")
+    [#pragma GCC target ("vsx,power9-vector")
      #include <sys/auxv.h>
      #ifndef AT_PLATFORM
      #error "AT_PLATFORM is not defined"
      #endif
-     __float128 add (__float128 a, __float128 b)
+     vector unsigned char (vector unsigned char a, vector unsigned char b)
      {
-       __float128 ret;
+       vector unsigned char ret;
        __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b));
        return ret;
      }
@@ -418,7 +422,7 @@ AC_SUBST(accel_dir_suffix)
 AC_SUBST(real_host_noncanonical)
 
 if test x"$enable_offload_targets" != x; then
-  extra_parts="${extra_parts} crtoffloadbegin.o crtoffloadend.o"
+  extra_parts="${extra_parts} crtoffloadbegin.o crtoffloadend.o crtoffloadtable.o"
 fi
 
 # Check if Solaris/x86 linker supports ZERO terminator unwind entries.
@@ -540,15 +544,18 @@ AC_SUBST(tm_defines)
 # Map from thread model to thread header.
 GCC_AC_THREAD_HEADER([$target_thread_file])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # Substitute configuration variables
 AC_SUBST(cpu_type)
 AC_SUBST(extra_parts)
 AC_SUBST(asm_hidden_op)
-AC_CONFIG_LINKS([enable-execute-stack.c:$enable_execute_stack])
-AC_CONFIG_LINKS([unwind.h:$unwind_header])
-AC_CONFIG_LINKS([md-unwind-support.h:config/$md_unwind_header])
-AC_CONFIG_LINKS([sfp-machine.h:config/$sfp_machine_header])
-AC_CONFIG_LINKS([gthr-default.h:$thread_header])
+AC_SUBST(enable_execute_stack)
+AC_SUBST(unwind_header)
+AC_SUBST(md_unwind_header)
+AC_SUBST(sfp_machine_header)
+AC_SUBST(thread_header)
 
 # We need multilib support.
 AC_CONFIG_FILES([Makefile])