changeset 8b223e308b08 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8b223e308b08
description:
        Scons: Remove Werror=False in SConscript files

        This patch removes the overriding of "-Werror" in a handful of
        cases. The code compiles with gcc 4.6.3 and clang 3.0 without any
        warnings, and thus without any errors. There are no functional changes
        introduced by this patch. In the future, rather than ypassing
        "-Werror", address the warnings.

diffstat:

 src/SConscript                                        |  12 +++---------
 src/cpu/testers/networktest/SConscript                |   2 +-
 src/mem/ruby/common/SConscript                        |   2 +-
 src/mem/ruby/network/garnet/fixed-pipeline/SConscript |   4 ++--
 4 files changed, 7 insertions(+), 13 deletions(-)

diffs (83 lines):

diff -r 62f60ee68b45 -r 8b223e308b08 src/SConscript
--- a/src/SConscript    Wed Mar 21 19:02:03 2012 -0400
+++ b/src/SConscript    Thu Mar 22 06:34:50 2012 -0400
@@ -151,11 +151,10 @@
         
 class Source(SourceFile):
     '''Add a c/c++ source file to the build'''
-    def __init__(self, source, Werror=True, swig=False, **guards):
+    def __init__(self, source, swig = False, **guards):
         '''specify the source file, and any guards'''
         super(Source, self).__init__(source, **guards)
 
-        self.Werror = Werror
         self.swig = swig
 
 class PySource(SourceFile):
@@ -844,9 +843,10 @@
     new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
     new_env.Label = label
     new_env.Append(**kwargs)
+    # Always consider warnings errors
+    new_env.Append(CCFLAGS='-Werror')
 
     swig_env = new_env.Clone()
-    swig_env.Append(CCFLAGS='-Werror')
     if env['GCC']:
         swig_env.Append(CCFLAGS='-Wno-uninitialized')
         swig_env.Append(CCFLAGS='-Wno-sign-compare')
@@ -857,10 +857,6 @@
     if env['CLANG']:
         swig_env.Append(CCFLAGS=['-Wno-unused-label'])
 
-
-    werror_env = new_env.Clone()
-    werror_env.Append(CCFLAGS='-Werror')
-
     def make_obj(source, static, extra_deps = None):
         '''This function adds the specified source to the correct
         build environment, and returns the corresponding SCons Object
@@ -868,8 +864,6 @@
 
         if source.swig:
             env = swig_env
-        elif source.Werror:
-            env = werror_env
         else:
             env = new_env
 
diff -r 62f60ee68b45 -r 8b223e308b08 src/cpu/testers/networktest/SConscript
--- a/src/cpu/testers/networktest/SConscript    Wed Mar 21 19:02:03 2012 -0400
+++ b/src/cpu/testers/networktest/SConscript    Thu Mar 22 06:34:50 2012 -0400
@@ -32,6 +32,6 @@
 
 SimObject('NetworkTest.py')
 
-Source('networktest.cc', Werror=False)
+Source('networktest.cc')
 
 DebugFlag('NetworkTest')
diff -r 62f60ee68b45 -r 8b223e308b08 src/mem/ruby/common/SConscript
--- a/src/mem/ruby/common/SConscript    Wed Mar 21 19:02:03 2012 -0400
+++ b/src/mem/ruby/common/SConscript    Thu Mar 22 06:34:50 2012 -0400
@@ -39,5 +39,5 @@
 Source('Global.cc')
 Source('Histogram.cc')
 Source('NetDest.cc')
-Source('Set.cc', Werror=False)
+Source('Set.cc')
 Source('SubBlock.cc')
diff -r 62f60ee68b45 -r 8b223e308b08 
src/mem/ruby/network/garnet/fixed-pipeline/SConscript
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SConscript     Wed Mar 21 
19:02:03 2012 -0400
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SConscript     Thu Mar 22 
06:34:50 2012 -0400
@@ -38,8 +38,8 @@
 SimObject('GarnetRouter_d.py')
 
 Source('GarnetLink_d.cc')
-Source('GarnetNetwork_d.cc', Werror=False)
-Source('InputUnit_d.cc', Werror=False)
+Source('GarnetNetwork_d.cc')
+Source('InputUnit_d.cc')
 Source('NetworkInterface_d.cc')
 Source('NetworkLink_d.cc')
 Source('OutVcState_d.cc')
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to