summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-05-03 00:37:19 -0700
committerGabe Black <gabeblack@google.com>2017-05-03 10:51:07 +0000
commit32fd8906ad85c2a05c0af0f0b1cda6e4493be309 (patch)
tree17f3a69623ef40f2c44a7e90d2d4b3edbfe1725d /SConstruct
parent31c8de306109f0fc3af6ad44aa474d86ba2f05f1 (diff)
downloadgem5-32fd8906ad85c2a05c0af0f0b1cda6e4493be309.tar.xz
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 <andreas.hansson@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct2
1 files changed, 1 insertions, 1 deletions
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: