From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 5AE863857833; Fri, 28 Oct 2022 17:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AE863857833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978966; bh=PfWhH8LM7FgVEGE3SvOg66lWegPdiatyTEh2RLnKkfs=; h=From:To:Subject:Date:From; b=gv3biDczaizAhEJ+VWcXRyaZ6zOKUJIoRwcdRo4QL6KnPO7oq7T6woKMIY3O2jp+X 2BgYhCuUYW3u3nOA/TrPBg1WiCxTWz6Qs72FcrnxKtAlPjua1tMrryWR4MDt51YICt V21JQ/u4EQBCu4XU5Ny+evPG8iyjHLxjQargIiT8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Use AR, LD, OBJDUMP, OJBCOPY, and GPROF if there are set at configure X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 5ad8a19a29a52fa941e0e0dace6f4b46947f6b00 X-Git-Newrev: 5e7ca48ca0c0929b449f194a71f33c0e6c3b4fd3 Message-Id: <20221028174246.5AE863857833@sourceware.org> Date: Fri, 28 Oct 2022 17:42:46 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5e7ca48ca0c0929b449f194a71f33c0e6c3b4fd3 commit 5e7ca48ca0c0929b449f194a71f33c0e6c3b4fd3 Author: Adhemerval Zanella Date: Thu Aug 4 16:43:17 2022 -0300 Use AR, LD, OBJDUMP, OJBCOPY, and GPROF if there are set at configure Diff: --- aclocal.m4 | 20 +++++++++++++++----- configure | 20 +++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 94c931b4f2..01afd73239 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -118,14 +118,24 @@ 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) -OBJDUMP=`$CC -print-prog-name=objdump` +if test -z "$OBJDUMP"; then + OBJDUMP=`$CC -print-prog-name=objdump` +fi AC_SUBST(OBJDUMP) -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) # Determine whether we are using GNU binutils. diff --git a/configure b/configure index 3476e62ee7..03fceee905 100755 --- a/configure +++ b/configure @@ -4575,14 +4575,24 @@ 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 -OBJDUMP=`$CC -print-prog-name=objdump` +if test -z "$OBJDUMP"; then + OBJDUMP=`$CC -print-prog-name=objdump` +fi -OBJCOPY=`$CC -print-prog-name=objcopy` +if test -z "$OBJCOPY"; then + OBJCOPY=`$CC -print-prog-name=objcopy` +fi -GPROF=`$CC -print-prog-name=gprof` +if test -z "$GPROF"; then + GPROF=`$CC -print-prog-name=gprof` +fi # Determine whether we are using GNU binutils.