]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848)
authorChristian Heimes <christian@python.org>
Mon, 18 Jul 2022 06:47:03 +0000 (08:47 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Jul 2022 06:47:03 +0000 (08:47 +0200)
Misc/NEWS.d/next/Build/2022-07-14-11-13-26.gh-issue-94847.s3Kr5p.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2022-07-14-11-13-26.gh-issue-94847.s3Kr5p.rst b/Misc/NEWS.d/next/Build/2022-07-14-11-13-26.gh-issue-94847.s3Kr5p.rst
new file mode 100644 (file)
index 0000000..a6d1e72
--- /dev/null
@@ -0,0 +1,2 @@
+Fixed ``_decimal`` module build issue on GCC when compiling with LTO and
+pydebug. Debug builds no longer force inlining of functions.
index df6b193433e3e71157a5146bf0883aec479b39a3..d607c5e5d37a03fff531d4626722702c0e56feb0 100755 (executable)
--- a/configure
+++ b/configure
@@ -12522,6 +12522,12 @@ else
   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
 
 
index 1aa1c298ffe3a121e7c1d98737eb3b038fbc6213..c5924169e03a0b30927ec12581d40fe3e3c8033a 100644 (file)
@@ -3697,6 +3697,11 @@ AS_VAR_IF([with_system_libmpdec], [yes], [
   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])