public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	gdb-patches@sourceware.org
Cc: "Jose E . Marchesi" <jose.marchesi@oracle.com>,
	Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb: Fix GDB_AC_CHECK_BFD macro regression
Date: Tue, 7 Mar 2023 09:25:03 -0500	[thread overview]
Message-ID: <62a25833-16a5-269e-4921-a15e1080c369@simark.ca> (raw)
In-Reply-To: <20230307142150.2553808-1-richard.purdie@linuxfoundation.org>



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

  reply	other threads:[~2023-03-07 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 14:21 Richard Purdie
2023-03-07 14:25 ` Simon Marchi [this message]
2023-03-07 15:53   ` Jose E. Marchesi
2023-03-07 16:14     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62a25833-16a5-269e-4921-a15e1080c369@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).