gem5: codebase patched to compile with ag++

This changes allows us to compile the gem5 simulator with ag++. It
was tested with ag++ v0.8, built Apr 18 2013. Most of the changes
are preprocessor directives like #ifndef __puma which have been
inserted into the gem5 code. Unfortunately, a python script and a
SWIG input file have been patched, too.
Additionally, the CMake file has been updated. A single call to
"make" now invokes the ag++ (instead of the g++) compiler front
end. The new CMake target "gem5-allclean" should be used to clean
the current project when building FailGem5. In addition to cleaning
the Fail build directory, it also invokes "scons -c" in the gem5
build directory; that is, gem5 is cleaned as well.

Change-Id: I20a92f025f34f626b81e30f2c873baeba189f83b
This commit is contained in:
Adrian Böckenkamp
2013-05-16 15:35:28 +02:00
parent 95892e9688
commit f92557c2c2
21 changed files with 96 additions and 17 deletions

View File

@ -488,6 +488,9 @@ if main['GCC'] + main['SUNCC'] + main['ICC'] + main['CLANG'] > 1:
print 'Error: How can we have two at the same time?'
Exit(1)
main['GCC'] = True
main['GCC_VERSION'] = '4.4.5'
# Set up default C++ compiler flags
if main['GCC']:
main.Append(CCFLAGS=['-pipe'])
@ -496,14 +499,14 @@ if main['GCC']:
# Read the GCC version to check for versions with bugs
# 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.'
main.Append(CCFLAGS=['-fno-tree-vectorize'])
if compareVersions(gcc_version, '4.6') >= 0:
main.Append(CXXFLAGS=['-std=c++0x'])
# 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.'
# main.Append(CCFLAGS=['-fno-tree-vectorize'])
# if compareVersions(gcc_version, '4.6') >= 0:
# main.Append(CXXFLAGS=['-std=c++0x'])
elif main['ICC']:
pass #Fix me... add warning flags once we clean up icc warnings
elif main['SUNCC']: