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:
@ -15,6 +15,10 @@ if(BUILD_GEM5)
|
||||
# - make gem5_build_config configurable in CMake
|
||||
# (alternative: gem5_build_config is set based on the CMake build
|
||||
# config, e.g., "Debug" or "Release")
|
||||
# - Ideally, there is no additional "gem5-clean" target. Instead,
|
||||
# calling "make clean" should also invoke a clean command in the
|
||||
# gem5 root dir. This seems easy for "make only" projects--things
|
||||
# get shaky due to "scons".
|
||||
|
||||
# Enable ExternalProject CMake module
|
||||
include(ExternalProject)
|
||||
@ -29,10 +33,15 @@ if(BUILD_GEM5)
|
||||
SOURCE_DIR ${gem5_src_dir}
|
||||
BINARY_DIR ${gem5_src_dir}
|
||||
# Build gem5 using scons build system:
|
||||
BUILD_COMMAND scons EXTRAS=${gem5_wrapper} ${gem5_build_config} -j${core_count}
|
||||
BUILD_COMMAND scons "CXX=${CMAKE_CXX_COMPILER} -p ${gem5_src_dir} --Xcompiler" EXTRAS=${gem5_wrapper} ${gem5_build_config} -j${core_count}
|
||||
# Disable install step (for now)
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
add_custom_target(gem5-allclean
|
||||
COMMAND @echo "Cleaning Fail* and gem5 ..."
|
||||
COMMAND cd "${PROJECT_BINARY_DIR}/" && make clean
|
||||
COMMAND cd "${gem5_src_dir}/" && scons -c
|
||||
)
|
||||
|
||||
# Build "fail" library first (will be statically linked to gem5)
|
||||
add_dependencies(FailGem5_binary_external fail)
|
||||
|
||||
Reference in New Issue
Block a user