aboutsummaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2022-04-25 16:48:25 -0700
committerFangrui Song <maskray@google.com>2022-04-25 16:48:25 -0700
commitd3c732cb4383d02e5d3099d87766e5853acf9ff8 (patch)
tree770c2105163511bcb8a3895364640c273ae070c7 /aclocal.m4
parentc0a436544259c7aef8871c29731a48dc715039db (diff)
downloadglibc-d3c732cb4383d02e5d3099d87766e5853acf9ff8.zip
glibc-d3c732cb4383d02e5d3099d87766e5853acf9ff8.tar.gz
glibc-d3c732cb4383d02e5d3099d87766e5853acf9ff8.tar.bz2
configure: Don't check LD -v --help for LIBC_LINKER_FEATURE
When LIBC_LINKER_FEATURE is used to check a linker option with the equal sign, it will likely fail because the LD -v --help output may look like `-z lam-report=[none|warning|error]` while the needle is something like `-z lam-report=warning`. The LD -v --help filter doesn't save much time, so just remove it. (cherry picked from commit 8438135d3481853e300e1043cfee3946dadb28b3)
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m419
1 files changed, 8 insertions, 11 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 08fa1ac..fb3eaad 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -223,20 +223,17 @@ AC_DEFUN([LIBC_LINKER_FEATURE],
[AC_MSG_CHECKING([for linker that supports $1])
libc_linker_feature=no
if test x"$gnu_ld" = x"yes"; then
- libc_linker_check=`$LD -v --help 2>/dev/null | grep "\$1"`
- if test -n "$libc_linker_check"; then
- cat > conftest.c <<EOF
+ cat > conftest.c <<EOF
int _start (void) { return 42; }
EOF
- if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
- $2 -nostdlib -nostartfiles
- -fPIC -shared -o conftest.so conftest.c
- 1>&AS_MESSAGE_LOG_FD])
- then
- libc_linker_feature=yes
- fi
- rm -f conftest*
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
+ $2 -nostdlib -nostartfiles
+ -fPIC -shared -o conftest.so conftest.c
+ 1>&AS_MESSAGE_LOG_FD])
+ then
+ libc_linker_feature=yes
fi
+ rm -f conftest*
fi
if test $libc_linker_feature = yes; then
$3