public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] driver: fix -gz=none error message with missing zstd
@ 2023-01-27 13:59 Martin Liška
  2023-01-27 21:01 ` Joseph Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2023-01-27 13:59 UTC (permalink / raw)
  To: gcc-patches; +Cc: Mark Wielaard

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.  */
-- 
2.39.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] driver: fix -gz=none error message with missing zstd
  2023-01-27 13:59 [PATCH] driver: fix -gz=none error message with missing zstd Martin Liška
@ 2023-01-27 21:01 ` Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2023-01-27 21:01 UTC (permalink / raw)
  To: Martin Liška; +Cc: gcc-patches, Mark Wielaard

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

On Fri, 27 Jan 2023, Martin Liška wrote:

> 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.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-27 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 13:59 [PATCH] driver: fix -gz=none error message with missing zstd Martin Liška
2023-01-27 21:01 ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).