summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2012-08-22 23:34:50 -0700
committerNed Deily <nad@acm.org>2012-08-22 23:34:50 -0700
commitbbd3437c27873dfe8b056a1a6ea698cf03d60853 (patch)
tree24f2d0cc740cb3f0e55ab108b7d1eef4944ca59e /Mac
parent6fc81d7eec3d3ee412fcfd4b0719e825c9b94f4a (diff)
downloadcpython-git-bbd3437c27873dfe8b056a1a6ea698cf03d60853.tar.gz
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)
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/BuildScript/build-installer.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index ca4c948934..11c881cd9d 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -149,15 +149,15 @@ SRCDIR = os.path.dirname(
DEPTARGET = '10.3'
target_cc_map = {
- '10.3': 'gcc-4.0',
- '10.4': 'gcc-4.0',
- '10.5': 'gcc-4.2',
- '10.6': 'gcc-4.2',
- '10.7': 'clang',
- '10.8': 'clang',
+ '10.3': ('gcc-4.0', 'g++-4.0'),
+ '10.4': ('gcc-4.0', 'g++-4.0'),
+ '10.5': ('gcc-4.2', 'g++-4.2'),
+ '10.6': ('gcc-4.2', 'g++-4.2'),
+ '10.7': ('clang', 'clang++'),
+ '10.8': ('clang', 'clang++'),
}
-CC = target_cc_map[DEPTARGET]
+CC, CXX = target_cc_map[DEPTARGET]
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",
checksum='00b516f4704d4a7cb50a1d97e6e8e15b',
configure=None,
- install='make install CC=%s PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
- CC,
+ install='make install CC=%s CXX=%s, PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
+ CC, CXX,
shellQuote(os.path.join(WORKDIR, 'libraries')),
' -arch '.join(ARCHLIST),
SDKPATH,
@@ -276,8 +276,8 @@ def library_recipes():
url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz",
checksum='debc62758716a169df9f62e6ab2bc634',
configure=None,
- install='make install CC=%s prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
- CC,
+ install='make install CC=%s CXX=%s, prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
+ CC, CXX,
shellQuote(os.path.join(WORKDIR, 'libraries')),
' -arch '.join(ARCHLIST),
SDKPATH,
@@ -550,7 +550,7 @@ def parseOptions(args=None):
Parse arguments and update global settings.
"""
global WORKDIR, DEPSRC, SDKPATH, SRCDIR, DEPTARGET
- global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC
+ global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC, CXX
if args is None:
args = sys.argv[1:]
@@ -608,7 +608,7 @@ def parseOptions(args=None):
SDKPATH=os.path.abspath(SDKPATH)
DEPSRC=os.path.abspath(DEPSRC)
- CC=target_cc_map[DEPTARGET]
+ CC, CXX=target_cc_map[DEPTARGET]
print("Settings:")
print(" * Source directory:", SRCDIR)
@@ -618,6 +618,7 @@ def parseOptions(args=None):
print(" * Deployment target:", DEPTARGET)
print(" * Universal architectures:", ARCHLIST)
print(" * C compiler:", CC)
+ print(" * C++ compiler:", CXX)
print("")
@@ -1288,6 +1289,7 @@ def main():
os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
os.environ['CC'] = CC
+ os.environ['CXX'] = CXX
if os.path.exists(WORKDIR):
shutil.rmtree(WORKDIR)