1 Subject: [PATCH] Work around bool type redefinition by altivec
3 On powerpc64le, the SDL header may include altivec.h and this
4 (combined with -std=c99) will cause a compile failure due to bool
5 being redefined as a vector type.
7 Adjust the compiler flags to add -std=gnu99 (which is compatible with
8 altivec) when using gcc. The generic flag '-std=c99' is left in place for other
9 compilers (in the gcc case it is overridden by the (later) gnu flag).
11 Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
13 waftools/detections/compiler.py | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
16 diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py
17 index 5bbba87..50836a2 100644
18 --- a/waftools/detections/compiler.py
19 +++ b/waftools/detections/compiler.py
20 @@ -43,7 +43,8 @@ def __add_gcc_flags__(ctx):
21 "-Wno-switch", "-Wparentheses", "-Wpointer-arith",
24 - "-Wno-unused-result"]
25 + "-Wno-unused-result",
28 def __add_clang_flags__(ctx):
29 ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics",