From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A53E33858D3C for ; Tue, 7 Mar 2023 14:25:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A53E33858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 345C21E128; Tue, 7 Mar 2023 09:25:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1678199104; bh=MJYSOJCj2wXwcbzqbVc8nG7QyTtignEvDYIV0JJmzdw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UwD2IquV46MXXb18rTkDestkmYVCRA/9IH1yQPU9+VH7fM/JwOcugX2eTdYuQjM5I JeNu3lKZn1u1F4y+4tzTNEqFSd5oiJaPRMWWHGDn5/9d/ZUv4kT1/08m+sQYMTLvKW PmV9aOyk2QZNtEf1RvgGqFri864OXHIhBcK7sNpA= Message-ID: <62a25833-16a5-269e-4921-a15e1080c369@simark.ca> Date: Tue, 7 Mar 2023 09:25:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] gdb: Fix GDB_AC_CHECK_BFD macro regression To: Richard Purdie , gdb-patches@sourceware.org Cc: "Jose E . Marchesi" , Simon Marchi References: <20230307142150.2553808-1-richard.purdie@linuxfoundation.org> Content-Language: en-US From: Simon Marchi In-Reply-To: <20230307142150.2553808-1-richard.purdie@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 3/7/23 09:21, Richard Purdie via Gdb-patches wrote: > Commit 5218fa9e8937b007d554f1e01c2e4ecdb9b7e271, "gdb: use libtool in > GDB_AC_CHECK_BFD" dropped passing in existing LDFLAGS. In our environment, > this caused the configure check "checking for ELF support in BFD" to stop > working causing build failures as we need our LDFLAGS to be used for > correct linking. > > That change also meant the code failed to match the comments. Add back the > missing LDFLAGS preservation, fix our builds and match the comment. > > Signed-off-by: Richard Purdie > --- > gdb/acinclude.m4 | 2 +- > gdb/configure | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4 > index 05106df8ee6..173e40b440a 100644 > --- a/gdb/acinclude.m4 > +++ b/gdb/acinclude.m4 > @@ -234,7 +234,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [ > # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > # always want our bfd. > CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > - LDFLAGS="-L../bfd -L../libiberty" > + LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" > intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > LIBS="-lbfd -liberty $intl $LIBS" > CC="./libtool --quiet --mode=link $CC" > diff --git a/gdb/configure b/gdb/configure > index 017ec05e4b7..18328fe5d42 100755 > --- a/gdb/configure > +++ b/gdb/configure > @@ -28323,7 +28323,7 @@ fi > # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > # always want our bfd. > CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > - LDFLAGS="-L../bfd -L../libiberty" > + LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" > intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > LIBS="-lbfd -liberty $intl $LIBS" > CC="./libtool --quiet --mode=link $CC" This LGTM, but just to be sure, let's wait for Jose to confirm. Simon