From 56a7c2b57b9041f7f6c08cd4d946a178bd799d9b Mon Sep 17 00:00:00 2001 From: friemel Date: Mon, 27 Aug 2012 20:34:31 +0000 Subject: [PATCH] Fixed linking problems for gem5: - The right libutil is now used - Static libraries from Fail* are now surrounded by --start-group and --end-group git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1513 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- src/core/sal/gem5/SConscript | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/core/sal/gem5/SConscript b/src/core/sal/gem5/SConscript index 9d32dddb..a328e1cc 100644 --- a/src/core/sal/gem5/SConscript +++ b/src/core/sal/gem5/SConscript @@ -3,11 +3,21 @@ Import('*') if env['TARGET_ISA'] == 'no': Return() -env.Append(CPPPATH=Dir('../../../../../src/core/')) -env.Append(CPPPATH=Dir('../../../../../build/src/core/')) +env.Prepend(CPPPATH=Dir('../../../../../src/core/')) +env.Prepend(CPPPATH=Dir('../../../../../build/src/core/')) -env.Append(LIBPATH=Dir('../../../../../build/lib/')) -env.Append(LIBS=['sal', 'comm', 'cpn', 'efw', 'util', 'pcl', 'hsc-simple']) +env.Prepend(LIBPATH=Dir('../../../../../build/lib/')) +gStaticLibs = ['-lsal', '-lhsc-simple', '-lcomm', '-lcpn', '-lefw', '-lutil', '-lpcl'] + +if (len(gStaticLibs)>0): + linkFlags = ['-Wl,--start-group'] + linkFlags = linkFlags+gStaticLibs + linkFlags = linkFlags+['-Wl,--end-group'] + + env['GEN_LIB_BUILD_STATIC'] = linkFlags + + env.Append(SHLINKCOM = ' $GEN_LIB_BUILD_STATIC') + env.Append(LINKCOM = ' $GEN_LIB_BUILD_STATIC') SimObject('FailGem5Device.py')