Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2012 00:49:34 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r230797 - in stable/7/lib/bind: . isc/isc
Message-ID:  <201201310049.q0V0nY4q010584@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Tue Jan 31 00:49:34 2012
New Revision: 230797
URL: http://svn.freebsd.org/changeset/base/230797

Log:
  MFC r217071 and r217213:
  
  Make the setting of the BIND CFLAG -DWORDS_BIGENDIAN conditional on the
  TARGET_ENDIANNESS knob from bsd.endian.mk so that we can avoid having to
  special-case each arch.
  
  MFC r224093 (in part):
  
  Stop claiming that we support atomic ops except on arches where we know
  that they work. Many users have reported problems on the other arches,
  so until they can get fixed we'll take the safe route.

Modified:
  stable/7/lib/bind/config.mk
  stable/7/lib/bind/isc/isc/platform.h
Directory Properties:
  stable/7/lib/bind/   (props changed)

Modified: stable/7/lib/bind/config.mk
==============================================================================
--- stable/7/lib/bind/config.mk	Tue Jan 31 00:49:04 2012	(r230796)
+++ stable/7/lib/bind/config.mk	Tue Jan 31 00:49:34 2012	(r230797)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 .include <bsd.own.mk>
+.include <bsd.endian.mk>
 
 # BIND version number
 .if defined(BIND_DIR) && exists(${BIND_DIR}/version)
@@ -45,7 +46,7 @@ CFLAGS+=	-DOPENSSL
 CFLAGS+=	-DUSE_MD5
 
 # Endianness
-.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
+.if ${TARGET_ENDIANNESS} == 4321
 CFLAGS+=	-DWORDS_BIGENDIAN
 .endif
 
@@ -66,8 +67,10 @@ CFLAGS+=	-I${LIB_BIND_DIR}
 # Use the right version of the atomic.h file from lib/isc
 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
 ISC_ATOMIC_ARCH=	x86_32
+.elif ${MACHINE_ARCH} == "ia64"
+ISC_ATOMIC_ARCH=	ia64
 .else
-ISC_ATOMIC_ARCH=	${MACHINE_ARCH}
+ISC_ATOMIC_ARCH=	noatomic
 .endif
 
 # Link against BIND libraries

Modified: stable/7/lib/bind/isc/isc/platform.h
==============================================================================
--- stable/7/lib/bind/isc/isc/platform.h	Tue Jan 31 00:49:04 2012	(r230796)
+++ stable/7/lib/bind/isc/isc/platform.h	Tue Jan 31 00:49:34 2012	(r230797)
@@ -238,24 +238,52 @@
  * If the "xadd" operation is available on this architecture,
  * ISC_PLATFORM_HAVEXADD will be defined.
  */
+/*
+ * FreeBSD local modification, preserve this over upgrades
+ */
+#if defined (__i386__) || defined (__amd64__) || defined (__ia64__)
 #define ISC_PLATFORM_HAVEXADD 1
+#else
+#undef ISC_PLATFORM_HAVEXADD
+#endif
 
 /*
  * If the "atomic swap" operation is available on this architecture,
  * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
  */
+/*
+ * FreeBSD local modification, preserve this over upgrades
+ */
+#if defined (__i386__) || defined (__amd64__) || defined (__ia64__)
 #define ISC_PLATFORM_HAVEATOMICSTORE 1
+#else
+#undef ISC_PLATFORM_HAVEATOMICSTORE
+#endif
 
 /*
  * If the "compare-and-exchange" operation is available on this architecture,
  * ISC_PLATFORM_HAVECMPXCHG will be defined.
  */
+/*
+ * FreeBSD local modification, preserve this over upgrades
+ */
+#if defined (__i386__) || defined (__amd64__) || defined (__ia64__)
 #define ISC_PLATFORM_HAVECMPXCHG 1
+#else
+#undef ISC_PLATFORM_HAVECMPXCHG
+#endif
 
 /*
  * Define if gcc ASM extension is available
  */
+/*
+ * FreeBSD local modification, preserve this over upgrades
+ */
+#if defined (__i386__) || defined (__amd64__) || defined (__ia64__)
 #define ISC_PLATFORM_USEGCCASM 1
+#else
+#undef ISC_PLATFORM_USEGCCASM
+#endif
 
 /*
  * Define if Tru64 style ASM syntax must be used.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201310049.q0V0nY4q010584>