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.

This commit is contained in:
Daniel Pouzzner
2025-01-08 15:59:11 -06:00
parent 5f95fe3730
commit ad5018ee5d

View File

@ -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)