[cairo] [PATCH/pixman] Fix the SSE related AMD64 build breakage

Nicholas Miell nmiell at comcast.net
Fri Mar 14 23:01:15 PDT 2008


>From 2527b35ff8eeacf9f42d529c12523f2c375295c8 Mon Sep 17 00:00:00 2001
From: nmiell at gmail.com <Nicholas Miell>
Date: Fri, 14 Mar 2008 22:23:19 -0700
Subject: [PATCH] Fix the SSE related AMD64 build breakage

The introduction of pixman_have_sse() copied the #ifdef __amd64__
found around pixman_have_mmx() in pixman-mmx.c but didn't include the
equivalents of the macros in pixman-mmx.h. As a result, the AMD64 link
fails because the pixman_have_sse() function doesn't exist.

I also introduced header inclusion guards to pixman-mmx.h and
pixman-sse.h while I was at it.
---
 pixman/pixman-mmx.h |    5 +++++
 pixman/pixman-sse.h |   15 +++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

SSE support doesn't exist yet and it's already broken on AMD64. *sigh*

diff --git a/pixman/pixman-mmx.h b/pixman/pixman-mmx.h
index a74d4ba..611e1ad 100644
--- a/pixman/pixman-mmx.h
+++ b/pixman/pixman-mmx.h
@@ -26,6 +26,9 @@
  * 
  * Based on work by Owen Taylor
  */
+#ifndef _PIXMAN_MMX_H_
+#define _PIXMAN_MMX_H_
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -313,3 +316,5 @@ fbCompositeOver_x888x8x8888mmx (pixman_op_t      op,
 				uint16_t     height);
 
 #endif /* USE_MMX */
+
+#endif /* _PIXMAN_MMX_H_ */
diff --git a/pixman/pixman-sse.h b/pixman/pixman-sse.h
index 9ef7574..65cf21d 100644
--- a/pixman/pixman-sse.h
+++ b/pixman/pixman-sse.h
@@ -23,6 +23,9 @@
  * Author:  Rodrigo Kumpera (kumpera at gmail.com)
  * 
  */
+#ifndef _PIXMAN_SSE_H_
+#define _PIXMAN_SSE_H_
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -31,8 +34,20 @@
 
 #ifdef USE_SSE2
 
+#if !defined(__amd64__) && !defined(__x86_64__)
 pixman_bool_t pixman_have_sse(void);
+#else
+#define pixman_have_sse() TRUE
+#endif
+
+#else
+#define pixman_have_sse() FALSE
+#endif
+
+#ifdef USE_SSE2
 
 void fbComposeSetupSSE(void);
 
 #endif /* USE_SSE2 */
+
+#endif /* _PIXMAN_SSE_H_ */
-- 
1.5.4.1


-- 
Nicholas Miell <nmiell at comcast.net>



More information about the cairo mailing list