]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libquadmath: Use -mno-gnu-attribute in libquadmath
authorJakub Jelinek <jakub@redhat.com>
Mon, 3 Jan 2022 16:16:26 +0000 (17:16 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 11 Jan 2022 22:49:48 +0000 (23:49 +0100)
Testing found that we also need libquadmath to be built with
-mno-gnu-attribute, otherwise -mabi=ieeelongdouble programs don't link.

2022-01-03  Jakub Jelinek  <jakub@redhat.com>

* configure.ac: Set XCFLAGS to -mno-gnu-attribute on
powerpc64le*-linux*.
* configure: Regenerated.

libquadmath/configure
libquadmath/configure.ac

index 31918507f624c59edbd0ea20410debc25fd3a0dc..b3ee64f9c7de77e33af54d96d5d32f03dcd3a76b 100755 (executable)
 
 XCFLAGS="$XCFLAGS $CET_FLAGS"
 
+case x$target in
+  xpowerpc64le*-linux*)
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if __SIZEOF_LONG_DOUBLE__ != 16
+                         #error long double is double
+                         #endif
+int
+main ()
+{
+(void) 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  XCFLAGS="$XCFLAGS -mno-gnu-attribute"
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+    ;;
+  *)
+    ;;
+esac
+
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
index f9d745e60ca4102e1dba260adb0218e69d59f4c9..eec4084a45f62226671197bd5c6949002a599fa2 100644 (file)
@@ -352,6 +352,19 @@ fi
 # Add CET specific flags if CET is enabled
 GCC_CET_FLAGS(CET_FLAGS)
 XCFLAGS="$XCFLAGS $CET_FLAGS"
+
+case x$target in
+  xpowerpc64le*-linux*)
+    AC_PREPROC_IFELSE(
+      [AC_LANG_PROGRAM([[#if __SIZEOF_LONG_DOUBLE__ != 16
+                         #error long double is double
+                         #endif]],
+                       [[(void) 0;]])],
+      [XCFLAGS="$XCFLAGS -mno-gnu-attribute"])
+    ;;
+  *)
+    ;;
+esac
 AC_SUBST(XCFLAGS)
 
 AC_CACHE_SAVE