svn commit: r217071 - head/lib/bind

Doug Barton dougb at FreeBSD.org
Sat Jan 8 05:14:00 UTC 2011


I've said before that I like to have the opportunity to pre-commit 
review patches in this area because at minimum it helps me to be aware 
of them for potential MFC purposes.

That said, I appreciate the help, especially with the more "exotic" 
arches that I don't have experience with.

A few comments below.

On 01/06/2011 13:07, Warner Losh wrote:
> Author: imp
> Date: Thu Jan  6 21:07:51 2011
> New Revision: 217071
> URL: http://svn.freebsd.org/changeset/base/217071
>
> Log:
>    Make this work on big endian MIPS, while not breaking it for small
>    endian mips.  This will also make it work automatically on all future
>    big endian platforms.
>
> Modified:
>    head/lib/bind/config.mk
>
> Modified: head/lib/bind/config.mk
> ==============================================================================
> --- head/lib/bind/config.mk	Thu Jan  6 21:04:00 2011	(r217070)
> +++ head/lib/bind/config.mk	Thu Jan  6 21:07:51 2011	(r217071)
> @@ -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_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64"
> +.if ${TARGET_ENDIANNESS} == 4321
>   CFLAGS+=	-DWORDS_BIGENDIAN
>   .endif

This is just the kind of solution I was hoping would be available, and 
exactly the kind I prefer, the no-maintenance kind. :)  Is this safe to 
MFC, or does it require bits that are only in HEAD atm? If the latter, 
can you please let me know when it's ready to go? Thanks.

> @@ -64,11 +65,7 @@ CFLAGS+=	-I${LIB_BIND_DIR}
>   .endif
>
>   # Use the right version of the atomic.h file from lib/isc
> -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
> -ISC_ATOMIC_ARCH=	x86_32
> -.else
> -ISC_ATOMIC_ARCH=	${MACHINE_CPUARCH}
> -.endif
> +ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/}

This change I am less enthusiastic about. It seems to me that it does 
the exact same thing, but while admittedly quite a bit more clever than 
I am capable of I find it less readable. Unless this is doing something 
more or better than the previous code I will likely revert this.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/



More information about the svn-src-head mailing list