From: Gabe Black Date: Wed, 3 May 2017 07:37:19 +0000 (-0700) Subject: scons: Fix the compiler flag used for partial linking. X-Git-Tag: v19.0.0.0~2827 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32fd8906ad85c2a05c0af0f0b1cda6e4493be309;p=gem5.git scons: Fix the compiler flag used for partial linking. It seems that g++ can generally handle the -r flag for generating a relocatable object file, but ld can't always handle the --relocatable flag. Change-Id: I15f32e469590a814131d4e992b392a7ad6c52b83 Reviewed-on: https://gem5-review.googlesource.com/3001 Reviewed-by: Andreas Hansson Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- diff --git a/SConstruct b/SConstruct index ff6de944c..d252865db 100755 --- a/SConstruct +++ b/SConstruct @@ -685,7 +685,7 @@ if main['GCC'] or main['CLANG']: main['FILTER_PSHLINKFLAGS'] = lambda x: str(x).replace(' -shared', '') main['PSHLINKFLAGS'] = main.subst('${FILTER_PSHLINKFLAGS(SHLINKFLAGS)}') main['PLINKFLAGS'] = main.subst('${LINKFLAGS}') - shared_partial_flags = ['-Wl,--relocatable', '-nostdlib'] + shared_partial_flags = ['-r', '-nostdlib'] main.Append(PSHLINKFLAGS=shared_partial_flags) main.Append(PLINKFLAGS=shared_partial_flags) else: