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)
commit1d77bfdf11fb9d7f9fcce7ed8817fc2877b3ded2
treef1da2f660ed7efa93bf5eebe75e4cf40241d979b
parente4473d7cf871c8ddf8f22d105c5af6375ebe37bf
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.
gcc/gcc.cc