From c55ae0cf5dcff2c0be98ff0e9ec971c6744beb35 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 6 Dec 2008 14:18:18 -0800 Subject: scons: only use -Wno-pointer-sign with gcc >= 4.3 --- ext/libelf/SConscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/libelf') 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 -- cgit v1.2.3