Fix build on old GCCs.
authorCarl Hetherington <cth@carlh.net>
Thu, 9 Jun 2016 15:17:24 +0000 (16:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Dec 2019 16:01:32 +0000 (17:01 +0100)
wscript

diff --git a/wscript b/wscript
index dee54d26354ec6c7920913ef26c860dc2931437e..d836e86b552331f338298a6a6c6d1284075c14d1 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,7 +27,9 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', ['-Wno-unused-result', '-Wno-unused-parameter', '-Wno-unused-local-typedef'])
 
     if conf.env.TARGET_LINUX:
-        conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+        gcc = conf.env['CC_VERSION']
+        if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
+            conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
 
     conf.check_cfg(package='openssl', args='--cflags --libs', uselib_store='OPENSSL', mandatory=True)