From 3f61bbb849eeb07e5683d11c3769b25f64c350fe Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Fri, 18 Nov 2005 04:58:55 +0000 Subject: Fix C/C++ compiler choosing on AIX. (Bob Halley) --- src/CHANGES.txt | 5 +++++ src/engine/SCons/Platform/aix.py | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index d75008a..d087d74 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -99,6 +99,11 @@ RELEASE 0.97 - XXX - Remove unneceesary (and incorrect) SCons.Util strings on some function calls in SCons.Util. + From Bob Halley: + + - Fix C/C++ compiler selection on AIX to not always use the external $CC + environment variable. + From August Hörandl: - Add a scanner for \include and \import files, with support for diff --git a/src/engine/SCons/Platform/aix.py b/src/engine/SCons/Platform/aix.py index cc11466..3f77e3b 100644 --- a/src/engine/SCons/Platform/aix.py +++ b/src/engine/SCons/Platform/aix.py @@ -37,13 +37,16 @@ import string import posix -def get_xlc(env, xlc, xlc_r, packages): +def get_xlc(env, xlc=None, xlc_r=None, packages=[]): # Use the AIX package installer tool lslpp to figure out where a # given xl* compiler is installed and what version it is. xlcPath = None xlcVersion = None - xlc = env.get('CC', 'xlc') + if xlc is None: + xlc = env.get('CC', 'xlc') + if xlc_r is None: + xlc_r = xlc + '_r' for package in packages: cmd = "lslpp -fc " + package + " 2>/dev/null | egrep '" + xlc + "([^-_a-zA-Z0-9].*)?$'" line = os.popen(cmd).readline() -- cgit v0.12