0001-fix-powerpc64-altivec.patch 1.2 KB

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