changeset dd64a2984966 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=dd64a2984966
description:
scons: Address issues related to gcc 4.9.1
Fix a number few minor issues to please gcc 4.9.1. Removing the
'-fuse-linker-plugin' flag means no libraries are part of the LTO
process, but hopefully this is an acceptable loss, as the flag causes
issues on a lot of systems (only certain combinations of gcc, ld and
ar work).
diffstat:
SConstruct | 8 +++-----
src/arch/isa_parser.py | 4 +++-
src/cpu/checker/cpu.cc | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diffs (51 lines):
diff -r 85274f24c37a -r dd64a2984966 SConstruct
--- a/SConstruct Sat Sep 27 09:08:33 2014 -0400
+++ b/SConstruct Sat Sep 27 09:08:34 2014 -0400
@@ -602,14 +602,12 @@
if not GetOption('no_lto'):
# Pass the LTO flag when compiling to produce GIMPLE
# output, we merely create the flags here and only append
- # them later/
+ # them later
main['LTO_CCFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]
# Use the same amount of jobs for LTO as we are running
- # scons with, we hardcode the use of the linker plugin
- # which requires either gold or GNU ld >= 2.21
- main['LTO_LDFLAGS'] = ['-flto=%d' % GetOption('num_jobs'),
- '-fuse-linker-plugin']
+ # scons with
+ main['LTO_LDFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]
main.Append(TCMALLOC_CCFLAGS=['-fno-builtin-malloc', '-fno-builtin-calloc',
'-fno-builtin-realloc', '-fno-builtin-free'])
diff -r 85274f24c37a -r dd64a2984966 src/arch/isa_parser.py
--- a/src/arch/isa_parser.py Sat Sep 27 09:08:33 2014 -0400
+++ b/src/arch/isa_parser.py Sat Sep 27 09:08:34 2014 -0400
@@ -856,7 +856,9 @@
ctype = 'TheISA::PCState'
if self.isPCPart():
ctype = self.ctype
- return "%s %s;\n" % (ctype, self.base_name)
+ # Note that initializations in the declarations are solely
+ # to avoid 'uninitialized variable' errors from the compiler.
+ return '%s %s = 0;\n' % (ctype, self.base_name)
def isPCState(self):
return 1
diff -r 85274f24c37a -r dd64a2984966 src/cpu/checker/cpu.cc
--- a/src/cpu/checker/cpu.cc Sat Sep 27 09:08:33 2014 -0400
+++ b/src/cpu/checker/cpu.cc Sat Sep 27 09:08:34 2014 -0400
@@ -298,10 +298,10 @@
// Cannot check this is actually what went to memory because
// there stores can be in ld/st queue or coherent operations
// overwriting values.
- bool extraData;
+ bool extraData = false;
if (unverifiedReq) {
extraData = unverifiedReq->extraDataValid() ?
- unverifiedReq->getExtraData() : 1;
+ unverifiedReq->getExtraData() : true;
}
if (unverifiedReq && unverifiedMemData &&
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev