Check if the compiler *really* supports -fvisibility=hidden.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 04 Mar 2009 11:34:51 +0000
changeset 4255 07f1fdd8a33e
parent 4254 aa1bff27656c
child 4256 cc06d903ca09
Check if the compiler *really* supports -fvisibility=hidden.
bindings/python/wscript
--- a/bindings/python/wscript	Tue Mar 03 18:52:00 2009 +0000
+++ b/bindings/python/wscript	Wed Mar 04 11:34:51 2009 +0000
@@ -71,9 +71,8 @@
         return
 
     # -fvisibility=hidden optimization
-    if conf.env['CXX_NAME'] == 'gcc' and conf.env['CC_VERSION'] >= (4,0,0):
+    if conf.env['CXX_NAME'] == 'gcc' and conf.check_compilation_flag('-fvisibility=hidden'):
         conf.env.append_value('CXXFLAGS_PYEXT', '-fvisibility=hidden')
-    if conf.env['CC_NAME'] == 'gcc' and conf.env['CC_VERSION'] >= (4,0,0):
         conf.env.append_value('CCFLAGS_PYEXT', '-fvisibility=hidden')
 
     # Check for the location of pybindgen