This is not a bug in clang.  It isn't a case of "the asm constraints we need 
are not implemented" it is a case of the code not being valid.  The error 
printed by clang is correct.  See this post for more details:
https://code.google.com/p/nativeclient/issues/detail?id=4201#c5

Or the description of the K constraint here:
https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints

I think a simple  (albeit not quite elegant) fix would be to just use X instead 
of K.

--Jeremy

> On Oct 10, 2015, at 13:48, Andrea Canciani <ranm...@gmail.com> wrote:
> 
> It looks like the latest XCode cannot build pixman:
> 
> $ clang --version
> Apple LLVM version 7.0.0 (clang-700.0.72)
> Target: x86_64-apple-darwin14.5.0
> Thread model: posix
> 
> pixman-mmx.c:100:20: error: constraint 'K' expects an integer constant 
> expression
>         : "y" (__A), "K" (__N)
>                           ^~~
> Reported here:
> https://github.com/Homebrew/homebrew/issues/41056
> 
> It looks like the test performed in configure.ac does not match the code with 
> sufficient accuracy.
> In particular, the constant is hardcoded in the configure.ac test, while in 
> the code it is only available after inlining.
> 
> The attached hack gets the code to compile on modern clang, but I believe 
> first of all we should improve the configure.ac detection code so that pixman 
> can actually build both on old and on new clang versions (possibly with mmx 
> disabled, if the asm constraints we need are not implemented).
> 
> Andrea
> <pixman-mmx.c.diff>_______________________________________________
> Pixman mailing list
> Pixman@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pixman

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to