summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-03-19 17:53:12 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-03-19 17:53:12 +0000
commitbf6b2d3b02efa9043d4008710630a7efaaba665e (patch)
tree697c37abeda84d9c2a39d570294e5bee5c32f6b2
parent43c2fec64cad00ce398b7e4f97007176498d80d5 (diff)
Only use atomic gcc builtins on arches that support them.
With help of kettenis@ guenther@ and miod@.
-rw-r--r--lib/fontconfig/Makefile.inc8
-rw-r--r--lib/fontconfig/common/config.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/fontconfig/Makefile.inc b/lib/fontconfig/Makefile.inc
index 5f0c63aa9..06060ebdd 100644
--- a/lib/fontconfig/Makefile.inc
+++ b/lib/fontconfig/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.1 2013/03/09 14:34:40 matthieu Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2013/03/19 17:53:11 matthieu Exp $
X11BASE ?= /usr/X11R6
@@ -16,4 +16,10 @@ CFLAGS += -I${FONTCONFIG} \
-I${.CURDIR}/../common \
-I${.CURDIR}
+.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \
+ ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "sparc64"
+CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES=1
+.endif
+
NOPROFILE =
diff --git a/lib/fontconfig/common/config.h b/lib/fontconfig/common/config.h
index 1836d1fd1..27713a17e 100644
--- a/lib/fontconfig/common/config.h
+++ b/lib/fontconfig/common/config.h
@@ -90,7 +90,7 @@
#define HAVE_GETUID 1
/* Have Intel __sync_* atomic primitives */
-#define HAVE_INTEL_ATOMIC_PRIMITIVES 1
+/* #undef HAVE_INTEL_ATOMIC_PRIMITIVES 1 */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1