Commit b30802b7 authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.4 (#21121)

parents a61d058b acb8c523
...@@ -71,12 +71,17 @@ OPT= @OPT@ ...@@ -71,12 +71,17 @@ OPT= @OPT@
BASECFLAGS= @BASECFLAGS@ BASECFLAGS= @BASECFLAGS@
BASECPPFLAGS= @BASECPPFLAGS@ BASECPPFLAGS= @BASECPPFLAGS@
CONFIGURE_CFLAGS= @CFLAGS@ CONFIGURE_CFLAGS= @CFLAGS@
# CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
# Use it when a compiler flag should _not_ be part of the distutils CFLAGS
# once Python is installed (Issue #21121).
CONFIGURE_CFLAGS_NODIST=@CFLAGS_NODIST@
CONFIGURE_CPPFLAGS= @CPPFLAGS@ CONFIGURE_CPPFLAGS= @CPPFLAGS@
CONFIGURE_LDFLAGS= @LDFLAGS@ CONFIGURE_LDFLAGS= @LDFLAGS@
# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
# command line to append to these values without stomping the pre-set # command line to append to these values without stomping the pre-set
# values. # values.
PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the # be able to build extension modules using the directories specified in the
# environment variables # environment variables
...@@ -91,7 +96,7 @@ ARFLAGS= @ARFLAGS@ ...@@ -91,7 +96,7 @@ ARFLAGS= @ARFLAGS@
# Extra C flags added for building the interpreter object files. # Extra C flags added for building the interpreter object files.
CFLAGSFORSHARED=@CFLAGSFORSHARED@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
# C flags used for building the interpreter object files # C flags used for building the interpreter object files
PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
# Machine-dependent subdirectories # Machine-dependent subdirectories
......
...@@ -121,6 +121,9 @@ Library ...@@ -121,6 +121,9 @@ Library
- Issue #5411: Added support for the "xztar" format in the shutil module. - Issue #5411: Added support for the "xztar" format in the shutil module.
- Issue #21121: Don't force 3rd party C extensions to be built with
-Werror=declaration-after-statement.
- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular - Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method. __new__() method.
......
...@@ -662,6 +662,7 @@ SHLIB_SUFFIX ...@@ -662,6 +662,7 @@ SHLIB_SUFFIX
LIBTOOL_CRUFT LIBTOOL_CRUFT
OTHER_LIBTOOL_OPT OTHER_LIBTOOL_OPT
UNIVERSAL_ARCH_FLAGS UNIVERSAL_ARCH_FLAGS
CFLAGS_NODIST
BASECFLAGS BASECFLAGS
OPT OPT
ABIFLAGS ABIFLAGS
...@@ -6347,6 +6348,7 @@ fi ...@@ -6347,6 +6348,7 @@ fi
# The -arch flags for universal builds on OSX # The -arch flags for universal builds on OSX
UNIVERSAL_ARCH_FLAGS= UNIVERSAL_ARCH_FLAGS=
...@@ -6507,7 +6509,7 @@ $as_echo "$ac_cv_declaration_after_statement_warning" >&6; } ...@@ -6507,7 +6509,7 @@ $as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
if test $ac_cv_declaration_after_statement_warning = yes if test $ac_cv_declaration_after_statement_warning = yes
then then
BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement" CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
......
...@@ -1147,6 +1147,7 @@ then ...@@ -1147,6 +1147,7 @@ then
fi fi
AC_SUBST(BASECFLAGS) AC_SUBST(BASECFLAGS)
AC_SUBST(CFLAGS_NODIST)
# The -arch flags for universal builds on OSX # The -arch flags for universal builds on OSX
UNIVERSAL_ARCH_FLAGS= UNIVERSAL_ARCH_FLAGS=
...@@ -1231,7 +1232,7 @@ yes) ...@@ -1231,7 +1232,7 @@ yes)
if test $ac_cv_declaration_after_statement_warning = yes if test $ac_cv_declaration_after_statement_warning = yes
then then
BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement" CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi fi
AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning) AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning)
......
...@@ -19,6 +19,12 @@ from distutils.spawn import find_executable ...@@ -19,6 +19,12 @@ from distutils.spawn import find_executable
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
# Add special CFLAGS reserved for building the interpreter and the stdlib
# modules (Issue #21121).
cflags = sysconfig.get_config_var('CFLAGS')
py_cflags_nodist = sysconfig.get_config_var('PY_CFLAGS_NODIST')
sysconfig.get_config_vars()['CFLAGS'] = cflags + ' ' + py_cflags_nodist
def get_platform(): def get_platform():
# cross build # cross build
if "_PYTHON_HOST_PLATFORM" in os.environ: if "_PYTHON_HOST_PLATFORM" in os.environ:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment