summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-14 12:13:18 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-14 12:13:18 -0400
commit806a1144ceea710cb6586fc2a80ae60a6e0be552 (patch)
tree280cdc619480f95840db6763eabc91e626770e09 /SConstruct
parentae1652b813e461d5e8840be876d038956b64a8cc (diff)
downloadgem5-806a1144ceea710cb6586fc2a80ae60a6e0be552.tar.xz
scons: Use c++0x with gcc >= 4.4 instead of 4.6
This patch shifts the version of gcc for which we enable c++0x from 4.6 to 4.4 The more long term plan is to see what the c++0x features can bring and what level of support would be enabled simply by bumping the required version of gcc from 4.3 to 4.4. A few minor things had to be fixed in the code base, most notably the choice of a hashmap implementation. In the Ruby Sequencer there were also a few minor issues that gcc 4.4 was not too happy about.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 34b333f60..ee53be196 100755
--- a/SConstruct
+++ b/SConstruct
@@ -502,7 +502,9 @@ if main['GCC']:
not compareVersions(gcc_version, '4.4.2'):
print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
main.Append(CCFLAGS=['-fno-tree-vectorize'])
- if compareVersions(gcc_version, '4.6') >= 0:
+ # c++0x support in gcc is useful already from 4.4, see
+ # http://gcc.gnu.org/projects/cxx0x.html for details
+ if compareVersions(gcc_version, '4.4') >= 0:
main.Append(CXXFLAGS=['-std=c++0x'])
elif main['ICC']:
pass #Fix me... add warning flags once we clean up icc warnings
@@ -535,6 +537,8 @@ elif main['CLANG']:
# of if-statements
main.Append(CCFLAGS=['-Wno-parentheses'])
+ # clang 2.9 does not play well with c++0x as it ships with C++
+ # headers that produce errors, this was fixed in 3.0
if compareVersions(clang_version, "3") >= 0:
main.Append(CXXFLAGS=['-std=c++0x'])
else: