]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
driver: fix -gz=none error message with missing zstd
authorMartin Liska <mliska@suse.cz>
Fri, 27 Jan 2023 13:56:31 +0000 (14:56 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 1 Feb 2023 13:13:03 +0000 (14:13 +0100)
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.

gcc/gcc.cc

index d8130024a8c41e56cb8783da2fa864290f6a7984..becc56051a88d37e3e7eaa6ec208402861b0b9c6 100644 (file)
@@ -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.  */