o3: drop unused statistic wbPenalized and wbPenalizedRate
[gem5.git] / src / SConscript
index cffc4d157fb3c6f6af8d007b0573c83e9ca8b3ca..eae03a98ac19cda55bc39cc3f5fee4163c4991b2 100755 (executable)
@@ -916,6 +916,11 @@ env.Command('debug/flags.cc', Value(debug_flags),
 env.Depends(SWIG, 'debug/flags.cc')
 Source('debug/flags.cc')
 
+# version tags
+env.Command('sim/tags.cc', None,
+            MakeAction('util/cpt_upgrader.py --get-cc-file > $TARGET',
+                       Transform("VER TAGS")))
+
 # Embed python files.  All .py files that have been indicated by a
 # PySource() call in a SConscript need to be embedded into the M5
 # library.  To do that, we compile the file to byte code, marshal the
@@ -1015,7 +1020,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
 
     # Add additional warnings here that should not be applied to
     # the SWIG generated code
-    new_env.Append(CXXFLAGS='-Wmissing-declarations')
+    new_env.Append(CXXFLAGS=['-Wmissing-declarations',
+                             '-Wdelete-non-virtual-dtor'])
 
     if env['GCC']:
         # Depending on the SWIG version, we also need to supress
@@ -1023,15 +1029,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
         # initializers.
         swig_env.Append(CCFLAGS=['-Wno-uninitialized',
                                  '-Wno-missing-field-initializers',
-                                 '-Wno-unused-but-set-variable'])
-
-        # If gcc supports it, also warn for deletion of derived
-        # classes with non-virtual desctructors. For gcc >= 4.7 we
-        # also have to disable warnings about the SWIG code having
-        # potentially uninitialized variables.
-        if compareVersions(env['GCC_VERSION'], '4.7') >= 0:
-            new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor')
-            swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized')
+                                 '-Wno-unused-but-set-variable',
+                                 '-Wno-maybe-uninitialized'])
 
         # Only gcc >= 4.9 supports UBSan, so check both the version
         # and the command-line option before adding the compiler and
@@ -1042,10 +1041,6 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
             new_env.Append(LINKFLAGS='-fsanitize=undefined')
 
     if env['CLANG']:
-        # Always enable the warning for deletion of derived classes
-        # with non-virtual destructors
-        new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor'])
-
         swig_env.Append(CCFLAGS=[
                 # Some versions of SWIG can return uninitialized values
                 '-Wno-sometimes-uninitialized',
@@ -1061,7 +1056,12 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
             new_env.Append(LINKFLAGS='-fsanitize=undefined')
 
     werror_env = new_env.Clone()
-    werror_env.Append(CCFLAGS='-Werror')
+    # Treat warnings as errors but white list some warnings that we
+    # want to allow (e.g., deprecation warnings).
+    werror_env.Append(CCFLAGS=['-Werror',
+                               '-Wno-error=deprecated-declarations',
+                               '-Wno-error=deprecated',
+                               ])
 
     def make_obj(source, static, extra_deps = None):
         '''This function adds the specified source to the correct