summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/ccompiler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 9b27f0e1..574f40cb 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -229,6 +229,12 @@ class CCompiler(object):
extra_postargs.append('-Wall')
extra_postargs.append(self._cflags_no_deprecation_warnings)
+ # Disable warnings from combining _FORTIFY_SOURCE (from
+ # distutils.sysconfig) and -O0 (potentially provided in CFLAGS by the
+ # user).
+ if isinstance(self.compiler, UnixCCompiler):
+ extra_postargs.append('-Wno-cpp')
+
includes.extend(include_paths)
extra_postargs.extend(extra_args)