python: restore previous distutils.sysconfig CFLAGS handling
CFLAGS retrieved via get_config_vars() had been overwritten in Lib/distutils/sysconfig.py’s function customize_compiler() when the CFLAGS environment variable had been set. With 2.7.17 the flags are appended which leads to using host CFLAGS when cross compiling. The patch restores the old behaviour.
This commit is contained in:
parent
0bed9a8932
commit
1a9e85068b
2 changed files with 23 additions and 1 deletions
22
srcpkgs/python/patches/sysconfig.patch
Normal file
22
srcpkgs/python/patches/sysconfig.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- Lib/distutils/sysconfig.py 2019-10-19 20:38:44.000000000 +0200
|
||||
+++ Lib/distutils/sysconfig.py 2019-03-02 19:17:42.000000000 +0100
|
||||
@@ -181,8 +171,8 @@
|
||||
_osx_support.customize_compiler(_config_vars)
|
||||
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
|
||||
|
||||
- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
|
||||
- get_config_vars('CC', 'CXX', 'CFLAGS',
|
||||
+ (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
|
||||
+ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
|
||||
'CCSHARED', 'LDSHARED', 'SO', 'AR',
|
||||
'ARFLAGS')
|
||||
|
||||
@@ -206,7 +196,7 @@
|
||||
if 'LDFLAGS' in os.environ:
|
||||
ldshared = ldshared + ' ' + os.environ['LDFLAGS']
|
||||
if 'CFLAGS' in os.environ:
|
||||
- cflags = cflags + ' ' + os.environ['CFLAGS']
|
||||
+ cflags = opt + ' ' + os.environ['CFLAGS']
|
||||
ldshared = ldshared + ' ' + os.environ['CFLAGS']
|
||||
if 'CPPFLAGS' in os.environ:
|
||||
cpp = cpp + ' ' + os.environ['CPPFLAGS']
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
pkgname=python
|
||||
version=2.7.17
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="Python-${version}"
|
||||
pycompile_dirs="usr/lib/python2.7"
|
||||
hostmakedepends="pkg-config"
|
||||
|
|
Loading…
Reference in a new issue