debugedit/0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch
Mark Wielaard e06e7b2e92 5.0-7 Add find-debuginfo dwz -j and -q, --quiet support
- Refresh 0001-tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch
- Add new upstream patches:
  0001-use-READELF-not-readelf.patch
  0001-find-debuginfo-Pass-j-down-to-dwz.patch
  0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch
  0003-configure.ac-Use-AC_LANG_PROGRAM-for-AC_LINK_IFELSE-.patch
  0004-scripts-find-debuginfo.in-Add-q-quiet.patch
2023-01-27 18:05:22 +01:00

34 lines
1.1 KiB
Diff

From 73652fa06c449f55b844890778c4cb592e0df62e Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Fri, 27 Jan 2023 15:23:15 +0100
Subject: [PATCH 2/4] configure.ac: Use AC_LINK_IFELSE for -gz=none check
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