From 806a1144ceea710cb6586fc2a80ae60a6e0be552 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 14 Sep 2012 12:13:18 -0400 Subject: 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. --- SConstruct | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'SConstruct') 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: -- cgit v1.2.3