Merge "gem5/cmake: gem5 build integration into Fail*"
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -33,3 +33,5 @@ simulators/bochs/install
|
||||
|
||||
simulators/gem5/.hg
|
||||
simulators/gem5/m5out/
|
||||
|
||||
src/core/sal/gem5/SConscript
|
||||
|
||||
@ -4,7 +4,7 @@ if(BUILD_GEM5)
|
||||
SET(VARIANT gem5)
|
||||
|
||||
set(gem5_src_dir ${PROJECT_SOURCE_DIR}/simulators/gem5)
|
||||
set(gem5_wrapper ${PROJECT_SOURCE_DIR}/src/core/sal/gem5)
|
||||
set(gem5_wrapper ${PROJECT_BINARY_DIR}/src/core/sal/gem5)
|
||||
set(gem5_build_config build/ARM/gem5.debug)
|
||||
## Determine the number of cores:
|
||||
set(core_count 0) # unknown
|
||||
|
||||
@ -71,6 +71,21 @@ elseif(BUILD_ARM)
|
||||
set(ARCH_TOOL_PREFIX "arm-none-eabi-" CACHE PATH "Setup prefix for binutils, e.g., arm-none-eabi- or tricore-, ..")
|
||||
endif(BUILD_X86)
|
||||
|
||||
if(BUILD_GEM5)
|
||||
message(STATUS "[${PROJECT_NAME}] Generating SConscript in ${CMAKE_CURRENT_BINARY_DIR}/gem5")
|
||||
set(additional_libs "")
|
||||
|
||||
foreach(exp ${EXPERIMENTS_ACTIVATED})
|
||||
set(additional_libs "${additional_libs} '-lfail-${exp}',")
|
||||
endforeach(exp)
|
||||
|
||||
foreach(plug ${PLUGINS_ACTIVATED})
|
||||
set(additional_libs "${additional_libs} '-lfail-${plug}',")
|
||||
endforeach(plug)
|
||||
|
||||
set(GEM5_SAL_SRCS "'${CMAKE_CURRENT_SOURCE_DIR}/gem5/Gem5Wrapper.cc'")
|
||||
configure_file(gem5/SConscript.in ${CMAKE_CURRENT_BINARY_DIR}/gem5/SConscript)
|
||||
endif(BUILD_GEM5)
|
||||
# Don't include these sources if perf-stuff is disabled
|
||||
# (reduces compiler overhead):
|
||||
if(CONFIG_FAST_WATCHPOINTS)
|
||||
|
||||
@ -3,13 +3,13 @@ Import('*')
|
||||
if env['TARGET_ISA'] == 'no':
|
||||
Return()
|
||||
|
||||
env.Prepend(CPPPATH=Dir('../../../../../src/core/'))
|
||||
env.Prepend(CPPPATH=Dir('../../../../../build/src/core/'))
|
||||
env.Prepend(CPPPATH=Dir('${PROJECT_SOURCE_DIR}/src/core/'))
|
||||
env.Prepend(CPPPATH=Dir('${PROJECT_BINARY_DIR}/src/core/'))
|
||||
|
||||
env.Append(CXXFLAGS = '-Wno-deprecated')
|
||||
|
||||
env.Prepend(LIBPATH=Dir('../../../../../build/lib/'))
|
||||
gStaticLibs = ['-lfail-sal', '-lfail-arch-test', '-lfail-comm', '-lfail-cpn', '-lfail-efw', '-lfail-util', '-lpcl', '-lprotobuf']
|
||||
env.Prepend(LIBPATH=Dir('${LIBRARY_OUTPUT_PATH}'))
|
||||
gStaticLibs = [${additional_libs} '-lfail-sal', '-lfail-comm', '-lfail-cpn', '-lfail-efw', '-lfail-util', '-lpcl', '-lprotobuf', '-liberty']
|
||||
|
||||
if (len(gStaticLibs)>0):
|
||||
linkFlags = ['-Wl,--start-group']
|
||||
@ -25,4 +25,4 @@ if (len(gStaticLibs)>0):
|
||||
DebugFlag('FailState')
|
||||
CompoundFlag('Fail', ['FailState'])
|
||||
|
||||
Source('Gem5Wrapper.cc')
|
||||
Source(${GEM5_SAL_SRCS})
|
||||
Reference in New Issue
Block a user