From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 699553858D33; Wed, 1 Feb 2023 13:13:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 699553858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675257200; bh=yLcsjbOb8a1FtarHYYgx2N20WCqkekD0hJcosZg2YDc=; h=From:To:Subject:Date:From; b=L3ebkYD9x+L8otiNiUA9xt2vbNdFaYVeF7e5kS73gtj3EqY4JJTlSsrDMblySFTUq JAHYn5TuwNgTR86ssnNtjw5C2p99LbyjyOx7KWaqu4BslAscejUUOYcfgCovFebgJ+ z9w84VBPZXAXtWdJzCjgYgz3s7XcwBg9wX7I/sOA= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5626] driver: fix -gz=none error message with missing zstd X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: e4473d7cf871c8ddf8f22d105c5af6375ebe37bf X-Git-Newrev: 1d77bfdf11fb9d7f9fcce7ed8817fc2877b3ded2 Message-Id: <20230201131320.699553858D33@sourceware.org> Date: Wed, 1 Feb 2023 13:13:20 +0000 (GMT) List-Id: https://gcc.gnu.org/g:1d77bfdf11fb9d7f9fcce7ed8817fc2877b3ded2 commit r13-5626-g1d77bfdf11fb9d7f9fcce7ed8817fc2877b3ded2 Author: Martin Liska Date: Fri Jan 27 14:56:31 2023 +0100 driver: fix -gz=none error message with missing zstd 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 gcc/ChangeLog: * gcc.cc (LINK_COMPRESS_DEBUG_SPEC): Report error only for -gz=zstd. Diff: --- 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. */