]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libatomic/acinclude.m4
Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
[thirdparty/gcc.git] / libatomic / acinclude.m4
index 65d9a22514120d445170a0ea05fd225a021524d8..ab1d83825e5a8b371703d9892459e689107f3437 100644 (file)
@@ -25,7 +25,7 @@ dnl provide a builtin type for TImode.
 dnl
 AC_DEFUN([LIBAT_HAVE_INT_MODE],[
   AC_CACHE_CHECK([for $2 byte integer],[libat_cv_have_mode_$1],
-    [AC_COMPILE_IFELSE([int x __attribute__((mode($1)));],
+    [AC_COMPILE_IFELSE([AC_LANG_SOURCE([int x __attribute__((mode($1)));])],
       [libat_cv_have_mode_$1=yes],[libat_cv_have_mode_$1=no])])
   LIBAT_DEFINE_YESNO([HAVE_INT$2], [$libat_cv_have_mode_$1],
       [Have support for $2 byte integers.])
@@ -67,7 +67,7 @@ AC_DEFUN([LIBAT_TEST_ATOMIC_BUILTIN],[
     else
       old_CFLAGS="$CFLAGS"
       # Compile unoptimized.
-      CFLAGS='-O0 -S'
+      CFLAGS="$CFLAGS -O0 -S"
       if AC_TRY_EVAL(ac_compile); then
         if grep __atomic_ conftest.s >/dev/null 2>&1 ; then
          eval $2=no
@@ -96,6 +96,7 @@ AC_DEFUN([LIBAT_HAVE_ATOMIC_LOADSTORE],[
   LIBAT_DEFINE_YESNO([HAVE_ATOMIC_LDST_$2], [$libat_cv_have_at_ldst_$2],
        [Have __atomic_load/store for $2 byte integers.])
   AH_BOTTOM([#define MAYBE_HAVE_ATOMIC_LDST_$2 HAVE_ATOMIC_LDST_$2])
+  AH_BOTTOM([#define FAST_ATOMIC_LDST_$2 HAVE_ATOMIC_LDST_$2])
 ])
 
 dnl
@@ -185,15 +186,17 @@ AC_DEFUN([LIBAT_WORDSIZE],[
 ])
 
 dnl
-dnl Check whether the target supports ifuncs.
+dnl Check whether the target supports the ifunc attribute.
 dnl
 AC_DEFUN([LIBAT_CHECK_IFUNC], [
-  AC_CACHE_CHECK([whether the target supports funcs], libat_cv_have_ifunc, [
+  AC_CACHE_CHECK([whether the target supports the ifunc attribute],
+                libat_cv_have_ifunc, [
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -Werror"
   AC_TRY_LINK([
     int foo_alt(void) { return 0; }
-    void *foo_sel(void) { return foo_alt; }
+    typedef int F (void);
+    F *foo_sel(void) { return foo_alt; }
     int foo(void) __attribute__((ifunc("foo_sel")));],
     [return foo();], libat_cv_have_ifunc=yes, libat_cv_have_ifunc=no)])
   LIBAT_DEFINE_YESNO([HAVE_IFUNC], [$libat_cv_have_ifunc],
@@ -629,6 +632,8 @@ AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
 
 dnl ----------------------------------------------------------------------
 sinclude(../libtool.m4)
+sinclude(../config/enable.m4)
+sinclude(../config/cet.m4)
 dnl The lines below arrange for aclocal not to bring an installed
 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
 dnl add a definition of LIBTOOL to Makefile.in.