From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>,
Fangrui Song <maskray@google.com>, Tom Tromey <tom@tromey.com>
Cc: Fangrui Song via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix GDB build: ELF support check & -lzstd (was: Re: [PATCH v3] binutils, gdb: support zstd compressed debug sections)
Date: Wed, 28 Sep 2022 20:27:44 +0100 [thread overview]
Message-ID: <7af42dd5-71fe-5591-3f8c-22aef0ea9d08@palves.net> (raw)
In-Reply-To: <d8200194-f89a-63cc-dd7a-946e94efc2db@polymtl.ca>
On 2022-09-28 8:00 p.m., Simon Marchi wrote:
> On 9/28/22 07:52, Pedro Alves wrote:
>> Note how above, in the gcc command line, "-lzstd" appears before
>> "-lbfd". That explain the link failure. It should appear after, like
>> -lz does.
>>
>> This commit fixes it, by moving ZSTD_LIBS from LDFLAGS to LIBS, next
>> to -lz, in GDB_AC_CHECK_BFD, and regenerating gdb/configure.
>>
>> Change-Id: I1f4128dde634e8ea04c9002904f1005a8b3a6863
>> ---
>> gdb/acinclude.m4 | 4 ++--
>> gdb/configure | 8 ++++----
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
>> index 28846119dcb..62fa66c7af3 100644
>> --- a/gdb/acinclude.m4
>> +++ b/gdb/acinclude.m4
>> @@ -234,9 +234,9 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
>> # always want our bfd.
>> CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
>> ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
>> - LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
>> + LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
>> intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
>> - LIBS="-lbfd -liberty -lz $intl $LIBS"
>> + LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
>> AC_CACHE_CHECK(
>> [$1],
>> [$2],
>
> LGTM. Someone opened a bug about this:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=29630
Thanks. I added a Bug: tag and pushed it.
next prev parent reply other threads:[~2022-09-28 19:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 4:08 [PATCH v3] binutils, gdb: support zstd compressed debug sections Fangrui Song
2022-09-23 14:32 ` Simon Marchi
2022-09-26 5:12 ` Alan Modra
2022-09-26 7:20 ` Fangrui Song
2022-09-26 13:30 ` Alan Modra
2022-09-26 14:08 ` Simon Marchi
2022-09-27 0:33 ` Alan Modra
2022-09-23 15:45 ` Nick Clifton
2022-09-23 15:58 ` Simon Marchi
2022-09-23 18:20 ` Fangrui Song
2022-09-23 18:57 ` Simon Marchi
2022-09-23 20:34 ` Fangrui Song
2022-09-24 5:43 ` Eli Zaretskii
2022-09-24 6:53 ` Enze Li
2022-09-24 7:13 ` Fangrui Song
2022-09-27 18:06 ` Tom Tromey
2022-09-27 18:08 ` Tom Tromey
2022-09-27 18:53 ` Fangrui Song
2022-09-28 11:52 ` [PATCH] Fix GDB build: ELF support check & -lzstd (was: Re: [PATCH v3] binutils, gdb: support zstd compressed debug sections) Pedro Alves
2022-09-28 19:00 ` Simon Marchi
2022-09-28 19:27 ` Pedro Alves [this message]
2022-09-28 19:30 ` Fangrui Song
2022-09-29 18:30 ` Pedro Alves
2022-09-29 11:43 ` [PATCH v3] binutils, gdb: support zstd compressed debug sections Martin Liška
2022-09-29 20:17 ` Fangrui Song
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=7af42dd5-71fe-5591-3f8c-22aef0ea9d08@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=maskray@google.com \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.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).