]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
configure: use TEST_CC to check for --depaudit
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 9 Dec 2025 14:58:33 +0000 (11:58 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 11 Dec 2025 11:27:16 +0000 (08:27 -0300)
The ld.lld does not support this option.
Reviewed-by: Sam James <sam@gentoo.org>
configure
configure.ac

index f93530f7bacca7e1f986e1184f0daa105de4d5e9..aa92a122b1818040976f097d2ebdf7270cf9734f 100755 (executable)
--- a/configure
+++ b/configure
@@ -7248,6 +7248,8 @@ libc_linker_feature=no
 cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
+saved_CC="$CC"
+CC="$TEST_CC"
 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
                  -Wl,--depaudit,x -nostdlib -nostartfiles
                  -fPIC -shared -o conftest.so conftest.c
@@ -7268,14 +7270,15 @@ then
 fi
 rm -f conftest*
 if test $libc_linker_feature = yes; then
-  libc_cv_depaudit=yes
+  libc_cv_test_depaudit=yes
 else
-  libc_cv_depaudit=no
+  libc_cv_test_depaudit=no
 fi
+CC="$saved_CC"
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
 printf "%s\n" "$libc_linker_feature" >&6; }
 config_vars="$config_vars
-have-depaudit = $libc_cv_depaudit"
+have-depaudit = $libc_cv_test_depaudit"
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z pack-relative-relocs" >&5
 printf %s "checking for linker that supports -z pack-relative-relocs... " >&6; }
index cf6ddd1d33576446922824def2f84407e094ed29..ab355fa266ea498c1ea5029f41ad6063f7e7939d 100644 (file)
@@ -1340,9 +1340,9 @@ LIBC_LINKER_FEATURE([-z start-stop-gc], [-Wl,-z,start-stop-gc],
                    [libc_cv_z_start_stop_gc=yes], [libc_cv_z_start_stop_gc=no])
 LIBC_CONFIG_VAR([have-z-start-stop-gc], [$libc_cv_z_start_stop_gc])
 
-LIBC_LINKER_FEATURE([--depaudit], [-Wl,--depaudit,x],
-                   [libc_cv_depaudit=yes], [libc_cv_depaudit=no])
-LIBC_CONFIG_VAR([have-depaudit], [$libc_cv_depaudit])
+LIBC_TEST_LINKER_FEATURE([--depaudit], [-Wl,--depaudit,x],
+                        [libc_cv_test_depaudit=yes], [libc_cv_test_depaudit=no])
+LIBC_CONFIG_VAR([have-depaudit], [$libc_cv_test_depaudit])
 
 LIBC_LINKER_FEATURE([-z pack-relative-relocs],
                    [-Wl,-z,pack-relative-relocs],