public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Fangrui Song <maskray@google.com>,
	binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] binutils, gdb: support zstd compressed debug sections
Date: Mon, 19 Sep 2022 21:33:29 -0400	[thread overview]
Message-ID: <8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca> (raw)
In-Reply-To: <20220919164040.1766176-1-maskray@google.com>

Hi,

Running `autoreconf -vf` in the various subdirectories, I get some
diffs.  Can you run that command in the directories you touch?

> 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)?

> +[
> +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.

> +
> +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.

Simon

  reply	other threads:[~2022-09-20  1:33 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 [this message]
2022-09-20  5:40   ` 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=8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca \
    --to=simark@simark.ca \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=maskray@google.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).