ARM: fix value of MISCREG_CTR returned by readMiscReg()
[gem5.git] / SConstruct
index f0350ac020845a4f179c03d3afe0e8ddaa9ce6c2..c832fa1b86fd3fea3c4944aea0c6360dedb54aad 100755 (executable)
@@ -177,8 +177,8 @@ termcap = get_termcap(GetOption('use_colors'))
 # Set up the main build environment.
 #
 ########################################################################
-use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH', 'PATH',
-                 'PYTHONPATH', 'RANLIB', 'SWIG' ])
+use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
+                 'LIBRARY_PATH', 'PATH', 'PYTHONPATH', 'RANLIB', 'SWIG' ])
 
 use_env = {}
 for key,val in os.environ.iteritems():
@@ -538,8 +538,22 @@ elif main['CLANG']:
     if compareVersions(clang_version, "3") >= 0:
         main.Append(CXXFLAGS=['-std=c++0x'])
 else:
-    print 'Error: Don\'t know what compiler options to use for your compiler.'
-    print '       Please fix SConstruct and src/SConscript and try again.'
+    print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal,
+    print "Don't know what compiler options to use for your compiler."
+    print termcap.Yellow + '       compiler:' + termcap.Normal, main['CXX']
+    print termcap.Yellow + '       version:' + termcap.Normal,
+    if not CXX_version:
+        print termcap.Yellow + termcap.Bold + "COMMAND NOT FOUND!" +\
+               termcap.Normal
+    else:
+        print CXX_version.replace('\n', '<nl>')
+    print "       If you're trying to use a compiler other than GCC, ICC, SunCC,"
+    print "       or clang, there appears to be something wrong with your"
+    print "       environment."
+    print "       "
+    print "       If you are trying to use a compiler other than those listed"
+    print "       above you will need to ease fix SConstruct and "
+    print "       src/SConscript to support that compiler."
     Exit(1)
 
 # Set up common yacc/bison flags (needed for Ruby)
@@ -566,7 +580,7 @@ if not main.has_key('SWIG'):
     Exit(1)
 
 # Check for appropriate SWIG version
-swig_version = readCommand(('swig', '-version'), exception='').split()
+swig_version = readCommand([main['SWIG'], '-version'], exception='').split()
 # First 3 words should be "SWIG Version x.y.z"
 if len(swig_version) < 3 or \
         swig_version[0] != 'SWIG' or swig_version[1] != 'Version':
@@ -755,7 +769,8 @@ else:
     have_tcmalloc = False
     print termcap.Yellow + termcap.Bold + \
           "You can get a 12% performance improvement by installing tcmalloc "\
-          "(google-perftools package on Ubuntu or RedHat)." + termcap.Normal
+          "(libgoogle-perftools-dev package on Ubuntu or RedHat)." + \
+          termcap.Normal
 
 if not have_posix_clock:
     print "Can't find library for POSIX clocks."