From patchwork Fri Jan 27 13:59:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 63790 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63CC4385B506 for ; Fri, 27 Jan 2023 14:00:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 962CF3858C00 for ; Fri, 27 Jan 2023 13:59:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 962CF3858C00 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 72E9E20224; Fri, 27 Jan 2023 13:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1674827983; 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; bh=uH4obIW/dVeszc6jaA6sVUryo8ua08q1Owgfzp6nUtY=; b=dmcV35yl3i+9HeSP2qv1Wty+jOb9OoKliU6h6+fmxN/kC5Z5rT0bnOLUWYXWXMgVeHDad8 KYgNeuhxfhekLt6DlVvXS0FWg5fn9Cx31C/aTl5bONhaVYA5Dclxt6Z40lGMbmsB5mKOsY rkVL6ov4Z6ry105U8pUkdl9HQ/LSbzQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1674827983; 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; bh=uH4obIW/dVeszc6jaA6sVUryo8ua08q1Owgfzp6nUtY=; b=zBwdBmW2UypwfdxD2SadA8S7J/I78o9kN9EbaqwWeWM01aynR+Ud45F4o+cNvgZq8VbecY 5j72mqKSkf+7HRBA== 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 62110138E3; Fri, 27 Jan 2023 13:59:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Yk4cF8/Y02OCNAAAMHmgww (envelope-from ); Fri, 27 Jan 2023 13:59:43 +0000 Message-ID: <44ab2b97-f77c-ae8b-c701-593839c99197@suse.cz> Date: Fri, 27 Jan 2023 14:59:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] driver: fix -gz=none error message with missing zstd To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Mark Wielaard 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, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" We wrongly report: $ echo "int main () {}" | gcc -xc -gz=none - gcc: error: -gz=zstd is not supported in this configuration if zstd compression is not supported by binutils. We should emit the error message only if -gz=zstd. PR driver/108572 Ready to be installed? Thanks, Martin gcc/ChangeLog: * gcc.cc (LINK_COMPRESS_DEBUG_SPEC): Report error only for -gz=zstd. --- gcc/gcc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gcc.cc b/gcc/gcc.cc index d8130024a8c..becc56051a8 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -842,7 +842,7 @@ proper position among the other output files. */ #define LINK_COMPRESS_DEBUG_SPEC \ " %{gz|gz=zlib:" LD_COMPRESS_DEBUG_OPTION "=zlib}" \ " %{gz=none:" LD_COMPRESS_DEBUG_OPTION "=none}" \ - " %{gz*:%e-gz=zstd is not supported in this configuration} " \ + " %{gz=zstd:%e-gz=zstd is not supported in this configuration} " \ " %{gz=zlib-gnu:}" /* Ignore silently zlib-gnu option value. */ #elif HAVE_LD_COMPRESS_DEBUG == 2 /* ELF gABI style and ZSTD. */