From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 0652D3857BA4 for ; Tue, 20 Sep 2022 05:40:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0652D3857BA4 Received: by mail-pf1-x430.google.com with SMTP id y136so1744408pfb.3 for ; Mon, 19 Sep 2022 22:40:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=mexnV0Ih7dn6tLSKPO3FbU162IfMH6tATG8fwjJ3VYA=; b=pNkxaEo5JZXFi/LtEfnMNdEUDUblPu5OH2yhkHOQWsKBQ0aThYBNyW5yeIX4igqlGR GPCBFtEwLNxxB1rRP58AZhYlH5wJug/zb56nPE6rQmgZk4k6MDCwodtYQ4l4TZyqs118 J12bJxT8K8CEXMeh58tuPs+2VFihnk0PaQ5u4NCkJUhyJtIxzKGKgd0o0XIzxVUQ9iAZ bwiRy7vby+9zE5dzyy5YCeOQPV2ZJmVPDY4bj2ml/OKyYeySVZXZ/Tijv6j+KHY8rpiP 1YK+DXHx79NLKTPqNhIrxLxx4R4tq5ahcSQXRApVyjz6DQWowKqWMoSX20e9IMUPBRxI FfQg== X-Gm-Message-State: ACrzQf3Z7UaefK+dugNo50UIoPeppqMcl6ORMryzLd5Qgi4w8cYa7mu0 +TuFKua0kEQ5wMVqthcosgHesWPz9ORrbA== X-Google-Smtp-Source: AMsMyM5Eb6B6j8ISUAIVBM7fSKOTilHfc+XR9cHzWkDcmifeE4K8BYRpXGkdMmCyGQOgTzoZ5OOSeg== X-Received: by 2002:a63:6c01:0:b0:429:ea6e:486d with SMTP id h1-20020a636c01000000b00429ea6e486dmr18503589pgc.247.1663652455483; Mon, 19 Sep 2022 22:40:55 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:d84:2541:70:6d52]) by smtp.gmail.com with ESMTPSA id s21-20020a63d055000000b0041a6638b357sm468156pgi.72.2022.09.19.22.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 22:40:54 -0700 (PDT) Date: Mon, 19 Sep 2022 22:40:50 -0700 From: Fangrui Song To: Simon Marchi Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH v2] binutils, gdb: support zstd compressed debug sections Message-ID: <20220920054050.4yihtuyuh32ym6zb@google.com> References: <20220919164040.1766176-1-maskray@google.com> <8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <8ea6ccd1-0292-a1ad-8aed-51823ec2b25f@simark.ca> X-Spam-Status: No, score=-27.4 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 05:41:02 -0000 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.