From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 35A8D3858D28; Tue, 20 Sep 2022 01:33:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 35A8D3858D28 Received: from [10.0.0.155] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AE8261E07B; Mon, 19 Sep 2022 21:33:29 -0400 (EDT) Message-ID: <8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca> Date: Mon, 19 Sep 2022 21:33:29 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v2] binutils, gdb: support zstd compressed debug sections Content-Language: fr To: Fangrui Song , binutils@sourceware.org, gdb-patches@sourceware.org References: <20220919164040.1766176-1-maskray@google.com> From: Simon Marchi In-Reply-To: <20220919164040.1766176-1-maskray@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2022 01:33:31 -0000 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