MEM: Make the bus default port yet another port
[gem5.git] / SConstruct
index 8c09e5e4dfb1b0ff63b13228ca222d82c896ead8..0630cbd79bc78fadd11f9b0c37872f578766b3f9 100755 (executable)
@@ -487,6 +487,7 @@ if main['GCC']:
     # Note CCVERSION doesn't work here because it is run with the CC
     # before we override it from the command line
     gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
+    main['GCC_VERSION'] = gcc_version
     if not compareVersions(gcc_version, '4.4.1') or \
        not compareVersions(gcc_version, '4.4.2'):
         print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
@@ -662,10 +663,14 @@ if not py_getvar('Py_ENABLE_SHARED'):
 
 py_libs = []
 for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():
-    assert lib.startswith('-l')
-    lib = lib[2:]   
-    if lib not in py_libs:
-        py_libs.append(lib)
+    if not lib.startswith('-l'):
+        # Python requires some special flags to link (e.g. -framework
+        # common on OS X systems), assume appending preserves order
+        main.Append(LINKFLAGS=[lib])
+    else:
+        lib = lib[2:]
+        if lib not in py_libs:
+            py_libs.append(lib)
 py_libs.append(py_version)
 
 main.Append(CPPPATH=py_includes)
@@ -810,7 +815,6 @@ sticky_vars.AddVariables(
     BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
     BoolVariable('USE_CHECKER', 'Use checker for detailed CPU models', False),
     BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False),
-    BoolVariable('RUBY', 'Build with Ruby', False),
     )
 
 # These variables get exported to #defines in config/*.hh (see src/SConscript).
@@ -836,13 +840,8 @@ def build_config_file(target, source, env):
     f.close()
     return None
 
-# Generate the message to be printed when building the config file.
-def build_config_file_string(target, source, env):
-    (variable, value) = [s.get_contents() for s in source]
-    return "Defining %s as %s in %s." % (variable, value, target[0])
-
 # Combine the two functions into a scons Action object.
-config_action = Action(build_config_file, build_config_file_string)
+config_action = MakeAction(build_config_file, Transform("CONFIG H", 2))
 
 # The emitter munges the source & target node lists to reflect what
 # we're really doing.