summaryrefslogtreecommitdiff
path: root/ext/libelf/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'ext/libelf/SConscript')
-rw-r--r--ext/libelf/SConscript6
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