What's the best way to add new compiler flags?
Any way to do it from the command line without modifying the source?
I tried:
diff --git a/SConstruct b/SConstruct
index d81c5abd9..fc91cf8a8 100755
--- a/SConstruct
+++ b/SConstruct
@@ -345,6 +345,7 @@ if main['GCC'] or main['CLANG']:
# As gcc and clang share many flags, do the common parts here
main.Append(CCFLAGS=['-pipe'])
main.Append(CCFLAGS=['-fno-strict-aliasing'])
+ main.Append(CCFLAGS=['-fuse-ld=gold'])
# Enable -Wall and -Wextra and then disable the few warnings that
# we consistently violate
main.Append(CCFLAGS=['-Wall', '-Wundef', '-Wextra',
@@ -367,6 +368,7 @@ if main['GCC'] or main['CLANG']:
main.Append(CCFLAGS=['-Werror',
'-Wno-error=deprecated-declarations',
'-Wno-error=deprecated',
+ '-Wno-error=deprecated-declarations',
])
else:
print(termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, end=' ')
and --verbose says it added the flag for compilation, but not for link.
I then hacked the link command to use gold again and got the same problem.
________________________________
From: Gabe Black <[email protected]>
Sent: Wednesday, November 7, 2018 8:41 AM
To: Ciro Santilli
Cc: gem5 Developer List; nd
Subject: Re: Has anyone managed to link with the gold linker? It is failing for
me with "internal error in read_cie" for debug builds
It looks like you only made it use the gold linker at the end, but there may be
intermediate partial linking which would still use the normal linker. Could you
try using the gold linker throughout?
Gabe
On Tue, Nov 6, 2018 at 11:36 PM Ciro Santilli
<[email protected]<mailto:[email protected]>> wrote:
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