From owner-svn-src-all@FreeBSD.ORG Wed Feb 2 20:20:53 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 85A661065672; Wed, 2 Feb 2011 20:20:53 +0000 (UTC) (envelope-from rfarmer@predatorlabs.net) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 93FDD8FC15; Wed, 2 Feb 2011 20:20:52 +0000 (UTC) Received: by wwf26 with SMTP id 26so361621wwf.31 for ; Wed, 02 Feb 2011 12:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=predatorlabs.net; s=google; h=domainkey-signature:mime-version:x-originating-ip:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DksAdhrw43vnnQ+T5iEoAdRy/vPQ2wLRPllyVAu/t4I=; b=fJ5u+WsU5+FzPLLx0QYC1301BDgtQKwgnIz92QDP/83HaOtkw3T/DrodokLdKurhdG W0n03v2KRaW6wlDviaB3Y1sUiqDO8fHdPkeZfXoYTBmlX6/BBucbNr2WudMt2ZXXvNq5 E9lNBViN1XHXnoIw0gQTOzIzFlVLrdBSiwbxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=predatorlabs.net; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=fhIdxHXSIDYpEjFmto/iMc2o5HjLCF1jK4cAnpy9NuRyNcjsf47AOV7sdUasN9DaHI 9twnsM/9FihFRE4J/yeab3FMdyq/+BjUsYZ5o420z++IL0aTFJmIXgQdfGzSrwLmRnmi X5rdjFeIqjtBQIJW1GHeRbme/u7HcCxm8gK7E= MIME-Version: 1.0 Received: by 10.216.179.207 with SMTP id h57mr8979554wem.20.1296676349926; Wed, 02 Feb 2011 11:52:29 -0800 (PST) Received: by 10.216.242.130 with HTTP; Wed, 2 Feb 2011 11:52:29 -0800 (PST) X-Originating-IP: [128.95.133.25] In-Reply-To: <201101311517.p0VFHl9F028038@svn.freebsd.org> References: <201101311517.p0VFHl9F028038@svn.freebsd.org> Date: Wed, 2 Feb 2011 11:52:29 -0800 Message-ID: From: Rob Farmer To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r218130 - head 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: Wed, 02 Feb 2011 20:20:53 -0000 On Mon, Jan 31, 2011 at 7:17 AM, Warner Losh wrote: > Author: imp > Date: Mon Jan 31 15:17:47 2011 > New Revision: 218130 > URL: http://svn.freebsd.org/changeset/base/218130 > > Log: > =A0Move the architecture guessing from Makefile.inc1 to Makefile. =A0We > =A0need to do this because variables specified on the command line > =A0override those specified in the Makefile. =A0This is why we also moved > =A0from TARGET to _TARGET in Makefile, and then set TARGET on the command > =A0line when we fork a submake with Makefile.inc1. > > =A0This makes mips/mips work again, even without the workaround committed= to > =A0lib/libc/Makefile. > > Modified: > =A0head/Makefile > =A0head/Makefile.inc1 > > Modified: head/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Makefile =A0 =A0 =A0 Mon Jan 31 11:50:11 2011 =A0 =A0 =A0 =A0(r2= 18129) > +++ head/Makefile =A0 =A0 =A0 Mon Jan 31 15:17:47 2011 =A0 =A0 =A0 =A0(r2= 18130) > @@ -126,6 +126,38 @@ BINMAKE=3D \ > =A0 =A0 =A0 =A0-m ${.CURDIR}/share/mk > =A0_MAKE=3D PATH=3D${PATH} ${BINMAKE} -f Makefile.inc1 > > +# Guess machine architecture from machine type, and vice versa. > +.if !defined(TARGET_ARCH) && defined(TARGET) > +_TARGET_ARCH=3D =A0${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/= } > +.elif !defined(TARGET) && defined(TARGET_ARCH) && \ > + =A0 =A0${TARGET_ARCH} !=3D ${MACHINE_ARCH} > +_TARGET=3D =A0 =A0 =A0 =A0 =A0 =A0 =A0 ${TARGET_ARCH:C/mips.*e[lb]/mips/= :C/armeb/arm/} > +.endif > +# Legacy names, for a transition period mips:mips -> mipsel:mips > +.if defined(TARGET) && defined(TARGET_ARCH) && \ > + =A0 =A0${TARGET_ARCH} =3D=3D "mips" && ${TARGET} =3D=3D "mips" > +.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb= " > +.if defined(TARGET_BIG_ENDIAN) > +_TARGET_ARCH=3Dmipseb > +.else > +_TARGET_ARCH=3Dmipsel > +.endif > +.endif > +# arm with TARGET_BIG_ENDIAN -> armeb > +.if defined(TARGET_ARCH) && ${TARGET_ARCH} =3D=3D "arm" && defined(TARGE= T_BIG_ENDIAN) > +.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. =A0us= e armeb" > +_TARGET_ARCH=3Darmeb > +.endif > +.if defined(TARGET) && !defined(_TARGET) > +_TARGET=3D${TARGET} > +.endif > +.if defined(TARGET_ARCH) && !defined(_TARGET_ARCH) > +_TARGET_ARCH=3D${TARGET_ARCH} > +.endif > +# Otherwise, default to current machine type and architecture. > +_TARGET?=3D =A0 =A0 =A0${MACHINE} > +_TARGET_ARCH?=3D ${MACHINE_ARCH} > + > =A0# > =A0# Make sure we have an up-to-date make(1). Only world and buildworld > =A0# should do this as those are the initial targets used for upgrades. > @@ -173,8 +205,7 @@ cleanworld: > =A0# > > =A0${TGTS}: > - =A0 =A0 =A0 ${_+_}@cd ${.CURDIR}; \ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ${_MAKE} ${.TARGET} > + =A0 =A0 =A0 ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=3D${_TARGET} TARGET_AR= CH=3D${_TARGET_ARCH} ${.TARGET} > > =A0# Set a reasonable default > =A0.MAIN: all > > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Makefile.inc1 =A0Mon Jan 31 11:50:11 2011 =A0 =A0 =A0 =A0(r21812= 9) > +++ head/Makefile.inc1 =A0Mon Jan 31 15:17:47 2011 =A0 =A0 =A0 =A0(r21813= 0) > @@ -116,32 +116,6 @@ VERSION!=3D =A0uname -srp > =A0VERSION+=3D =A0 =A0 =A0${OSRELDATE} > =A0.endif > > -# Guess machine architecture from machine type, and vice versa. > -.if !defined(TARGET_ARCH) && defined(TARGET) > -TARGET_ARCH=3D =A0 ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/= } > -.elif !defined(TARGET) && defined(TARGET_ARCH) && \ > - =A0 =A0${TARGET_ARCH} !=3D ${MACHINE_ARCH} > -TARGET=3D =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${TARGET_ARCH:C/mips.*e[lb]/mip= s/:C/armeb/arm/} > -.endif > -# Legacy names, for a transition period mips:mips -> mipsel:mips > -.if defined(TARGET) && defined(TARGET_ARCH) && \ > - =A0 =A0${TARGET_ARCH} =3D=3D "mips" && ${TARGET} =3D=3D "mips" > -.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb= " > -.if defined(TARGET_BIG_ENDIAN) > -TARGET_ARCH=3Dmipseb > -.else > -TARGET_ARCH=3Dmipsel > -.endif > -.endif > -# arm with TARGET_BIG_ENDIAN -> armeb > -.if defined(TARGET_ARCH) && ${TARGET_ARCH} =3D=3D "arm" && defined(TARGE= T_BIG_ENDIAN) > -.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. =A0us= e armeb" > -TARGET_ARCH=3Darmeb > -.endif > -# Otherwise, default to current machine type and architecture. > -TARGET?=3D =A0 =A0 =A0 ${MACHINE} > -TARGET_ARCH?=3D =A0${MACHINE_ARCH} > - > =A0KNOWN_ARCHES?=3D amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips m= ipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerp= c powerpc64/powerpc sparc64 sparc64/sun4v > =A0.if ${TARGET} =3D=3D ${TARGET_ARCH} > =A0_t=3D =A0 =A0 =A0 =A0 =A0 =A0${TARGET} > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > Hello, This breaks "make world" as used by ports tinderbox: [rfarmer@turquoise] /usr/src# env DESTDIR=3D/tmp/world make -DNO_CLEAN worl= d -------------------------------------------------------------- >>> make world started on Wed Feb 2 11:45:08 PST 2011 -------------------------------------------------------------- "/usr/src/Makefile.inc1", line 120: Malformed conditional (${TARGET} =3D=3D ${TARGET_ARCH}) "/usr/src/Makefile.inc1", line 122: if-less else "/usr/src/Makefile.inc1", line 124: if-less endif "/usr/src/Makefile.inc1", line 127: Unknown target :. *** Error code 1 Stop in /usr/src. --=20 Rob Farmer