Re: [Pixman] [Patch] Fix pixman build with clang
Thanks Emil, I see that this is indeed fixed in master. There is another problem with __builtin_shuffle though which clang doesn't support. On Tue, Dec 12, 2017 at 7:26 AM, Emil Velikovwrote: > On 8 December 2017 at 23:32, Manoj Gupta wrote: > > Hi, > > > > 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 > > expression > > : "y" (__A), "K" (__N) > > > Seems like you guys are building some pretty old stuff ;-) > > The issue was resolved upstream back in 2015 [1] and there has been a > release with said fix [2]. > > -Emil > > [1] https://cgit.freedesktop.org/pixman/commit/?id= > d24b415f3e2753a588759d028b811e1ce38fea6c > [2] https://lists.x.org/archives/xorg-announce/2015-December/002666.html > ___ Pixman mailing list Pixman@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pixman
Re: [Pixman] [Patch] Fix pixman build with clang
On 8 December 2017 at 23:32, Manoj Guptawrote: > Hi, > > 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 > expression > : "y" (__A), "K" (__N) > Seems like you guys are building some pretty old stuff ;-) The issue was resolved upstream back in 2015 [1] and there has been a release with said fix [2]. -Emil [1] https://cgit.freedesktop.org/pixman/commit/?id=d24b415f3e2753a588759d028b811e1ce38fea6c [2] https://lists.x.org/archives/xorg-announce/2015-December/002666.html ___ Pixman mailing list Pixman@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pixman
[Pixman] [Patch] Fix pixman build with clang
Hi, 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 expression : "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 --- old/pixman/pixman-mmx.c +++ new/pixman/pixman-mmx.c @@ -89,7 +89,7 @@ return __A; } -# ifdef __OPTIMIZE__ +# if 0 extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shuffle_pi16 (__m64 __A, int8_t const __N) { Thanks, Manoj ___ Pixman mailing list Pixman@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pixman