]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Jul 2022 12:42:42 +0000 (05:42 -0700)
committerGitHub <noreply@github.com>
Mon, 18 Jul 2022 12:42:42 +0000 (14:42 +0200)
Co-authored-by: Christian Heimes <christian@python.org>
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 be8935937c8f441326af9569af8bbd1481b565ec..078bb5bef1350cb0854a50699b93dde894b7fb5e 100755 (executable)
--- 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
 
 
index 695576a46e87e6ae44cbf76a4564effefe3b0528..09f3f902a6b5852b67e81b5f1c124754f3e44845 100644 (file)
@@ -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])