diff options
author | Nathan Binkert <nate@binkert.org> | 2008-12-06 14:18:18 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-12-06 14:18:18 -0800 |
commit | c55ae0cf5dcff2c0be98ff0e9ec971c6744beb35 (patch) | |
tree | d0604936a548bcf731941403895ce83cace85d0e /ext/libelf/SConscript | |
parent | e141cb7441e79b3596c795faf9f47424f26c65e9 (diff) | |
download | gem5-c55ae0cf5dcff2c0be98ff0e9ec971c6744beb35.tar.xz |
scons: only use -Wno-pointer-sign with gcc >= 4.3
Diffstat (limited to 'ext/libelf/SConscript')
-rw-r--r-- | ext/libelf/SConscript | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index d266d20a9..18d1100a4 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -88,7 +88,11 @@ ElfFile('libelf_fsize.c') ElfFile('libelf_msize.c') m4env = env.Copy() -m4env.Append(CCFLAGS=['-Wno-pointer-sign', '-Wno-implicit']) +if env['GCC']: + major,minor,dot = [ int(x) for x in env['CXXVERSION'].split('.')] + if major >= 4: + m4env.Append(CCFLAGS=['-Wno-pointer-sign']) +m4env.Append(CCFLAGS=['-Wno-implicit']) del m4env['CPPPATH'] # If we have gm4 use it |