Work around a WAF bug in failing to recognize GCC while detecting CXXFLAGS for compiling Python extensions.
1.1 --- a/bindings/python/wscript Thu May 07 15:40:59 2009 +0100
1.2 +++ b/bindings/python/wscript Fri Oct 31 22:47:29 2008 +0000
1.3 @@ -118,6 +118,14 @@
1.4 conf.report_optional_feature("python", "Python Bindings", False, str(ex))
1.5 return
1.6
1.7 + # Fix a bug with WAF and g++ 4.3.2 (it does not include "(GCC") in
1.8 + # the output of g++ --version, so the WAF python detection fails
1.9 + # to recognize it is gcc)
1.10 + gcc_version = os.popen("%s --version" % conf.env['CXX']).readline()
1.11 + if '(GCC)' in gcc_version or 'g++' in gcc_version:
1.12 + conf.env.append_value('CXXFLAGS_PYEMBED','-fno-strict-aliasing')
1.13 + conf.env.append_value('CXXFLAGS_PYEXT','-fno-strict-aliasing')
1.14 +
1.15 ## Check for pybindgen
1.16 if Params.g_options.pybindgen_checkout:
1.17 fetch_pybindgen(conf)