From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id EDD7A3858D32 for ; Mon, 19 Sep 2022 16:45:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EDD7A3858D32 Received: by mail-pj1-x102f.google.com with SMTP id q35-20020a17090a752600b002038d8a68fbso3886312pjk.0 for ; Mon, 19 Sep 2022 09:45:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=irRXfHpgSp5BwY3lWm0a4UC89HyfBoDtsFdatGEXsho=; b=Whw+fIqoNOSF+Nu6qBJI9HXqbO6K4qndmE7PXnCrQ8kYRXBvIxxHesFivWjtmwmHmn 9MFquOye5bP8j8ikIQ7xsZ6rxR8/AYrnPS2vcVyND0JXuKjr9UW23XlCv2+Mr5L9Ptcz j6ATzUZ7CxVWwgE5J9vj0u6XvshUvebn0jMDUIGW1ZVGil4uaFdjBe9B55JobcgwYJak MyudObM2rbWYe7pvBbsYYjROzGa91Lj4Bu9/mrLJcEGFy/uGIZhF0uGnoWH3nQEPKtz/ vPVzpOfwydVhUnKwYVlFxauwxqFjqANrjlSyoTB5Nm7pM+XC8cvgHeaWNR3zj3dCtRAN Qp5w== X-Gm-Message-State: ACrzQf1Ij97cO/djMHTODCaP73dXRC2jRgR8aEJfxTqNig6+Cz2PNayU T7hrE++tvBskt0pFiGANSafCjeO9A6TX9A== X-Google-Smtp-Source: AMsMyM4oGTReUWwNeLBrFuCbr6R5H8kZqeZvJPUQLmk/y6roq+0vbnxqWpB5uCVD2lXtqQUOr5/IBQ== X-Received: by 2002:a17:902:daca:b0:178:77ca:a770 with SMTP id q10-20020a170902daca00b0017877caa770mr647163plx.54.1663605926900; Mon, 19 Sep 2022 09:45:26 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:a166:db9c:d5e1:d895]) by smtp.gmail.com with ESMTPSA id s18-20020a170902c65200b00176d8e33601sm20561602pls.203.2022.09.19.09.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 09:45:26 -0700 (PDT) Date: Mon, 19 Sep 2022 09:45:22 -0700 From: Fangrui Song To: Simon Marchi Cc: binutils@sourceware.org, gdb-patches@sourceware.org, Jan Beulich Subject: Re: [PATCH] binutils, gdb: support zstd compressed debug sections Message-ID: <20220919164522.qj7uwnbhrc7ogojf@google.com> References: <20220919040115.31326-1-maskray@google.com> <15fe4352-79e1-acd5-5a71-fc40e19047a8@simark.ca> <20220919085126.5m2keelsz3hzx7xf@google.com> <78681d27-e5bd-c983-b521-e46af546537e@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <78681d27-e5bd-c983-b521-e46af546537e@simark.ca> X-Spam-Status: No, score=-20.0 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, 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: Mon, 19 Sep 2022 16:45:29 -0000 On 2022-09-19, Simon Marchi wrote: >> I am unfamilir with autotools, but I agree that pkg-config is better.  Changed to PKG_CHECK_MODULES >> and pushed the change to >> https://gitlab.com/MaskRay/binutils-gdb/-/commits/zstd > >Thanks, I'll take a proper look when you post a v2. > >> However, now `make all-gdb` fails to link because gdb/Makefile does not have `ZSTD_LIBS = -lzstd` ... > >For GDB, you can copy what we do for debuginfod in gdb/Makefile.in, >which would mean: > >ZSTD_CFLAGS = @ZSTD_CFLAGS@ >ZSTD_LIBS = @ZSTD_LIBS@ > >And use $(ZSTD_CFLAGS) and $(ZSTD_LIBS) where appropriate. > >Simon Thanks, the ZSTD_CFLAGS tip helped. I inspected jansson and msgpack's pkg-config check and get this v2 patch: https://sourceware.org/pipermail/binutils/2022-September/122950.html Note: For some reasons I have to include PKG_PROG_PKG_CONFIG in config/zstd.m4, otherwise pkg-config does not work for some directories. Note: PKG_CHECK_MODULES(MSGPACK in binutils/configure.ac possibly misses AC_MSG_CHECKING/AC_MSG_RESULT, so when msgpack is missing, the log isn't clear.