1- diff -r d9893d13c628 Lib/_osx_support.py
2- --- a/Lib/_osx_support.py Sat Apr 06 09:40:02 2013 +0200
3- +++ b/Lib/_osx_support.py Sat Apr 27 16:51:50 2013 -0700
4- @@ -14,7 +14,7 @@
5- # configuration variables that may contain universal build flags,
6- # like "-arch" or "-isdkroot", that may need customization for
7- # the user environment
8- - _UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
9- + _UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
10- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
11- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
12- 'PY_CORE_CFLAGS')
13- diff -r d9893d13c628 Lib/distutils/cygwinccompiler.py
14- --- a/Lib/distutils/cygwinccompiler.py Sat Apr 06 09:40:02 2013 +0200
15- +++ b/Lib/distutils/cygwinccompiler.py Sat Apr 27 16:51:50 2013 -0700
16- @@ -139,9 +139,13 @@
17- self.set_executables(compiler='gcc -mcygwin -O -Wall',
18- compiler_so='gcc -mcygwin -mdll -O -Wall',
19- compiler_cxx='g++ -mcygwin -O -Wall',
20- + compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
21- linker_exe='gcc -mcygwin',
22- linker_so=('%s -mcygwin %s' %
23- - (self.linker_dll, shared_option)))
24- + (self.linker_dll, shared_option)),
25- + linker_exe_cxx='g++ -mcygwin',
26- + linker_so_cxx=('%s -mcygwin %s' %
27- + (self.linker_dll, shared_option)))
28-
29- # cygwin and mingw32 need different sets of libraries
30- if self.gcc_version == "2.91.57":
31- @@ -165,8 +169,12 @@
32- raise CompileError(msg)
33- else: # for other files use the C-compiler
34- try:
35- - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
36- - extra_postargs)
37- + if self.detect_language(src) == 'c++':
38- + self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
39- + extra_postargs)
40- + else:
41- + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
42- + extra_postargs)
43- except DistutilsExecError as msg:
44- raise CompileError(msg)
45-
46- @@ -297,10 +305,15 @@
47- self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
48- compiler_so='gcc -mno-cygwin -mdll -O -Wall',
49- compiler_cxx='g++ -mno-cygwin -O -Wall',
50- + compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
51- linker_exe='gcc -mno-cygwin',
52- linker_so='%s -mno-cygwin %s %s'
53- % (self.linker_dll, shared_option,
54- - entry_point))
55- + entry_point),
56- + linker_exe_cxx='g++ -mno-cygwin',
57- + linker_so_cxx='%s -mno-cygwin %s %s'
58- + % (self.linker_dll, shared_option,
59- + entry_point))
60- # Maybe we should also append -mthreads, but then the finished
61- # dlls need another dll (mingwm10.dll see Mingw32 docs)
62- # (-mthreads: Support thread-safe exception handling on `Mingw32')
63- diff -r d9893d13c628 Lib/distutils/emxccompiler.py
64- --- a/Lib/distutils/emxccompiler.py Sat Apr 06 09:40:02 2013 +0200
65- +++ b/Lib/distutils/emxccompiler.py Sat Apr 27 16:51:50 2013 -0700
66- @@ -63,8 +63,12 @@
67- # XXX optimization, warnings etc. should be customizable.
68- self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
69- compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
70- + compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
71- + compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
72- linker_exe='gcc -Zomf -Zmt -Zcrtdll',
73- - linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
74- + linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
75- + linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
76- + linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
77-
78- # want the gcc library statically linked (so that we don't have
79- # to distribute a version dependent on the compiler we have)
80- @@ -81,8 +85,12 @@
81- raise CompileError(msg)
82- else: # for other files use the C-compiler
83- try:
84- - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
85- - extra_postargs)
86- + if self.detect_language(src) == 'c++':
87- + self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
88- + extra_postargs)
89- + else:
90- + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
91- + extra_postargs)
92- except DistutilsExecError as msg:
93- raise CompileError(msg)
94-
95- diff -r d9893d13c628 Lib/distutils/sysconfig.py
96- --- a/Lib/distutils/sysconfig.py Sat Apr 06 09:40:02 2013 +0200
97- +++ b/Lib/distutils/sysconfig.py Sat Apr 27 16:51:50 2013 -0700
98- @@ -191,10 +191,12 @@
1+ http://bugs.python.org/issue1222585
2+
3+ --- Lib/distutils/sysconfig.py
4+ +++ Lib/distutils/sysconfig.py
5+ @@ -191,9 +191,12 @@
996 _osx_support.customize_compiler(_config_vars)
1007 _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
1018
1029- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
10310- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
10411- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
105- + (cc, cxx, opt, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
106- + get_config_vars('CC', 'CXX', 'OPT ', 'CFLAGS ', 'CCSHARED', 'LDSHARED ',
107- + 'LDCXXSHARED', 'SO ', 'AR', 'ARFLAGS')
108-
12+ + (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
13+ + get_config_vars('CC', 'CXX', 'CCSHARED ', 'LDSHARED ', 'LDCXXSHARED ',
14+ + 'SHLIB_SUFFIX ', 'AR', 'ARFLAGS')
15+ +
10916+ cflags = ''
11017+ cxxflags = ''
111- newcc = None
18+
11219 if 'CC' in os.environ:
113- cc = os.environ['CC']
114- @@ -202 ,19 +204 ,27 @@
20+ newcc = os.environ['CC']
21+ @@ -208 ,19 +211 ,27 @@
11522 cxx = os.environ['CXX']
11623 if 'LDSHARED' in os.environ:
11724 ldshared = os.environ['LDSHARED']
@@ -140,7 +47,7 @@ diff -r d9893d13c628 Lib/distutils/sysconfig.py
14047 if 'AR' in os.environ:
14148 ar = os.environ['AR']
14249 if 'ARFLAGS' in os.environ:
143- @@ -223 ,13 +233 ,17 @@
50+ @@ -229 ,13 +240 ,17 @@
14451 archiver = ar + ' ' + ar_flags
14552
14653 cc_cmd = cc + ' ' + cflags
@@ -159,9 +66,8 @@ diff -r d9893d13c628 Lib/distutils/sysconfig.py
15966 archiver=archiver)
16067
16168 compiler.shared_lib_extension = shlib_suffix
162- diff -r d9893d13c628 Lib/distutils/unixccompiler.py
163- --- a/Lib/distutils/unixccompiler.py Sat Apr 06 09:40:02 2013 +0200
164- +++ b/Lib/distutils/unixccompiler.py Sat Apr 27 16:51:50 2013 -0700
69+ --- Lib/distutils/unixccompiler.py
70+ +++ Lib/distutils/unixccompiler.py
16571@@ -52,14 +52,17 @@
16672 # are pretty generic; they will probably have to be set by an outsider
16773 # (eg. using information discovered by the sysconfig about building
@@ -242,15 +148,14 @@ diff -r d9893d13c628 Lib/distutils/unixccompiler.py
242148
243149 if sys.platform == 'darwin':
244150 linker = _osx_support.compiler_fixup(linker, ld_args)
245- diff -r d9893d13c628 Makefile.pre.in
246- --- a/Makefile.pre.in Sat Apr 06 09:40:02 2013 +0200
247- +++ b/Makefile.pre.in Sat Apr 27 16:51:50 2013 -0700
248- @@ -492,7 +492,7 @@
151+ --- Makefile.pre.in
152+ +++ Makefile.pre.in
153+ @@ -496,7 +496,7 @@
249154 *\ -s*|s*) quiet="-q";; \
250155 *) quiet="";; \
251156 esac; \
252157- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
253158+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
159+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
254160 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
255161
256- # Build static library
0 commit comments