[PATCH] pixman: define pixman_have_{mmx,sse2} on 64-bit Linux

Magnus Kessler Magnus.Kessler at gmx.net
Thu May 28 04:09:07 PDT 2009


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 at gmx.net>

diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c
index e8f749a..61a93a5 100644
--- a/pixman/pixman-cpu.c
+++ b/pixman/pixman-cpu.c
@@ -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



More information about the xorg-devel mailing list