summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-11-18 04:58:55 (GMT)
committerSteven Knight <knight@baldmt.com>2005-11-18 04:58:55 (GMT)
commit3f61bbb849eeb07e5683d11c3769b25f64c350fe (patch)
treebdd5dd1e1f69ae8334101ce1255fe615d394869c /src
parent62e2f021af43f2bd0422fabdd0b6129ae3695946 (diff)
downloadSCons-3f61bbb849eeb07e5683d11c3769b25f64c350fe.zip
SCons-3f61bbb849eeb07e5683d11c3769b25f64c350fe.tar.gz
SCons-3f61bbb849eeb07e5683d11c3769b25f64c350fe.tar.bz2
Fix C/C++ compiler choosing on AIX. (Bob Halley)
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt5
-rw-r--r--src/engine/SCons/Platform/aix.py7
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()