From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 239383858D39 for ; Mon, 23 Aug 2021 21:33:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 239383858D39 Date: Mon, 23 Aug 2021 17:33:45 -0400 From: Mike Frysinger To: Olivier Galibert Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Make using non-default as/ld/etc easier. Message-ID: Mail-Followup-To: Olivier Galibert , libc-alpha@sourceware.org References: <20210823191755.597854-1-galibert@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210823191755.597854-1-galibert@pobox.com> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 21:34:00 -0000 On 23 Aug 2021 21:17, Olivier Galibert wrote: just nits. idea looks fine to me. > --- a/aclocal.m4 > +++ b/aclocal.m4 > @@ -114,15 +114,38 @@ if test -n "$path_binutils"; then > path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'` > CC="$CC -B$path_binutils" > fi > -AS=`$CC -print-prog-name=as` > -LD=`$CC -print-prog-name=ld` > -AR=`$CC -print-prog-name=ar` > +check_as_version=0 > +AC_ARG_VAR([AS], [as program to use]) > +if test -z "$AS"; then > + AS=`$CC -print-prog-name=as` > + check_as_version=1 > +fi we do 2 space indents (i know the CC code above is broken, but best to not keep adding more) > --- a/configure.ac > +++ b/configure.ac > > +# Accept binutils 2.25 or newer. Don't check version if the path is forced. we've been inconsistent, but should use "dnl" instead of "#" > +AS_IF([test $check_as_version == 1], > +AS_IF([test $check_ld_version == 1], == is a bashism. you want = instead. -mike