Message ID | 20230307142150.2553808-1-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 31CEE3858D3C for <patchwork@sourceware.org>; Tue, 7 Mar 2023 14:22:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31CEE3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678198937; bh=m5Xkws3aPpUSEOQQ030FilKmDh8qva0u3QJ2hsIqA4M=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=FyAJN0DHwvq7hVosByjL41IVPStnZlOjPZV6FkaEO2CCHF/xh+rZ7NG5ZOGIJKEhf 6pXjUFLkT+0cwhRO0e0DM5ZDm3aY41oLk0ZT6FSck43s6Z8DVRK34LEzd0rZmHZwKK 3VwicYniLFVvRLphoiApDfWxlmY/q/4QtPWLl2KY= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 830E13858D3C for <gdb-patches@sourceware.org>; Tue, 7 Mar 2023 14:21:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 830E13858D3C Received: by mail-wm1-x329.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso7318623wmo.0 for <gdb-patches@sourceware.org>; Tue, 07 Mar 2023 06:21:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678198912; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m5Xkws3aPpUSEOQQ030FilKmDh8qva0u3QJ2hsIqA4M=; b=6L4zV5UQmcEyOjoEoY9r+0/1m/vizyuBQhhNFumf3zXiQXbss8NtrixsbtKkdsTppO G8zwFNrOybzPRuR0cOhPOneNQ4qn4M8fgCfLAkHGbyGYh2G1cwkGE/MygjwuN0GIBgNA RUzC3Jr4IdCpdgDTchU03dYeKf6K3jdYOLoQIC5WWtQc0gUw+dMzN9Ge1VG27T0Nq5a+ zlR5xfmK80zWxWwUgxbJVG3XK+K1901khxIOJ0k2tbsB+MR4Fv4PB1WrodRRDRohtaqi rNpZfRiuln8UN8DN2h/pnnLFBiuF+NLJMptqMybaF4DL+66an1zUMNrZxBXviwKUDqHL Ir8A== X-Gm-Message-State: AO0yUKXvoE/ghwZKukf372ekPQz5iZhQ0Tqo0I6Ig3EVgsXVzmxOW+PA X2XEFUCddxAN57liSBw1Qgo3n24T3QbNL5pz9hg= X-Google-Smtp-Source: AK7set+kbuwexgAR2EUpfzbecMx4ABhpza9N8YGRygxjiIw30z/A57RLyjkHwuW6Q249tuW9oSk6eQ== X-Received: by 2002:a05:600c:3111:b0:3eb:399d:ab24 with SMTP id g17-20020a05600c311100b003eb399dab24mr11736044wmo.28.1678198911857; Tue, 07 Mar 2023 06:21:51 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:e718:9e1:49a8:9d75]) by smtp.gmail.com with ESMTPSA id t25-20020a05600c329900b003eb5ce1b734sm13709567wmp.7.2023.03.07.06.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 06:21:51 -0800 (PST) To: gdb-patches@sourceware.org Cc: "Jose E . Marchesi" <jose.marchesi@oracle.com>, Simon Marchi <simon.marchi@efficios.com> Subject: [PATCH] gdb: Fix GDB_AC_CHECK_BFD macro regression Date: Tue, 7 Mar 2023 14:21:50 +0000 Message-Id: <20230307142150.2553808-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Richard Purdie via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Richard Purdie <richard.purdie@linuxfoundation.org> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdb: Fix GDB_AC_CHECK_BFD macro regression
|
|
Commit Message
Richard Purdie
March 7, 2023, 2:21 p.m. UTC
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 <richard.purdie@linuxfoundation.org>
---
gdb/acinclude.m4 | 2 +-
gdb/configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Comments
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 <richard.purdie@linuxfoundation.org> > --- > 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
> 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 <richard.purdie@linuxfoundation.org> >> --- >> 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. LGTM as well.
On 3/7/23 10:53, Jose E. Marchesi via Gdb-patches wrote: > >> 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 <richard.purdie@linuxfoundation.org> >>> --- >>> 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. > > LGTM as well. > Thanks. Running autoreconf, I see one more hunk in configure. I amended the patch and pushed it: From 5fc6b6d44cd63651c2902cbfc5b9734a55aaa617 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 7 Mar 2023 14:21:50 +0000 Subject: [PATCH] gdb: Fix GDB_AC_CHECK_BFD macro regression 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 <richard.purdie@linuxfoundation.org> Change-Id: Ie91509116fab29f95b9db1ff0b6ddc280d460112 Approved-By: Simon Marchi <simon.marchi@efficios.com> Reviewed-By: Jose E. Marchesi <jose.marchesi@oracle.com> --- 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 05106df8ee62..173e40b440af 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 017ec05e4b71..5bb2a0795e59 100755 --- a/gdb/configure +++ b/gdb/configure @@ -28206,7 +28206,7 @@ WIN32LIBS="$WIN32LIBS $WIN32APILIBS" # 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" @@ -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" base-commit: 2eb2613519ae444493c301be1c37901c8a528c40
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"