From 56cdc529fb553a307be459df3f1be90d1a231f0a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 15 Dec 2024 21:24:14 +0800 Subject: Add test-config-cflags-float-store for -ffloat-store Clang doesn't support -ffloat-store: clang: error: optimization flag '-ffloat-store' is not supported [-Werror,-Wignored-optimization-argument] Define test-config-cflags-float-store for -ffloat-store and use it in math/Makefile for testing. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d4c1c7c916..aa0ec5d7ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1497,6 +1497,15 @@ LIBC_CONFIG_VAR([config-cflags-signaling-nans], [$libc_cv_cc_signaling_nans]) AC_SUBST(libc_cv_test_cc_signaling_nans) +dnl Determine if TEST_CC supports -ffloat-store. +LIBC_TRY_TEST_CC_OPTION([for -ffloat-store], + [-Werror -ffloat-store], + libc_cv_test_cc_float_store, + [libc_cv_test_cc_float_store="-ffloat-store"], + [libc_cv_test_cc_float_store=]) +LIBC_CONFIG_VAR([test-config-cflags-float-store], + [$libc_cv_test_cc_float_store]) + AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \ __attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl cat > conftest.c <