[PATCH 2/5] configure: use TEST_CC to check for --depaudit
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Dec 5 19:11:33 GMT 2025
The ld.lld does not support this option.
---
configure | 3 +++
configure.ac | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index ff7c1d45b8..4cfc3daf83 100755
--- a/configure
+++ b/configure
@@ -7249,6 +7249,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
@@ -7273,6 +7275,7 @@ if test $libc_linker_feature = yes; then
else
libc_cv_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
diff --git a/configure.ac b/configure.ac
index 1cde589da6..c7907f48f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1340,8 +1340,8 @@ 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_TEST_LINKER_FEATURE([--depaudit], [-Wl,--depaudit,x],
+ [libc_cv_depaudit=yes], [libc_cv_depaudit=no])
LIBC_CONFIG_VAR([have-depaudit], [$libc_cv_depaudit])
LIBC_LINKER_FEATURE([-z pack-relative-relocs],
--
2.43.0
More information about the Libc-alpha
mailing list