From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 16AE738582BE; Fri, 27 Jan 2023 13:57:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16AE738582BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674827875; bh=YfRGaQnACBpwqO2RZ2AaQuQ3zYzuDgra9fnfQdG0dOs=; h=From:To:Subject:Date:From; b=v1zG4xVhe+Vqp6BMjal7wobw3/9dNIaxxbi8LCXfhHk+MTQ/Bn3qOdWVLwJV+ueCb zYj3bYzsjZUJ7WspMsKwRpuzd6JtRfT/uR3PRcBbrcwAvUNEzQxT29Jm0hnsIRzdFH f0aN1Yhr4kfBSDkEGFu9Y+uHag7S5L3nLsCU81UM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/PR108572-fix-gz=none)] driver: fix -gz=none error message with missing zstd X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/PR108572-fix-gz=none X-Git-Oldrev: 89483d952aca74c2e053ab9bee18f3d25695e2c9 X-Git-Newrev: 9519b035262f538ef81413ed2aea6dc004e4f4fb Message-Id: <20230127135755.16AE738582BE@sourceware.org> Date: Fri, 27 Jan 2023 13:57:55 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9519b035262f538ef81413ed2aea6dc004e4f4fb commit 9519b035262f538ef81413ed2aea6dc004e4f4fb 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. */