summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-09 14:39:35 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-09 14:39:35 -0500
commit4a3ad218e1a41a9fa655471b999e2540e4e78448 (patch)
tree0a118efece1f5e0c160e34a2494c24e7fe8887e4
parent21946f071026d3b3c4122ef41d755f883e22e668 (diff)
downloadgem5-4a3ad218e1a41a9fa655471b999e2540e4e78448.tar.xz
We should import m5config *after* we do the CPPDEFINES stuff,
otherwise m5config and the object descriptions cannot take advantage of them. sim/pyconfig/SConscript: We should import m5config *after* we do the CPPDEFINES stuff, otherwise m5config and the object descriptions cannot take advantage of them. This means that we can't use the env dict alias. We should instead use os.environ. --HG-- extra : convert_revision : 392f99a3c15cfba74a5cde79a709ecfad3820e63
-rw-r--r--sim/pyconfig/SConscript5
1 files changed, 3 insertions, 2 deletions
diff --git a/sim/pyconfig/SConscript b/sim/pyconfig/SConscript
index 95785d372..2799ef64f 100644
--- a/sim/pyconfig/SConscript
+++ b/sim/pyconfig/SConscript
@@ -147,6 +147,7 @@ def MakeEmbeddedPyFile(target, source, env):
def MakeDefinesPyFile(target, source, env):
target = file(str(target[0]), 'w')
+ print >>target, "import os"
defines = env['CPPDEFINES']
if isinstance(defines, list):
for var in defines:
@@ -158,11 +159,11 @@ def MakeDefinesPyFile(target, source, env):
if not isinstance(key, basestring):
panic("invalid type for define: %s" % type(key))
- print >>target, "env['%s'] = '%s'" % (key, val)
+ print >>target, "os.environ['%s'] = '%s'" % (key, val)
elif isinstance(defines, dict):
for key,val in defines.iteritems():
- print >>target, "env['%s'] = '%s'" % (key, val)
+ print >>target, "os.environ['%s'] = '%s'" % (key, val)
else:
panic("invalid type for defines: %s" % type(defines))