pixman: define pixman_have_{mmx,sse2} on 64-bit Linux
authorMagnus Kessler <Magnus.Kessler@gmx.net>
Thu, 28 May 2009 11:09:07 +0000 (12:09 +0100)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Thu, 28 May 2009 16:08:15 +0000 (12:08 -0400)
The refactoring of pixman removed pixman-sse2.h and pixman-mmx.h in commit
41a9a17e0308f2075bb1bd59c4411e43a67d49ec
(http://cgit.freedesktop.org/pixman/commit/?id=41a9a17e0308f2075bb1bd59c4411e43a67d49ec).
On 64-bit Linux this breaks linking of new programs as well as execution of
existing programs with the following errors:

../pixman/.libs/libpixman-1.so: undefined reference to `pixman_have_mmx'
../pixman/.libs/libpixman-1.so: undefined reference to `pixman_have_sse2'

This patch fixes the issue for me by re-introducing the definitions for these
functions. It might be preferable, though, to create proper trivial static
inline functions instead.

Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net>
pixman/pixman-cpu.c

index e8f749a..61a93a5 100644 (file)
@@ -494,6 +494,13 @@ pixman_have_sse2 (void)
 }
 #endif
 
+#else /* __amd64__ */
+#ifdef USE_MMX
+#define pixman_have_mmx() TRUE
+#endif
+#ifdef USE_SSE2
+#define pixman_have_sse2() TRUE
+#endif
 #endif /* __amd64__ */
 #endif