xref: /OK3568_Linux_fs/buildroot/package/mpv/0001-fix-powerpc64-altivec.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSubject: [PATCH] Work around bool type redefinition by altivec
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunOn powerpc64le, the SDL header may include altivec.h and this
4*4882a593Smuzhiyun(combined with -std=c99) will cause a compile failure due to bool
5*4882a593Smuzhiyunbeing redefined as a vector type.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunAdjust the compiler flags to add -std=gnu99 (which is compatible with
8*4882a593Smuzhiyunaltivec) when using gcc. The generic flag '-std=c99' is left in place for other
9*4882a593Smuzhiyuncompilers (in the gcc case it is overridden by the (later) gnu flag).
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunSigned-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyun waftools/detections/compiler.py | 3 ++-
14*4882a593Smuzhiyun 1 file changed, 2 insertions(+), 1 deletion(-)
15*4882a593Smuzhiyun
16*4882a593Smuzhiyundiff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py
17*4882a593Smuzhiyunindex 5bbba87..50836a2 100644
18*4882a593Smuzhiyun--- a/waftools/detections/compiler.py
19*4882a593Smuzhiyun+++ b/waftools/detections/compiler.py
20*4882a593Smuzhiyun@@ -43,7 +43,8 @@ def __add_gcc_flags__(ctx):
21*4882a593Smuzhiyun                        "-Wno-switch", "-Wparentheses", "-Wpointer-arith",
22*4882a593Smuzhiyun                        "-Wno-pointer-sign",
23*4882a593Smuzhiyun                        # GCC bug 66425
24*4882a593Smuzhiyun-                       "-Wno-unused-result"]
25*4882a593Smuzhiyun+                       "-Wno-unused-result",
26*4882a593Smuzhiyun+                       "-std=gnu99"]
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun def __add_clang_flags__(ctx):
29*4882a593Smuzhiyun     ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics",
30*4882a593Smuzhiyun--
31*4882a593Smuzhiyun2.10.0.297.gf6727b0
32*4882a593Smuzhiyun
33