From 0198f52ea2328fd932622ad2299381f617a041f2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 20 Dec 2018 16:03:01 +0100 Subject: bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264) When compiling 3rd party C extensions, the linker flags used by the compiler for the interpreter and the stdlib modules, will get leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS and PY_LDFLAGS_NODIST are introduced to keep those flags separated. (cherry picked from commit cf10a750f4b50b6775719cfb17bee00bc3a9c60b) --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c35aea98e5..a7de901e08 100644 --- a/configure.ac +++ b/configure.ac @@ -1395,7 +1395,7 @@ if test "$Py_LTO" = 'true' ; then fi CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS" - LDFLAGS="$LDFLAGS $LTOFLAGS" + LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS" fi # Enable PGO flags. @@ -1555,6 +1555,7 @@ fi AC_SUBST(BASECFLAGS) AC_SUBST(CFLAGS_NODIST) +AC_SUBST(LDFLAGS_NODIST) # The -arch flags for universal builds on OSX UNIVERSAL_ARCH_FLAGS= -- cgit v1.2.1