diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2014-05-15 09:07:44 (GMT) |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2014-05-15 09:07:44 (GMT) |
commit | 7f96f0f6c890a58a1a58c76b0e636024dec2628f (patch) | |
tree | f555b2cdfea0063ddcf2292a4d074e874223477c /src/engine/SCons/Tool | |
parent | 5036e8048daeb6aaa3e46065d04f80e49bce3ec1 (diff) | |
download | SCons-7f96f0f6c890a58a1a58c76b0e636024dec2628f.zip SCons-7f96f0f6c890a58a1a58c76b0e636024dec2628f.tar.gz SCons-7f96f0f6c890a58a1a58c76b0e636024dec2628f.tar.bz2 |
The _r in AIX xlc_r means reentrant, not relocatable.
It does not make any sense to use 'xlc' for CC and 'xlc_r' for SHCC, as the
'_r' does stand for 'reentrant' rather than 'relocatable' or similar.
Avoid 'egrep' to parse the lslpp output, it's easy enough within python.
Needs output streams of _subproc.dummyPopen to be iterable.
Diffstat (limited to 'src/engine/SCons/Tool')
-rw-r--r-- | src/engine/SCons/Tool/aixc++.py | 19 | ||||
-rw-r--r-- | src/engine/SCons/Tool/aixcc.py | 18 |
2 files changed, 18 insertions, 19 deletions
diff --git a/src/engine/SCons/Tool/aixc++.py b/src/engine/SCons/Tool/aixc++.py index 5aa1eeec..c86d530 100644 --- a/src/engine/SCons/Tool/aixc++.py +++ b/src/engine/SCons/Tool/aixc++.py @@ -43,8 +43,7 @@ packages = ['vacpp.cmp.core', 'vacpp.cmp.batch', 'vacpp.cmp.C', 'ibmcxx.cmp'] def get_xlc(env): xlc = env.get('CXX', 'xlC') - xlc_r = env.get('SHCXX', 'xlC_r') - return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages) + return SCons.Platform.aix.get_xlc(env, xlc, packages) def smart_cxxflags(source, target, env, for_signature): build_dir = env.GetBuildPath() @@ -55,20 +54,20 @@ def smart_cxxflags(source, target, env, for_signature): def generate(env): """Add Builders and construction variables for xlC / Visual Age suite to an Environment.""" - path, _cxx, _shcxx, version = get_xlc(env) - if path: + path, _cxx, version = get_xlc(env) + if path and _cxx: _cxx = os.path.join(path, _cxx) - _shcxx = os.path.join(path, _shcxx) + + if 'CXX' not in env: + env['CXX'] = _cxx cplusplus.generate(env) - env['CXX'] = _cxx - env['SHCXX'] = _shcxx - env['CXXVERSION'] = version - env['SHOBJSUFFIX'] = '.pic.o' + if version: + env['CXXVERSION'] = version def exists(env): - path, _cxx, _shcxx, version = get_xlc(env) + path, _cxx, version = get_xlc(env) if path and _cxx: xlc = os.path.join(path, _cxx) if os.path.exists(xlc): diff --git a/src/engine/SCons/Tool/aixcc.py b/src/engine/SCons/Tool/aixcc.py index 9668f79..a89a97e 100644 --- a/src/engine/SCons/Tool/aixcc.py +++ b/src/engine/SCons/Tool/aixcc.py @@ -42,25 +42,25 @@ packages = ['vac.C', 'ibmcxx.cmp'] def get_xlc(env): xlc = env.get('CC', 'xlc') - xlc_r = env.get('SHCC', 'xlc_r') - return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages) + return SCons.Platform.aix.get_xlc(env, xlc, packages) def generate(env): """Add Builders and construction variables for xlc / Visual Age suite to an Environment.""" - path, _cc, _shcc, version = get_xlc(env) - if path: + path, _cc, version = get_xlc(env) + if path and _cc: _cc = os.path.join(path, _cc) - _shcc = os.path.join(path, _shcc) + + if 'CC' not in env: + env['CC'] = _cc cc.generate(env) - env['CC'] = _cc - env['SHCC'] = _shcc - env['CCVERSION'] = version + if version: + env['CCVERSION'] = version def exists(env): - path, _cc, _shcc, version = get_xlc(env) + path, _cc, version = get_xlc(env) if path and _cc: xlc = os.path.join(path, _cc) if os.path.exists(xlc): |