public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: debugedit@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] configure.ac: Use AC_LINK_IFELSE for -gz=none check
Date: Fri, 27 Jan 2023 15:26:26 +0100	[thread overview]
Message-ID: <20230127142626.14725-1-mark@klomp.org> (raw)

Because of a bug in gcc 13.0 (pre-release) -gz=none does not work
correctly when linking the final binary in some situations (when
-gz=zstd isn't supported). Work around this by explicitly checking for
support with AC_LINK_IFELSE.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108572

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f2d1571..1d77e99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,7 +125,7 @@ AC_SUBST([DWARF_5_DEBUGLINE])
 AC_CACHE_CHECK([whether gcc supports -gz=none], ac_cv_gz_none, [dnl
 save_CFLAGS="$CFLAGS"
 CFLAGS="-gz=none"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE()], ac_cv_gz_none=yes, ac_cv_gz_none=no)
+AC_LINK_IFELSE([AC_LANG_SOURCE()], ac_cv_gz_none=yes, ac_cv_gz_none=no)
 CFLAGS="$save_CFLAGS"
 ])
 if test "$ac_cv_gz_none" = "yes"; then
-- 
2.39.1


                 reply	other threads:[~2023-01-27 14:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230127142626.14725-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=debugedit@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).