From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 3A34C393A415; Tue, 11 Jan 2022 22:51:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A34C393A415 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6497] libquadmath: Use -mno-gnu-attribute in libquadmath X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: a8fea8cd861d9484eb825a11264812bfe193f8ee X-Git-Newrev: bff4226f5a01da2f93d4e096a1c9317a553438a3 Message-Id: <20220111225110.3A34C393A415@sourceware.org> Date: Tue, 11 Jan 2022 22:51:10 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2022 22:51:10 -0000 https://gcc.gnu.org/g:bff4226f5a01da2f93d4e096a1c9317a553438a3 commit r12-6497-gbff4226f5a01da2f93d4e096a1c9317a553438a3 Author: Jakub Jelinek Date: Mon Jan 3 17:16:26 2022 +0100 libquadmath: Use -mno-gnu-attribute in libquadmath 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 * configure.ac: Set XCFLAGS to -mno-gnu-attribute on powerpc64le*-linux*. * configure: Regenerated. Diff: --- libquadmath/configure | 24 ++++++++++++++++++++++++ libquadmath/configure.ac | 13 +++++++++++++ 2 files changed, 37 insertions(+) diff --git a/libquadmath/configure b/libquadmath/configure index 31918507f62..b3ee64f9c7d 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -13096,6 +13096,30 @@ fi 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 diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac index f9d745e60ca..eec4084a45f 100644 --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -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