X86: Implement a locking version of XADD.
[gem5.git] / SConstruct
index a3cae0fc9f10fb6401f3a8c269112ba4ce7b31ea..1c7f09515e77c97ed942bf43ece30310e02740da 100644 (file)
@@ -161,7 +161,8 @@ def compare_versions(v1, v2):
 # Set up the base build environment.
 #
 ########################################################################
-use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'PATH', 'RANLIB' ])
+use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH', 'PATH',
+                 'RANLIB' ])
 
 use_env = {}
 for key,val in os.environ.iteritems():
@@ -211,17 +212,15 @@ If you are actually a M5 developer, please fix this and
 run the style hook. It is important.
 """
 
+hg_info = "Unknown"
 if hgdir.exists():
     # 1) Grab repository revision if we know it.
     cmd = "hg id -n -i -t -b"
     try:
         hg_info = read_command(cmd, cwd=env.root.abspath).strip()
     except OSError:
-        hg_info = "Unknown"
         print mercurial_bin_not_found
 
-    env['HG_INFO'] = hg_info
-
     # 2) Ensure that the style hook is in place.
     try:
         ui = None
@@ -240,6 +239,7 @@ if hgdir.exists():
             sys.exit(1)
 else:
     print ".hg directory not found"
+env['HG_INFO'] = hg_info
 
 ###################################################
 #
@@ -373,8 +373,11 @@ else:
 Export('base_dir')
 Export('extras_dir_list')
 
+# the ext directory should be on the #includes path
+env.Append(CPPPATH=[Dir('ext')])
+
 # M5_PLY is used by isa_parser.py to find the PLY package.
-env.Append(ENV = { 'M5_PLY' : str(Dir('ext/ply')) })
+env.Append(ENV = { 'M5_PLY' : Dir('ext/ply').abspath })
 
 CXX_version = read_command([env['CXX'],'--version'], exception=False)
 CXX_V = read_command([env['CXX'],'-V'], exception=False)
@@ -418,7 +421,6 @@ if env['BATCH']:
 if sys.platform == 'cygwin':
     # cygwin has some header file issues...
     env.Append(CCFLAGS=Split("-Wno-uninitialized"))
-env.Append(CPPPATH=[Dir('ext/dnet')])
 
 # Check for SWIG
 if not env.has_key('SWIG'):
@@ -551,7 +553,7 @@ py_includes = [ py_general_include ]
 if py_platform_include != py_general_include:
     py_includes.append(py_platform_include)
 
-py_lib_path = []
+py_lib_path = [ py_getvar('LIBDIR') ]
 # add the prefix/lib/pythonX.Y/config dir, but only if there is no
 # shared library in prefix/lib/.
 if not py_getvar('Py_ENABLE_SHARED'):
@@ -565,7 +567,6 @@ py_libs.append('-l' + py_version)
 
 env.Append(CPPPATH=py_includes)
 env.Append(LIBPATH=py_lib_path)
-#env.Append(LIBS=py_libs)
 
 # verify that this stuff works
 if not conf.CheckHeader('Python.h', '<>'):
@@ -697,7 +698,7 @@ nonsticky_vars.AddVariables(
     )
 
 # These variables get exported to #defines in config/*.hh (see src/SConscript).
-env.ExportVariables = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \
+env.ExportVariables = ['FULL_SYSTEM', 'USE_FENV', \
                        'USE_MYSQL', 'NO_FAST_ALLOC', 'FAST_ALLOC_DEBUG', \
                        'FAST_ALLOC_STATS', 'SS_COMPATIBLE_FP', \
                        'USE_CHECKER', 'TARGET_ISA', 'CP_ANNOTATE']