[Pixman] [Patch] Fix pixman build with clang
manojgupta at chromium.org
Fri Dec 8 23:32:41 UTC 2017
I am encountering a build issue in pixman when compiling with with clang.
pixman-mmx.c:100:20: error: constraint 'K' expects an integer constant
: "y" (__A), "K" (__N)
The error happens because __N is a function parameter and clang does not
process it as an integer literal by design. Note that even gcc cannot
handle it in -O0 mode.
This can be fixed by forcing the macro version of the function which
exposes __N value
as an integer literal. I am making it #if 0 but it might be worthwhile to
delete the function declaration since there is no much to lose here given
all the function does is inline asm.
diff -Nuar old/pixman/pixman-mmx.c new/pixman/pixman-mmx.c
@@ -89,7 +89,7 @@
-# ifdef __OPTIMIZE__
+# if 0
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__,
_mm_shuffle_pi16 (__m64 __A, int8_t const __N)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pixman