From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 1068C3858D38 for ; Mon, 3 Oct 2022 07:49:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1068C3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 38F0E1F8C4; Mon, 3 Oct 2022 07:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664783366; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bhCpOwEh9y+/eIc+7AJdF4FjDlTyIs6tL4jcpZJ5puA=; b=MOARPou6D1vRZqyf4M9Tqa3jXPvs7YobihUjxba4/N9OVj1l9ZmCForj9MGg3J6NUshlMh aJsYObn5Ogi5RMYDIZuUGAc0iaKcP1SZJkb5gzFNbxcy1N6Hb3hdSqcK08wRUi2eYKj3kl 6Gx+Zs7eB83DfRUtDsyoEjoR+JiQNi0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664783366; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bhCpOwEh9y+/eIc+7AJdF4FjDlTyIs6tL4jcpZJ5puA=; b=IBMnff+U+mav8DV8kV93p1wu3dU3jHjshWMWfKoDXPpFCWAsrTQCIVacoTaaddO8/JxPnU 6PCo039E8QEDNTBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 22DE01332F; Mon, 3 Oct 2022 07:49:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +J+EBwaUOmNfUAAAMHmgww (envelope-from ); Mon, 03 Oct 2022 07:49:26 +0000 Message-ID: <20ce4355-56ca-ad6f-d7de-4c1522d33b5d@suse.cz> Date: Mon, 3 Oct 2022 09:49:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH][RFC] add --enable-zstd-compressed-debug-sections configure option Content-Language: en-US To: Fangrui Song Cc: Pedro Alves , binutils@sourceware.org References: <20220929201711.7nz236xraosd76za@google.com> <61355429-24b3-17d0-ab03-6fa57ee861d5@suse.cz> <3d23c527-9090-8c76-bd95-a9cb440fca1d@palves.net> <23b9a92b-be15-a33d-958b-e93db626c1a1@suse.cz> <20221001073112.t6aiwxhqoi3d7k5p@google.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <20221001073112.t6aiwxhqoi3d7k5p@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,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 List-Id: On 10/1/22 09:31, Fangrui Song wrote: > On 2022-09-30, Martin Liška wrote: >> On 9/30/22 13:25, Pedro Alves wrote: >>> On 2022-09-30 10:48 a.m., Martin Liška wrote: >>>> Hello. >>>> >>>> The patch can set up default compression algorithm as zstd instead of the >>>> default zlib-gabi. >>>> >>>> The patch is lightly tested as readelf can't decompress debug sections: >>>> https://sourceware.org/bugzilla/show_bug.cgi?id=29640 >>>> >>>> Thoughts? >>>> >>>> ChangeLog: >>>> >>>>     * configure.ac: Add --enable-zstd-compressed-debug-sections >>>>     configure option. >>>>     * configure: Regenerate. >>> >>> This may become a bit awkward in the future when other better format appears, and you want to >>> switch to use it by default.  Like, imagine zstd2 is invented.  At that point we'd have to decide >>> whether to add code to error out if the user specifies both >>>    "--enable-zstd-compressed-debug-sections --enable-zstd2-compressed-debug-sections", >>> or always pick the latter option, or some such. >> >> Understood. >> >>> >>> IMHO, it seems cleaner and more future proof to add instead: >>> >>>   --enable-default-compressed-debug-sections=zlib|zlib-gnu|zlib-gabi|zstd >>> >>> WDYT? >> >> Yep, it's much nicer. Anyway, lemme try preparing a patch that does a bit of refactoring >> before I introduce such a patch. >> >> Martin > > Personally I'll prefer that the compiler drivers (GCC and Clang) pass > the default options to ld/as, and they have good infrastructure for > customization...  (Clang recently got better configuration file > (https://clang.llvm.org/docs/UsersManual.html#configuration-files) > support which enables more convenient default driver options.) > > Setting default options in ld/as allow very few projects which bypass > the compiler driver to use zstd compressed debug sections but the > benefit is probably low... Well, I would prefer having the configure option, similar to --enable-compressed-debug-sections, we as openSUSE rely on that where we select the corresponding option value in binutils package. Martin