From: Fangrui Song <maskray@google.com>
To: Simon Marchi <simark@simark.ca>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] binutils, gdb: support zstd compressed debug sections
Date: Mon, 19 Sep 2022 22:40:50 -0700 [thread overview]
Message-ID: <20220920054050.4yihtuyuh32ym6zb@google.com> (raw)
In-Reply-To: <8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca>
On 2022-09-19, Simon Marchi wrote:
>Hi,
>
>Running `autoreconf -vf` in the various subdirectories, I get some
>diffs. Can you run that command in the directories you touch?
Thanks for the help on the build system:)
I did not know autoreconf -vf.
Now I have such a script to help me regenerate autoconf/automake files.
for i in ld bfd gas gdb binutils; do
(cd ~/Dev/binutils-gdb/$i; PATH=~/projects/automake-1.15.1/bin:$PATH
~/projects/autoconf-2.69/bin/autoreconf -vf)
done
https://gitlab.com/MaskRay/binutils-gdb/-/commits/zstd
contains the updated patch.
(For folks who don't mind github, it's also on
https://github.com/MaskRay/binutils-gdb/tree/zstd)
>> diff --git a/config/zstd.m4 b/config/zstd.m4
>> new file mode 100644
>> index 00000000000..6495a039f2c
>> --- /dev/null
>> +++ b/config/zstd.m4
>> @@ -0,0 +1,21 @@
>> +AC_DEFUN([AM_ZSTD],
>
>This file would need a copyright header. You could copy the one from
>elf.m4, for instance. Can you also add a one-line comment to explain
>what the macro does (check for the zstd library)?
Added.
I removed PKG_PROG_PKG_CONFIG and moved PKG_PROG_PKG_CONFIG in ld/configure.ac.
PKG_PROG_PKG_CONFIG increases the lines in configure, so I get the idea
we should minimize PKG_PROG_PKG_CONFIG in *.m4 files.
>> +[
>> +AC_ARG_WITH(zstd,
>> + [AS_HELP_STRING([--with-zstd], [support zstd compressed debug sections (default=auto)])],
>> + [], [with_zstd=auto])
>> +AC_MSG_CHECKING([whether to use zstd])
>> +AC_MSG_RESULT([$with_zstd])
>
>Ah, I see what you mean by missing AC_MSG_CHECKING and AC_MSG_RESULT.
>In my opinion, if the user passes --without-zstd, we don't need to print
>a message about zstd. But whatever we choose, it would be nice to try
>to keep consistent.
Thanks. Removed AC_MSG_CHECKING and AC_MSG_RESULT. I think you are
right that they are not very useful.
>> +
>> +if test "$with_zstd" != no; then
>> + PKG_PROG_PKG_CONFIG
>> + PKG_CHECK_MODULES(ZSTD, [libzstd], [
>> + AC_DEFINE(HAVE_ZSTD, 1, [Define to 1 if zstd is enabled])
>> + AC_SUBST([ZSTD_CFLAGS])
>> + AC_SUBST([ZSTD_LIBS])
>
>I think you don't need these AC_SUBST, PKG_CHECK_MODULES does it for
>you.
Removed.
prev parent reply other threads:[~2022-09-20 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 16:40 Fangrui Song
2022-09-20 1:33 ` Simon Marchi
2022-09-20 5:40 ` Fangrui Song [this message]
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=20220920054050.4yihtuyuh32ym6zb@google.com \
--to=maskray@google.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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).