From: Nathan Binkert Date: Sat, 6 Dec 2008 22:18:18 +0000 (-0800) Subject: scons: only use -Wno-pointer-sign with gcc >= 4.3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c55ae0cf5dcff2c0be98ff0e9ec971c6744beb35;p=gem5.git scons: only use -Wno-pointer-sign with gcc >= 4.3 --- 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