changeset 2fc7787f47a9 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=2fc7787f47a9
description:
GCC: Guard some gcc flags so they're used when available and needed.
diffstat:
SConstruct | 1 +
src/SConscript | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 712d8bf07020 -r 2fc7787f47a9 SConstruct
--- a/SConstruct Sat Nov 05 15:32:23 2011 -0500
+++ b/SConstruct Wed Nov 09 21:48:28 2011 -0800
@@ -487,6 +487,7 @@
# Note CCVERSION doesn't work here because it is run with the CC
# before we override it from the command line
gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
+ main['GCC_VERSION'] = gcc_version
if not compareVersions(gcc_version, '4.4.1') or \
not compareVersions(gcc_version, '4.4.2'):
print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
diff -r 712d8bf07020 -r 2fc7787f47a9 src/SConscript
--- a/src/SConscript Sat Nov 05 15:32:23 2011 -0500
+++ b/src/SConscript Wed Nov 09 21:48:28 2011 -0800
@@ -51,7 +51,7 @@
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 @@
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')
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev