public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Cary Coutant <ccoutant@gmail.com>
Cc: Alan Modra <amodra@gmail.com>, binutils@sourceware.org
Subject: Re: [PATCH] gold, dwp: support zstd compressed input debug sections [PR 29641]
Date: Thu, 10 Nov 2022 21:34:14 -0800	[thread overview]
Message-ID: <20221111053414.2g4ifwlrfqepcubc@google.com> (raw)
In-Reply-To: <CAJimCsHtzervNJgLP9XEQ48JWY3ZWHtXWjiXHkMU4QrYF7OiHw@mail.gmail.com>

On 2022-11-10, Cary Coutant wrote:
>>  elfcpp/elfcpp.h                         |   1 +
>>  gold/Makefile.am                        |  10 +-
>>  gold/Makefile.in                        |  16 +-
>>  gold/aclocal.m4                         |   1 +
>>  gold/compressed_output.cc               |  44 ++--
>>  gold/config.in                          |   3 +
>>  gold/configure                          | 258 +++++++++++++++++++++++-
>>  gold/configure.ac                       |   3 +-
>>  gold/testsuite/Makefile.am              |  17 +-
>>  gold/testsuite/Makefile.in              |  32 ++-
>>  gold/testsuite/gdb_index_test_2_zstd.sh |  24 +++
>>  11 files changed, 361 insertions(+), 48 deletions(-)
>>  create mode 100755 gold/testsuite/gdb_index_test_2_zstd.sh
>
>In testsuite/Makefile.am:
>
>@@ -3120,6 +3120,15 @@ gdb_index_test_2_gabi:
>gdb_index_test_cdebug_gabi.o gcctestdir/ld
>        $(CXXLINK) -Wl,--gdb-index $<
> gdb_index_test_2_gabi.stdout: gdb_index_test_2_gabi
>        $(TEST_READELF) --debug-dump=gdb_index $< > $@
>+check_SCRIPTS += gdb_index_test_2_zstd.sh
>+check_DATA += gdb_index_test_2_zstd.stdout
>+MOSTLYCLEANFILES += gdb_index_test_2_zstd.stdout gdb_index_test_2_zstd
>+gdb_index_test_cdebug_zstd.o: gdb_index_test.cc
>+       $(CXXCOMPILE) -O0 -g -Wa,--compress-debug-sections=zstd -c -o $@ $<
>+gdb_index_test_2_zstd: gdb_index_test_cdebug_zstd.o gcctestdir/ld
>+       $(CXXLINK) -Wl,--gdb-index $<
>+gdb_index_test_2_zstd.stdout: gdb_index_test_2_zstd
>+       $(TEST_READELF) --debug-dump=gdb_index $< > $@
>
>These new tests should be conditioned on HAVE_ZSTD, right?
>
>Otherwise, looks good to me. Thanks!

Thanks for review!  I am going to use

AM_CONDITIONAL(HAVE_ZSTD, test "$pkg_cv_ZSTD_LIBS" != "")

if HAVE_ZSTD
check_SCRIPTS += gdb_index_test_2_zstd.sh
check_DATA += gdb_index_test_2_zstd.stdout
MOSTLYCLEANFILES += gdb_index_test_2_zstd.stdout gdb_index_test_2_zstd
gdb_index_test_cdebug_zstd.o: gdb_index_test.cc
        $(CXXCOMPILE) -O0 -g -Wa,--compress-debug-sections=zstd -c -o $@ $<
gdb_index_test_2_zstd: gdb_index_test_cdebug_zstd.o gcctestdir/ld
        $(CXXLINK) -Wl,--gdb-index $<
gdb_index_test_2_zstd.stdout: gdb_index_test_2_zstd
        $(TEST_READELF) --debug-dump=gdb_index $< > $@
endif


autoconf generated gold/configure uses test "$pkg_cv_ZSTD_LIBS" != ""
to define HAVE_ZSTD_TRUE= and HAVE_ZSTD_FALSE='#'

      reply	other threads:[~2022-11-11  5:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01  1:44 Fangrui Song
2022-10-31 21:26 ` PING " Fangrui Song
2022-11-10 21:48 ` Cary Coutant
2022-11-11  5:34   ` 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=20221111053414.2g4ifwlrfqepcubc@google.com \
    --to=maskray@google.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=ccoutant@gmail.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).