From owner-svn-src-all@FreeBSD.ORG Tue Jan 11 19:00:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E57F7106564A; Tue, 11 Jan 2011 19:00:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4145C8FC2B; Tue, 11 Jan 2011 19:00:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E218146B0D; Tue, 11 Jan 2011 14:00:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E504A8A009; Tue, 11 Jan 2011 14:00:08 -0500 (EST) From: John Baldwin To: Doug Barton Date: Tue, 11 Jan 2011 14:00:07 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101110847.24284.jhb@freebsd.org> <4D2CA626.4030207@FreeBSD.org> In-Reply-To: <4D2CA626.4030207@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101111400.08224.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 11 Jan 2011 14:00:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217213 - head/lib/bind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 19:00:17 -0000 On Tuesday, January 11, 2011 1:49:10 pm Doug Barton wrote: > On 01/11/2011 05:47, John Baldwin wrote: > > On Tuesday, January 11, 2011 12:04:56 am Doug Barton wrote: > >> On 01/10/2011 11:33, John Baldwin wrote: > >>> On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: > >> > >>>> # Use the right version of the atomic.h file from lib/isc > >>>> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} > >>>> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > >>> > >>> This should use MACHINE_CPUARCH instead of MACHINE_ARCH? > >> > >> When this block was first written I don't think _CPUARCH existed at all, > >> and/or had not been MFC'ed. Subsequently, nwhitehorn made the change in > >> r209886 to use _CPUARCH in both places, however the diff from Warner's > >> commit in r217071 (which is what I based my change on) clearly showed > >> _ARCH > >> > > (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). > >> So, I'm not sure where svn went sideways there, but it's definitely "odd." > > > > Huh? Warner's change only used MACHINE_CPUARCH: > > That's not what I said at all. I took a lot of time to research and > document what I wrote, the least you could do is take a few minutes to > read it carefully. > > This is the diff from the previous version to nwhitehorn's version: > > --- head/lib/bind/config.mk 2009/06/01 21:58:59 193280 > +++ head/lib/bind/config.mk 2010/07/10 17:46:53 209886 > @@ -45,7 +45,7 @@ > CFLAGS+= -DUSE_MD5 > > # Endianness > -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" > +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" > CFLAGS+= -DWORDS_BIGENDIAN > .endif > > @@ -67,7 +67,7 @@ > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" And _this_ line is still MACHINE_ARCH here, which is wrong. This should use MACHINE_CPUARCH. That is the only line I have been talking about the entire time. > ISC_ATOMIC_ARCH= x86_32 > .else > -ISC_ATOMIC_ARCH= ${MACHINE_ARCH} > +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} > .endif > > # Optional features > > > This is the diff from what should have been Nathan's version to Warner's: > > --- head/lib/bind/config.mk 2010/07/10 17:46:53 209886 > +++ head/lib/bind/config.mk 2011/01/06 21:07:51 217071 > @@ -1,6 +1,7 @@ > # $FreeBSD$ > > .include > +.include > > # BIND version number > .if defined(BIND_DIR) && exists(${BIND_DIR}/version) > @@ -45,7 +46,7 @@ > CFLAGS+= -DUSE_MD5 > > # Endianness > -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" > +.if ${TARGET_ENDIANNESS} == 4321 > CFLAGS+= -DWORDS_BIGENDIAN > .endif > > @@ -64,11 +65,7 @@ > .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/} Note here how in the Warner's diff, he replaced one use of MACHINE_ARCH (the amd64 and i386 comparisons) and one use of MACHINE_CPUARCH (the other cases) with always using MACHINE_CPUARCH. > > # Optional features > .if ${MK_BIND_LARGE_FILE} == "yes" > @@ -121,4 +118,3 @@ > > PTHREAD_DPADD= ${LIBPTHREAD} > PTHREAD_LDADD= -lpthread > > > Please note that the code Warner removed had the following line: > -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > > I have no idea how svn managed to fsck that up, but that is what I > reverted back to when I made the commit in r217213. If you're still > confused, please review the svn history yourself. svn did the right thing. The code was broken before Warner's fix. To be clear, this is all I think needs to change: Index: head/lib/bind/config.mk =================================================================== --- head/lib/bind/config.mk (revision 217272) +++ head/lib/bind/config.mk (working copy) @@ -65,7 +65,7 @@ .endif # Use the right version of the atomic.h file from lib/isc -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" ISC_ATOMIC_ARCH= x86_32 .else ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} -- John Baldwin