From: stevenknight Date: Fri, 18 Nov 2005 04:58:55 +0000 (+0000) Subject: Fix C/C++ compiler choosing on AIX. (Bob Halley) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f22aadd3389220d453a5c6042179ed5371cbd638;p=scons.git Fix C/C++ compiler choosing on AIX. (Bob Halley) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1391 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index d75008ab..d087d741 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 cc114666..3f77e3b3 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()