configure.ac: Use AC_LINK_IFELSE for -gz=none check
authorMark Wielaard <mark@klomp.org>
Fri, 27 Jan 2023 14:23:15 +0000 (15:23 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 27 Jan 2023 14:23:20 +0000 (15:23 +0100)
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

index f2d15716f57d4518ce1dcc5212841a8245bf1b0f..1d77e993eac24927a0362d86299703eeeceb8f99 100644 (file)
@@ -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
This page took 0.036967 seconds and 5 git commands to generate.