From 32fd8906ad85c2a05c0af0f0b1cda6e4493be309 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 3 May 2017 00:37:19 -0700 Subject: 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 --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SConstruct') 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: -- cgit v1.2.3