aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-18 07:24:38 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-22 13:15:43 +0800
commit03feea74dc75397f7eff10a92a322d235a6c1751 (patch)
treebe382100801776188c66b19ddaa4b43b1e7d93c7 /configure
parentd085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4 (diff)
downloadglibc-03feea74dc75397f7eff10a92a322d235a6c1751.tar.xz
glibc-03feea74dc75397f7eff10a92a322d235a6c1751.zip
elf: Compile test modules with -fsemantic-interposition
Compiler may default to -fno-semantic-interposition. But some elf test modules must be compiled with -fsemantic-interposition to function properly. Add a TEST_CC check for -fsemantic-interposition and use it on elf test modules. This fixed FAIL: elf/tst-dlclose-lazy FAIL: elf/tst-pie1 FAIL: elf/tst-plt-rewrite1 FAIL: elf/unload4 when Clang 19 is used to test glibc. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 34 insertions, 0 deletions
diff --git a/configure b/configure
index 58f05957f4..60fe529392 100755
--- a/configure
+++ b/configure
@@ -7722,6 +7722,40 @@ config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
saved_CC="$CC"
CC="$TEST_CC"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -fsemantic-interposition in testing" >&5
+printf %s "checking -fsemantic-interposition in testing... " >&6; }
+if test ${libc_cv_test_cc_cflags_fsemantic_interposition+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -c -Werror -fsemantic-interposition -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_test_cc_cflags_fsemantic_interposition=yes
+else case e in #(
+ e) libc_cv_test_cc_cflags_fsemantic_interposition=no
+ ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cc_cflags_fsemantic_interposition" >&5
+printf "%s\n" "$libc_cv_test_cc_cflags_fsemantic_interposition" >&6; }
+
+CC="$saved_CC"
+
+
+config_vars="$config_vars
+have-test-cc-cflags-fsemantic-interposition = $libc_cv_test_cc_cflags_fsemantic_interposition"
+
+
+
+saved_CC="$CC"
+CC="$TEST_CC"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -ffloat-store in testing" >&5
printf %s "checking for -ffloat-store in testing... " >&6; }
if test ${libc_cv_test_cc_float_store+y}