mem: Add "const" attribute to Packet getters
[gem5.git] / SConstruct
index 863a6cabaf07c509c3f6909f2b75253fcb32575f..5b57c1ce6b7bd58ebe16fe645d30033009454ad6 100755 (executable)
@@ -190,9 +190,11 @@ termcap = get_termcap(GetOption('use_colors'))
 # Set up the main build environment.
 #
 ########################################################################
+
+# export TERM so that clang reports errors in color
 use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
                  'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PYTHONPATH',
-                 'RANLIB', 'SWIG' ])
+                 'RANLIB', 'SWIG', 'TERM' ])
 
 use_prefixes = [
     "M5",           # M5 configuration (e.g., path to kernels)
@@ -936,10 +938,14 @@ if not have_fenv:
     print "Warning: Header file <fenv.h> not found."
     print "         This host has no IEEE FP rounding mode control."
 
-# Check if we should enable KVM-based hardware virtualization
-have_kvm = conf.CheckHeader('linux/kvm.h', '<>')
+# Check if we should enable KVM-based hardware virtualization. The API
+# we rely on exists since version 2.6.36 of the kernel, but somehow
+# the KVM_API_VERSION does not reflect the change. We test for one of
+# the types as a fall back.
+have_kvm = conf.CheckHeader('linux/kvm.h', '<>') and \
+    conf.CheckTypeSize('struct kvm_xsave', '#include <linux/kvm.h>') != 0
 if not have_kvm:
-    print "Info: Header file <linux/kvm.h> not found, " \
+    print "Info: Compatible header file <linux/kvm.h> not found, " \
         "disabling KVM support."
 
 # Check if the requested target ISA is compatible with the host