diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-11-09 21:48:28 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-11-09 21:48:28 -0800 |
commit | 2ee59cee1b6130359b127c4d74d3d10bd01853a9 (patch) | |
tree | 820981f268c085ba8803186900b2562d94f21e6c /src | |
parent | 472645d62a40849f5622e1f98d1bb2883a4f0e5b (diff) | |
download | gem5-2ee59cee1b6130359b127c4d74d3d10bd01853a9.tar.xz |
GCC: Guard some gcc flags so they're used when available and needed.
Diffstat (limited to 'src')
-rwxr-xr-x | src/SConscript | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/SConscript b/src/SConscript index 391a832ba..0a4bb57f4 100755 --- a/src/SConscript +++ b/src/SConscript @@ -51,7 +51,7 @@ Export('env') build_env = [(opt, env[opt]) for opt in export_vars] -from m5.util import code_formatter +from m5.util import code_formatter, compareVersions ######################################################################## # Code for adding source files of various types @@ -851,8 +851,9 @@ def makeEnv(label, objsfx, strip = False, **kwargs): swig_env.Append(CCFLAGS='-Wno-uninitialized') swig_env.Append(CCFLAGS='-Wno-sign-compare') swig_env.Append(CCFLAGS='-Wno-parentheses') - swig_env.Append(CCFLAGS='-Wno-unused-label') - swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable') + if compareVersions(env['GCC_VERSION'], '4.6.0') != -1: + swig_env.Append(CCFLAGS='-Wno-unused-label') + swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable') werror_env = new_env.Clone() werror_env.Append(CCFLAGS='-Werror') |