summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-08-16 17:27:38 -0400
committerNathan Binkert <binkertn@umich.edu>2004-08-16 17:27:38 -0400
commitac8b01db7101e8990ae93c87c6a09ee978732175 (patch)
tree09606e24e57bdc67081f9b7277bda5e3a7d0451e /build
parenta5fefbe07fa264b9be4be6f6f25834bca94ba2c6 (diff)
downloadgem5-ac8b01db7101e8990ae93c87c6a09ee978732175.tar.xz
Fix SConstruct file to allow you to override the compilers
build/SConstruct: Make it possible to override the CC and CXX environment variables. --HG-- extra : convert_revision : e1b68ae9b1b7011cc494bfa9ee688aa72929a2e3
Diffstat (limited to 'build')
-rw-r--r--build/SConstruct9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/SConstruct b/build/SConstruct
index 381b6ecda..41baa2d9c 100644
--- a/build/SConstruct
+++ b/build/SConstruct
@@ -239,6 +239,15 @@ default_env = Environment(ENV = os.environ, # inherit user's enviroment vars
FULL_SYSTEM = False,
USE_MYSQL = False)
+# For some reason, the CC and CXX variables don't get passed into the
+# environment correctly. This is probably some sort of scons bug that
+# will eventually be fixed.
+if os.environ.has_key('CC'):
+ default_env.Replace(CC=os.environ['CC'])
+
+if os.environ.has_key('CXX'):
+ default_env.Replace(CXX=os.environ['CXX'])
+
# M5_EXT is used by isa_parser.py to find the PLY package.
default_env.Append(ENV = { 'M5_EXT' : EXT_SRCDIR })