Nikos Nikoleris has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/14818
Change subject: scons: Workaround for LLVM's lack of support for weak
linking
......................................................................
scons: Workaround for LLVM's lack of support for weak linking
LLVM up until version 10.0.0 doesn't seem to support the attribute for
weak linking. This is a workaround that forces LLVM to ignore what
otherwise appears to be a missing symbol.
Change-Id: Iaa6360ec61317e01f4e645af8b509961b3144282
Signed-off-by: Nikos Nikoleris <[email protected]>
---
M src/SConscript
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/SConscript b/src/SConscript
index 361479d..ffacfd6 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1240,6 +1240,12 @@
# opt, fast, prof and perf all share the same cc flags
for target in ['opt', 'fast', 'prof', 'perf']:
ccflags[target] += ['-O3']
+
+ # LLVM up until version 10.0.0 doesn't seem to support the
+ # attribute for weak linking. This is a workaround that forces
+ # LLVM to ignore what otherwise appears to be a missing symbol.
+ for flags in ldflags.values():
+ flags += ['-Wl,-U,_sc_main']
else:
print('Unknown compiler, please fix compiler options')
Exit(1)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14818
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iaa6360ec61317e01f4e645af8b509961b3144282
Gerrit-Change-Number: 14818
Gerrit-PatchSet: 1
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev