From 6cfc50f40a5e59bc46d8b45bc7520f719e86af1e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 2 Dec 2022 16:00:27 -0300 Subject: configure: Remove check if ld is GNU Assume linker has gnu argument input style. Reviewed-by: Carlos O'Donell --- aclocal.m4 | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 149b9e5376..88db64a683 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -126,10 +126,6 @@ OBJCOPY=`$CC -print-prog-name=objcopy` AC_SUBST(OBJCOPY) GPROF=`$CC -print-prog-name=gprof` AC_SUBST(GPROF) - -AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, -[LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) -gnu_ld=$libc_cv_prog_ld_gnu ]) dnl Run a static link test with -nostdlib -nostartfiles. @@ -219,25 +215,23 @@ dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-f 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 - cat > conftest.c < conftest.c <&AS_MESSAGE_LOG_FD]) - then - if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: $1 ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +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 + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: $1 ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then $3 else -- cgit 1.4.1