From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 5985D3858C30; Tue, 7 Mar 2023 16:13:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5985D3858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678205624; bh=jiKZEUgwWSgbqyhIv/e6tN9KiGe09P4wI70e3i7PrYM=; h=From:To:Subject:Date:From; b=eSHV0dfhV6uUtWiSLysosc5rktCFzypkAySbO2Fp2+kfKMY4bi43l54GnmsSgeTPm wnvpPUP5UberUNX6uPBOfCanDztrwM0NXrA/pphhP3LleEN41F1em1CPV/0pzrdjag wptz4NvSP8vbRb3Uvxughu1/j9wpFt6qoQhUAy8g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: Fix GDB_AC_CHECK_BFD macro regression X-Act-Checkin: binutils-gdb X-Git-Author: Richard Purdie X-Git-Refname: refs/heads/master X-Git-Oldrev: 2eb2613519ae444493c301be1c37901c8a528c40 X-Git-Newrev: 5fc6b6d44cd63651c2902cbfc5b9734a55aaa617 Message-Id: <20230307161344.5985D3858C30@sourceware.org> Date: Tue, 7 Mar 2023 16:13:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5fc6b6d44cd6= 3651c2902cbfc5b9734a55aaa617 commit 5fc6b6d44cd63651c2902cbfc5b9734a55aaa617 Author: Richard Purdie Date: Tue Mar 7 14:21:50 2023 +0000 gdb: Fix GDB_AC_CHECK_BFD macro regression =20 Commit 5218fa9e8937b007d554f1e01c2e4ecdb9b7e271, "gdb: use libtool in GDB_AC_CHECK_BFD" dropped passing in existing LDFLAGS. In our environme= nt, this caused the configure check "checking for ELF support in BFD" to st= op working causing build failures as we need our LDFLAGS to be used for correct linking. =20 That change also meant the code failed to match the comments. Add back = the missing LDFLAGS preservation, fix our builds and match the comment. =20 Signed-off-by: Richard Purdie Change-Id: Ie91509116fab29f95b9db1ff0b6ddc280d460112 Approved-By: Simon Marchi Reviewed-By: Jose E. Marchesi Diff: --- gdb/acinclude.m4 | 2 +- gdb/configure | 4 ++-- 2 files changed, 3 insertions(+), 3 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=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" - LDFLAGS=3D"-L../bfd -L../libiberty" + LDFLAGS=3D"-L../bfd -L../libiberty $LDFLAGS" intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` LIBS=3D"-lbfd -liberty $intl $LIBS" CC=3D"./libtool --quiet --mode=3Dlink $CC" diff --git a/gdb/configure b/gdb/configure index 017ec05e4b7..5bb2a0795e5 100755 --- a/gdb/configure +++ b/gdb/configure @@ -28206,7 +28206,7 @@ WIN32LIBS=3D"$WIN32LIBS $WIN32APILIBS" # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We # always want our bfd. CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" - LDFLAGS=3D"-L../bfd -L../libiberty" + LDFLAGS=3D"-L../bfd -L../libiberty $LDFLAGS" intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` LIBS=3D"-lbfd -liberty $intl $LIBS" CC=3D"./libtool --quiet --mode=3Dlink $CC" @@ -28323,7 +28323,7 @@ fi # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We # always want our bfd. CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" - LDFLAGS=3D"-L../bfd -L../libiberty" + LDFLAGS=3D"-L../bfd -L../libiberty $LDFLAGS" intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` LIBS=3D"-lbfd -liberty $intl $LIBS" CC=3D"./libtool --quiet --mode=3Dlink $CC"