From 8438135d3481853e300e1043cfee3946dadb28b3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 25 Oct 2021 13:17:44 -0700 Subject: 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. --- configure | 76 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 32 insertions(+), 44 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 39d75eb4ed..3227e434d3 100755 --- a/configure +++ b/configure @@ -5979,25 +5979,22 @@ fi $as_echo_n "checking for linker that supports -z execstack... " >&6; } libc_linker_feature=no if test x"$gnu_ld" = x"yes"; then - libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z execstack"` - if test -n "$libc_linker_check"; then - cat > conftest.c < conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } - then - libc_linker_feature=yes - fi - rm -f conftest* + then + libc_linker_feature=yes fi + rm -f conftest* fi if test $libc_linker_feature = yes; then libc_cv_z_execstack=yes @@ -6012,25 +6009,22 @@ $as_echo "$libc_linker_feature" >&6; } $as_echo_n "checking for linker that supports -z start-stop-gc... " >&6; } libc_linker_feature=no if test x"$gnu_ld" = x"yes"; then - libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z start-stop-gc"` - if test -n "$libc_linker_check"; then - cat > conftest.c < conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } - then - libc_linker_feature=yes - fi - rm -f conftest* + then + libc_linker_feature=yes fi + rm -f conftest* fi if test $libc_linker_feature = yes; then libc_cv_z_start_stop_gc=yes @@ -6046,25 +6040,22 @@ have-z-start-stop-gc = $libc_cv_z_start_stop_gc" $as_echo_n "checking for linker that supports --depaudit... " >&6; } libc_linker_feature=no if test x"$gnu_ld" = x"yes"; then - libc_linker_check=`$LD -v --help 2>/dev/null | grep "\--depaudit"` - if test -n "$libc_linker_check"; then - cat > conftest.c < conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } - then - libc_linker_feature=yes - fi - rm -f conftest* + then + libc_linker_feature=yes fi + rm -f conftest* fi if test $libc_linker_feature = yes; then libc_cv_depaudit=yes @@ -6080,25 +6071,22 @@ have-depaudit = $libc_cv_depaudit" $as_echo_n "checking for linker that supports --no-dynamic-linker... " >&6; } libc_linker_feature=no if test x"$gnu_ld" = x"yes"; then - libc_linker_check=`$LD -v --help 2>/dev/null | grep "\--no-dynamic-linker"` - if test -n "$libc_linker_check"; then - cat > conftest.c < conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } - then - libc_linker_feature=yes - fi - rm -f conftest* + then + libc_linker_feature=yes fi + rm -f conftest* fi if test $libc_linker_feature = yes; then libc_cv_no_dynamic_linker=yes -- cgit 1.4.1