summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-09-04 13:22:54 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-09-04 13:22:54 -0400
commitfdf6f6c4b61cadd79d910ccb225ebf9fba6191c2 (patch)
tree7cd4702b31efbb3f85c898948ea67c77f7c2796b /SConstruct
parente1b9c8c169a8bfe7bbfddb3f8fabbfaed5eaec31 (diff)
downloadgem5-fdf6f6c4b61cadd79d910ccb225ebf9fba6191c2.tar.xz
scons: Enable build on OSX
This patch changes the SConscript to build gem5 with libc++ on OSX as the conventional libstdc++ does not have the C++11 constructs that the current code base makes use of (e.g. std::forward). Since this was the last use of the transitional TR1, the unordered map and set header can now be simplified as well.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct13
1 files changed, 4 insertions, 9 deletions
diff --git a/SConstruct b/SConstruct
index 12819adcd..a2ccac05f 100755
--- a/SConstruct
+++ b/SConstruct
@@ -630,15 +630,10 @@ elif main['CLANG']:
main.Append(TCMALLOC_CCFLAGS=['-fno-builtin'])
# On Mac OS X/Darwin we need to also use libc++ (part of XCode) as
- # opposed to libstdc++ to make the transition from TR1 to
- # C++11. See http://libcxx.llvm.org. However, clang has chosen a
- # strict implementation of the C++11 standard, and does not allow
- # incomplete types in template arguments (besides unique_ptr and
- # shared_ptr), and the libc++ STL containers create problems in
- # combination with the current gem5 code. For now, we stick with
- # libstdc++ and use the TR1 namespace.
- # if sys.platform == "darwin":
- # main.Append(CXXFLAGS=['-stdlib=libc++'])
+ # opposed to libstdc++, as the later is dated.
+ if sys.platform == "darwin":
+ main.Append(CXXFLAGS=['-stdlib=libc++'])
+ main.Append(LIBS=['c++'])
else:
print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal,