mirror of
https://github.com/python/cpython.git
synced 2025-10-05 22:51:56 +00:00
Issue #14292: Ensure that the OS X installer build configures the CXX
environment variable to a value comparable to what it sets for CC for the benefit of C++ extension modules. (Patch by Ronald Oussoren)
This commit is contained in:
parent
6fc81d7eec
commit
bbd3437c27
1 changed files with 15 additions and 13 deletions
|
@ -149,15 +149,15 @@ SRCDIR = os.path.dirname(
|
||||||
DEPTARGET = '10.3'
|
DEPTARGET = '10.3'
|
||||||
|
|
||||||
target_cc_map = {
|
target_cc_map = {
|
||||||
'10.3': 'gcc-4.0',
|
'10.3': ('gcc-4.0', 'g++-4.0'),
|
||||||
'10.4': 'gcc-4.0',
|
'10.4': ('gcc-4.0', 'g++-4.0'),
|
||||||
'10.5': 'gcc-4.2',
|
'10.5': ('gcc-4.2', 'g++-4.2'),
|
||||||
'10.6': 'gcc-4.2',
|
'10.6': ('gcc-4.2', 'g++-4.2'),
|
||||||
'10.7': 'clang',
|
'10.7': ('clang', 'clang++'),
|
||||||
'10.8': 'clang',
|
'10.8': ('clang', 'clang++'),
|
||||||
}
|
}
|
||||||
|
|
||||||
CC = target_cc_map[DEPTARGET]
|
CC, CXX = target_cc_map[DEPTARGET]
|
||||||
|
|
||||||
PYTHON_3 = getVersionTuple() >= (3, 0)
|
PYTHON_3 = getVersionTuple() >= (3, 0)
|
||||||
|
|
||||||
|
@ -264,8 +264,8 @@ def library_recipes():
|
||||||
url="http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz",
|
url="http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz",
|
||||||
checksum='00b516f4704d4a7cb50a1d97e6e8e15b',
|
checksum='00b516f4704d4a7cb50a1d97e6e8e15b',
|
||||||
configure=None,
|
configure=None,
|
||||||
install='make install CC=%s PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
|
install='make install CC=%s CXX=%s, PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
|
||||||
CC,
|
CC, CXX,
|
||||||
shellQuote(os.path.join(WORKDIR, 'libraries')),
|
shellQuote(os.path.join(WORKDIR, 'libraries')),
|
||||||
' -arch '.join(ARCHLIST),
|
' -arch '.join(ARCHLIST),
|
||||||
SDKPATH,
|
SDKPATH,
|
||||||
|
@ -276,8 +276,8 @@ def library_recipes():
|
||||||
url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz",
|
url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz",
|
||||||
checksum='debc62758716a169df9f62e6ab2bc634',
|
checksum='debc62758716a169df9f62e6ab2bc634',
|
||||||
configure=None,
|
configure=None,
|
||||||
install='make install CC=%s prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
|
install='make install CC=%s CXX=%s, prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
|
||||||
CC,
|
CC, CXX,
|
||||||
shellQuote(os.path.join(WORKDIR, 'libraries')),
|
shellQuote(os.path.join(WORKDIR, 'libraries')),
|
||||||
' -arch '.join(ARCHLIST),
|
' -arch '.join(ARCHLIST),
|
||||||
SDKPATH,
|
SDKPATH,
|
||||||
|
@ -550,7 +550,7 @@ def parseOptions(args=None):
|
||||||
Parse arguments and update global settings.
|
Parse arguments and update global settings.
|
||||||
"""
|
"""
|
||||||
global WORKDIR, DEPSRC, SDKPATH, SRCDIR, DEPTARGET
|
global WORKDIR, DEPSRC, SDKPATH, SRCDIR, DEPTARGET
|
||||||
global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC
|
global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC, CXX
|
||||||
|
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
@ -608,7 +608,7 @@ def parseOptions(args=None):
|
||||||
SDKPATH=os.path.abspath(SDKPATH)
|
SDKPATH=os.path.abspath(SDKPATH)
|
||||||
DEPSRC=os.path.abspath(DEPSRC)
|
DEPSRC=os.path.abspath(DEPSRC)
|
||||||
|
|
||||||
CC=target_cc_map[DEPTARGET]
|
CC, CXX=target_cc_map[DEPTARGET]
|
||||||
|
|
||||||
print("Settings:")
|
print("Settings:")
|
||||||
print(" * Source directory:", SRCDIR)
|
print(" * Source directory:", SRCDIR)
|
||||||
|
@ -618,6 +618,7 @@ def parseOptions(args=None):
|
||||||
print(" * Deployment target:", DEPTARGET)
|
print(" * Deployment target:", DEPTARGET)
|
||||||
print(" * Universal architectures:", ARCHLIST)
|
print(" * Universal architectures:", ARCHLIST)
|
||||||
print(" * C compiler:", CC)
|
print(" * C compiler:", CC)
|
||||||
|
print(" * C++ compiler:", CXX)
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
|
@ -1288,6 +1289,7 @@ def main():
|
||||||
|
|
||||||
os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
|
os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
|
||||||
os.environ['CC'] = CC
|
os.environ['CC'] = CC
|
||||||
|
os.environ['CXX'] = CXX
|
||||||
|
|
||||||
if os.path.exists(WORKDIR):
|
if os.path.exists(WORKDIR):
|
||||||
shutil.rmtree(WORKDIR)
|
shutil.rmtree(WORKDIR)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue