From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by sourceware.org (Postfix) with ESMTPS id 5686F3858D33 for ; Tue, 28 Feb 2023 13:21:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5686F3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id e37so7232773wri.10 for ; Tue, 28 Feb 2023 05:21:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tKQAm96X82WccrsIyqWfCAzeApI8TDnUWzirk2P2MVU=; b=vvRpqhpwIoeHLkv3nGbI80keJ9uUOD+bb3WLSUBJQc/JgG9F4oz3dOXsm3Llyctsbg o4VYKBbBUy4YoLXDoorpE1NIdBL/WO1Te0Ftv0mhOx4xJrwN6f+rNIH7EL1c7jZZKLH/ UgijToNWPAImwvx5AI0N0IFhbBcxm+fa8QdibQ0ej/Go9g6ni7T37Sb9JS5KCPfT9FA/ 8meUmPJdvwc8x+w/u/xVqDeS4BaW5mxOyyZ/ub0QQqZv3WJzytrQEseelba4kPxkxtMZ f528mn2ayoX9A40V0LsqZvAd4T9WAy05yGKls9Y53+g60Zls3jpz9/DXWIRAEEIU4cXA nhAw== X-Gm-Message-State: AO0yUKURktQ3CYhY6zgjzCxVdyhwmjkQCagSwsddnIU20srfpNKa9R4z KUO6+xpVle5ECp1m8U7gLH8l05j7G7U= X-Google-Smtp-Source: AK7set81j574bs3YNJbF12EhlhSKP9/2dvfwYlvnETFqNEkNlyWiOO3RWLPT4zFvz5EiyS4zEWx06g== X-Received: by 2002:adf:cc8a:0:b0:2c7:b3b9:a39d with SMTP id p10-20020adfcc8a000000b002c7b3b9a39dmr2089253wrj.11.1677590484836; Tue, 28 Feb 2023 05:21:24 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id f7-20020adffcc7000000b002c7163660a9sm10056531wrs.105.2023.02.28.05.21.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 05:21:24 -0800 (PST) Subject: Re: [PATCH] gas: Add --force-compress-debug-sections To: Tom de Vries , Jan Beulich Cc: binutils@sourceware.org, Michael Matz , Nick Clifton , Alan Modra References: <20230223124519.4228-1-tdevries@suse.de> <7dcb7bfb-f65d-aed8-78d4-944211ef5127@suse.de> <819f729a-da9c-3b8a-3769-7995c009704b@suse.com> <14a2defc-5371-84bc-2d59-9980755b112a@suse.de> <02dcf47c-4256-c5e5-de9e-814b60da8ce8@suse.com> <7cb226d0-1a91-9bad-181c-46f79c4d6eaf@suse.de> <0c60eef7-c612-ec37-8c3f-36b746ff8d95@suse.de> <711d9da5-8f31-3f1e-530b-5ae01780fcad@suse.de> <70ee7e78-080f-ddce-9916-608bd8733e66@palves.net> <6ad0c7f3-8971-d5b6-682c-8aaefc484db9@suse.de> From: Pedro Alves Message-ID: Date: Tue, 28 Feb 2023 13:21:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <6ad0c7f3-8971-d5b6-682c-8aaefc484db9@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 2023-02-27 11:24 p.m., Tom de Vries wrote: > On 2/27/23 15:07, Jan Beulich wrote: > OK, so say we have --compress-debug-sections=none|zlib|zstd|no|yes|sizewin. > > We have the two existing aliases, --compress-debug-sections and --nocompress-debug-sections, how do we translate those? > > Currently --nocompress-debug-sections maps to --compress-debug-sections=none, but I suppose that would have to become --compress-debug-sections=no, otherwise things will get extremely confusing. Let's drop the new (when) "no" option, as it's not really needed, and rename "yes" -> when-always, and "sizewin" -> "when-always". So we end up with: --compress-debug-sections=none|zlib|zstd|when-always|when-sizewin ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ group1 group2 And then the "no" in nocompress-debug-sections is no longer ambiguous. > > Then --compress-debug-sections currently maps to --compress-debug-sections=zlib.  So, should that become --compress-debug-sections=zlib,sizewin?  Or just stay --compress-debug-sections=zlib?  I'm not sure if we have made things clearer or more orthogonal this way. I think it's clearer to make it map to whatever are the defaults in all subgroups, so no subgroup is special cased. The default compression format is zlib, and the default "when" is "sizewin", so: "--compress-debug-sections" => "--compress-debug-sections=zlib,sizewin" And then: "--compress-debug-sections=always --compress-debug-sections" => "--compress-debug-sections=zlib,sizewin" > > I'm starting to wonder if not a simple --compress-debug-sections=heuristic-sizewin|heuristic-always is the solution, in the sense that these two would only influence the heuristics and nothing else, which would work well with the existing options. I prefer "when" (or no leading prefix) to "heuristic", as "always" is not an heuristic, there's no trial and error nor is it loosely defined what it does. But that's a nitpick, it's actually fine with me. FWIW.