[Python-checkins] [3.11] gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848) (GH-94951)

tiran webhook-mailer at python.org
Mon Jul 18 08:42:54 EDT 2022


https://github.com/python/cpython/commit/4607e884e50227c3e7d784dd3a0b6809b4fb5fbf
commit: 4607e884e50227c3e7d784dd3a0b6809b4fb5fbf
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: tiran <christian at python.org>
date: 2022-07-18T14:42:42+02:00
summary:

[3.11] gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848) (GH-94951)

Co-authored-by: Christian Heimes <christian at python.org>

files:
A Misc/NEWS.d/next/Build/2022-07-14-11-13-26.gh-issue-94847.s3Kr5p.rst
M configure
M 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
index 0000000000000..a6d1e7277da4c
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-07-14-11-13-26.gh-issue-94847.s3Kr5p.rst
@@ -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.
diff --git a/configure b/configure
index be8935937c8f4..078bb5bef1350 100755
--- a/configure
+++ b/configure
@@ -11990,6 +11990,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
 
 
diff --git a/configure.ac b/configure.ac
index 695576a46e87e..09f3f902a6b58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3628,6 +3628,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])



More information about the Python-checkins mailing list