[PATCH v2 2/3] configure: use TEST_CC to check for --depaudit
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Dec 9 14:58:33 GMT 2025
The ld.lld does not support this option.
---
configure | 9 ++++++---
configure.ac | 6 +++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index f93530f7ba..aa92a122b1 100755
--- 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; }
diff --git a/configure.ac b/configure.ac
index cf6ddd1d33..ab355fa266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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],
--
2.43.0
More information about the Libc-alpha
mailing list