From ad5018ee5dfa72dde88f62705651608d3559c75b Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 8 Jan 2025 15:59:11 -0600 Subject: [PATCH] configure.ac: fix --enable-debug-trace-errcodes=backtrace with --enable-reproducible-build: don't add -g0 to CFLAGS when both are enabled, because -g0 makes backtracing impossible. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cbb9a339f3..96ac76bd4f 100644 --- a/configure.ac +++ b/configure.ac @@ -573,7 +573,10 @@ then AS_CASE([$xxx_ar_flags],[*'use zero for timestamps and uids/gids'*],[AR_FLAGS="Dcr" lt_ar_flags="Dcr"]) AS_CASE([$xxx_ranlib_flags],[*'Use zero for symbol map timestamp'*],[RANLIB="${RANLIB} -D"]) - AM_CFLAGS="$AM_CFLAGS -DHAVE_REPRODUCIBLE_BUILD -g0" + if test "$ENABLED_DEBUG_TRACE_ERRCODES" != "backtrace" + then + AM_CFLAGS="$AM_CFLAGS -DHAVE_REPRODUCIBLE_BUILD -g0" + fi # opportunistically use -ffile-prefix-map (added in GCC8 and LLVM10)