summaryrefslogtreecommitdiff
path: root/src/base
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 /src/base
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 'src/base')
-rw-r--r--src/base/hashmap.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/base/hashmap.hh b/src/base/hashmap.hh
index dfdf6ef90..41de40055 100644
--- a/src/base/hashmap.hh
+++ b/src/base/hashmap.hh
@@ -50,9 +50,9 @@
// clang, use unordered_map
// we need to determine what is available, as in the non-c++0x case,
-// e.g. gcc >= 4.3 and <= 4.5, the containers are in the std::tr1
-// namespace, and only gcc >= 4.6 (with -std=c++0x) adds the final
-// container implementation in the std namespace
+// i.e. gcc == 4.3, the containers are in the std::tr1 namespace, and
+// only gcc >= 4.4 (with -std=c++0x) adds the final container
+// implementation in the std namespace
#if defined(__clang__)
// align with -std=c++0x only for clang >= 3.0 in CCFLAGS and also
@@ -67,9 +67,9 @@
#define HAVE_STD_TR1_UNORDERED_MAP 1
#endif
#else
-// align with -std=c++0x only for gcc >= 4.6 in CCFLAGS, contrary to
+// align with -std=c++0x only for gcc >= 4.4 in CCFLAGS, contrary to
// clang we can rely entirely on the compiler version
-#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4)
#define HAVE_STD_UNORDERED_MAP 1
#else
#define HAVE_STD_TR1_UNORDERED_MAP 1
@@ -101,17 +101,17 @@
#if HAVE_STD_UNORDERED_MAP
-// clang or gcc >= 4.6
+// clang or gcc >= 4.4
#include <unordered_map>
#include <unordered_set>
// note that this assumes that -std=c++0x is added to the command line
-// which is done in the SConstruct CXXFLAGS for gcc >= 4.6 and clang
+// which is done in the SConstruct CXXFLAGS for gcc >= 4.4 and clang
// >= 3.0
#define __hash_namespace std
#define __hash_namespace_begin namespace std {
#define __hash_namespace_end }
#else
-// clang <= 3.0, gcc >= 4.3 and < 4.6
+// clang <= 3.0, gcc == 4.3
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#define __hash_namespace std::tr1