Ah OK, the partial link commands were not picking it up.
I used the following patch and it worked, the link command is 4x faster (actual
rebuild less due to scons slowness, but they are similar now it seems).
I'm going to expose it to scons. gold is awesome.
diff --git a/SConstruct b/SConstruct
index d81c5abd9..f191e2ba6 100755
--- a/SConstruct
+++ b/SConstruct
@@ -361,6 +361,8 @@ if main['GCC'] or main['CLANG']:
shared_partial_flags = ['-r', '-nostdlib']
main.Append(PSHLINKFLAGS=shared_partial_flags)
main.Append(PLINKFLAGS=shared_partial_flags)
+ main.Append(PLINKFLAGS='-fuse-ld=gold')
+ main.Append(LINKFLAGS='-fuse-ld=gold')
# Treat warnings as errors but white list some warnings that we
# want to allow (e.g., deprecation warnings).
________________________________
From: Ciro Santilli
Sent: Wednesday, November 7, 2018 7:36:56 AM
To: [email protected]; [email protected]
Cc: nd
Subject: Has anyone managed to link with the gold linker? It is failing for me
with "internal error in read_cie" for debug builds
I hacked up the link command manually to add -fuse-ld=gold.
For build/ARM/gem5.opt, it halved the link time!
But for gem5.debug, link failed.
I have opened a detailed bug report at:
https://sourceware.org/bugzilla/show_bug.cgi?id=23869
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev