[PATCH v3] binutils, gdb: support zstd compressed debug sections

Fangrui Song maskray@google.com
Mon Sep 26 07:20:27 GMT 2022


On 2022-09-26, Alan Modra wrote:
>On Fri, Sep 23, 2022 at 10:32:43AM -0400, Simon Marchi wrote:
>> Just one question: you moved PKG_PROG_PKG_CONFIG up in ld/configure.ac,
>> which I think is ok.
>
>I'm going to fix this one another way.
>
>>  But what about the other configure.ac files, don't
>> they need PKG_PROG_PKG_CONFIG too?  gdb/configure.ac, for instance, uses
>> pkg-config for debuginfod.  So if the user passes --without-debuginfod
>> --with-zstd, I expect things to fail, as the pkg-config will be skipped.
>
>No, that will be fine, I think  The reason being that
>PKG_CHECK_MODULES AC_REQUIREs PKG_PROG_PKG_CONFIG.  So the expansion
>of AC_DEBUGINFOD will emit an expansion of PKG_PROG_PKG_CONFIG if that
>has not already occurred, before the entire AC_DEBUGINFOD expansion.
>
>> binutils/configure.ac probably has the same problem, since it uses
>> PKG_CHECK_MODULES for msgpack.
>
>I'll fix this one even though it isn't a problem now because
>AC_DEBUGINFOD and AM_ZSTD preceed it.  We should use AS_IF more often,
>particularly when autoconf macros are invoked.
>
>> I would suggest using PKG_PROG_PKG_CONFIG at the top of all configure.ac
>> that use AM_ZSTD, out of precaution.
>
>Better to avoid the need..
>
>binutils/
>	* configure.ac (msgpack): Use "AS_IF" rather than "if".
>	* configure: Regenerate.
>ld/
>	* configure.ac (jansson): Use "AS_IF" rather than "if".
>	* configure: Regenerate.
>

Thanks.  I've changed the zstd patch to use AS_IF, too.

BTW: I think the `!= xno` trick for ancient shells is not needed.  `!=
no` is used many times in binutils-gdb.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4-0001-binutils-gdb-support-zstd-compressed-debug-sectio.patch
Type: text/x-diff
Size: 109886 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20220926/ef415ac3/attachment-0001.bin>


More information about the Binutils mailing list