From 2d2d7e1a8f2e62b442ae8978f0a6c17f385575c4 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 6 Dec 2022 13:02:41 -0300 Subject: configure: Allow user override LD, AR, OBJCOPY, and GPROF The only way to override LD, AR, OBJCOPY, and GPROF is through --with-binutils (setting the environments variables on configure is overridden by LIBC_PROG_BINUTILS). The build-many-glibcs.py (bmg) glibcs option generates a working config, but not fully concise (some tools will be set from environment variable, while other will be set from $CC --print-prog-name). So remove the environment variable set to always use the "$CC --print-prog-name". Reviewed-by: Carlos O'Donell --- aclocal.m4 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 7ab8ac023b..cbe3c4698a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -118,12 +118,20 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -LD=`$CC -print-prog-name=$LDNAME` -AR=`$CC -print-prog-name=ar` +if test -z "$LD"; then + LD=`$CC -print-prog-name=$LDNAME` +fi +if test -z "$AR"; then + AR=`$CC -print-prog-name=ar` +fi AC_SUBST(AR) -OBJCOPY=`$CC -print-prog-name=objcopy` +if test -z "$OBJCOPY"; then + OBJCOPY=`$CC -print-prog-name=objcopy` +fi AC_SUBST(OBJCOPY) -GPROF=`$CC -print-prog-name=gprof` +if test -z "$GPROF"; then + GPROF=`$CC -print-prog-name=gprof` +fi AC_SUBST(GPROF) ]) -- cgit 1.4.1