Co-authored-by: Christian Heimes <christian@python.org>
--- /dev/null
+Fixed ``_decimal`` module build issue on GCC when compiling with LTO and
+pydebug. Debug builds no longer force inlining of functions.
LIBMPDEC_LDFLAGS="-lm \$(LIBMPDEC_A)"
LIBMPDEC_INTERNAL="\$(LIBMPDEC_A)"
+ if test "x$with_pydebug" = xyes; then :
+
+ as_fn_append LIBMPDEC_CFLAGS " -DTEST_COVERAGE"
+
+fi
+
fi
LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
LIBMPDEC_LDFLAGS="-lm \$(LIBMPDEC_A)"
LIBMPDEC_INTERNAL="\$(LIBMPDEC_A)"
+
+ dnl Disable forced inlining in debug builds, see GH-94847
+ AS_VAR_IF([with_pydebug], [yes], [
+ AS_VAR_APPEND([LIBMPDEC_CFLAGS], [" -DTEST_COVERAGE"])
+ ])
])
AC_SUBST([LIBMPDEC_CFLAGS])