scons: only use -Wno-pointer-sign with gcc >= 4.3
authorNathan Binkert <nate@binkert.org>
Sat, 6 Dec 2008 22:18:18 +0000 (14:18 -0800)
committerNathan Binkert <nate@binkert.org>
Sat, 6 Dec 2008 22:18:18 +0000 (14:18 -0800)
ext/libelf/SConscript

index d266d20a9f96d26b2f5420206f43d6411cca9a41..18d1100a49c60738eeec35b10dff62de97f0174a 100644 (file)
@@ -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