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)
commit499a2f21504c0727cf3c3dffd4be6c847ff2ec43 (patch)
treebdd5dd1e1f69ae8334101ce1255fe615d394869c /src
parentaae551ea6f1e3820039f5171d643074f4758cb88 (diff)
downloadSCons-499a2f21504c0727cf3c3dffd4be6c847ff2ec43.zip
SCons-499a2f21504c0727cf3c3dffd4be6c847ff2ec43.tar.gz
SCons-499a2f21504c0727cf3c3dffd4be6c847ff2ec43.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()