From owner-svn-src-head@FreeBSD.ORG Thu Feb 3 00:06:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AA1C1065672; Thu, 3 Feb 2011 00:06:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 00C758FC12; Thu, 3 Feb 2011 00:06:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p13006XU076307; Wed, 2 Feb 2011 17:00:07 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D49F006.1030503@bsdimp.com> Date: Wed, 02 Feb 2011 17:00:06 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: Rob Farmer References: <201101311517.p0VFHl9F028038@svn.freebsd.org> <4D49EA0A.8000406@bsdimp.com> In-Reply-To: <4D49EA0A.8000406@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r218130 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2011 00:06:45 -0000 Rob, r218206 should fix the problem. Sorry for the hassle. Warner On 02/02/2011 16:34, Warner Losh wrote: > On 02/02/2011 12:52, Rob Farmer wrote: >> 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: >>> Move the architecture guessing from Makefile.inc1 to Makefile. We >>> need to do this because variables specified on the command line >>> override those specified in the Makefile. This is why we also moved >>> from TARGET to _TARGET in Makefile, and then set TARGET on the >>> command >>> line when we fork a submake with Makefile.inc1. >>> >>> This makes mips/mips work again, even without the workaround >>> committed to >>> lib/libc/Makefile. >>> >>> Modified: >>> head/Makefile >>> head/Makefile.inc1 >>> >>> Modified: head/Makefile >>> ============================================================================== >>> >>> --- head/Makefile Mon Jan 31 11:50:11 2011 (r218129) >>> +++ head/Makefile Mon Jan 31 15:17:47 2011 (r218130) >>> @@ -126,6 +126,38 @@ BINMAKE= \ >>> -m ${.CURDIR}/share/mk >>> _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 >>> >>> +# Guess machine architecture from machine type, and vice versa. >>> +.if !defined(TARGET_ARCH)&& defined(TARGET) >>> +_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} >>> +.elif !defined(TARGET)&& defined(TARGET_ARCH)&& \ >>> + ${TARGET_ARCH} != ${MACHINE_ARCH} >>> +_TARGET= ${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)&& \ >>> + ${TARGET_ARCH} == "mips"&& ${TARGET} == "mips" >>> +.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or >>> mipseb" >>> +.if defined(TARGET_BIG_ENDIAN) >>> +_TARGET_ARCH=mipseb >>> +.else >>> +_TARGET_ARCH=mipsel >>> +.endif >>> +.endif >>> +# arm with TARGET_BIG_ENDIAN -> armeb >>> +.if defined(TARGET_ARCH)&& ${TARGET_ARCH} == "arm"&& >>> defined(TARGET_BIG_ENDIAN) >>> +.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. >>> use armeb" >>> +_TARGET_ARCH=armeb >>> +.endif >>> +.if defined(TARGET)&& !defined(_TARGET) >>> +_TARGET=${TARGET} >>> +.endif >>> +.if defined(TARGET_ARCH)&& !defined(_TARGET_ARCH) >>> +_TARGET_ARCH=${TARGET_ARCH} >>> +.endif >>> +# Otherwise, default to current machine type and architecture. >>> +_TARGET?= ${MACHINE} >>> +_TARGET_ARCH?= ${MACHINE_ARCH} >>> + >>> # >>> # Make sure we have an up-to-date make(1). Only world and buildworld >>> # should do this as those are the initial targets used for upgrades. >>> @@ -173,8 +205,7 @@ cleanworld: >>> # >>> >>> ${TGTS}: >>> - ${_+_}@cd ${.CURDIR}; \ >>> - ${_MAKE} ${.TARGET} >>> + ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET} >>> TARGET_ARCH=${_TARGET_ARCH} ${.TARGET} >>> >>> # Set a reasonable default >>> .MAIN: all >>> >>> Modified: head/Makefile.inc1 >>> ============================================================================== >>> >>> --- head/Makefile.inc1 Mon Jan 31 11:50:11 2011 (r218129) >>> +++ head/Makefile.inc1 Mon Jan 31 15:17:47 2011 (r218130) >>> @@ -116,32 +116,6 @@ VERSION!= uname -srp >>> VERSION+= ${OSRELDATE} >>> .endif >>> >>> -# Guess machine architecture from machine type, and vice versa. >>> -.if !defined(TARGET_ARCH)&& defined(TARGET) >>> -TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} >>> -.elif !defined(TARGET)&& defined(TARGET_ARCH)&& \ >>> - ${TARGET_ARCH} != ${MACHINE_ARCH} >>> -TARGET= ${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)&& \ >>> - ${TARGET_ARCH} == "mips"&& ${TARGET} == "mips" >>> -.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or >>> mipseb" >>> -.if defined(TARGET_BIG_ENDIAN) >>> -TARGET_ARCH=mipseb >>> -.else >>> -TARGET_ARCH=mipsel >>> -.endif >>> -.endif >>> -# arm with TARGET_BIG_ENDIAN -> armeb >>> -.if defined(TARGET_ARCH)&& ${TARGET_ARCH} == "arm"&& >>> defined(TARGET_BIG_ENDIAN) >>> -.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. >>> use armeb" >>> -TARGET_ARCH=armeb >>> -.endif >>> -# Otherwise, default to current machine type and architecture. >>> -TARGET?= ${MACHINE} >>> -TARGET_ARCH?= ${MACHINE_ARCH} >>> - >>> KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips >>> mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips >>> mipsn32eb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v >>> .if ${TARGET} == ${TARGET_ARCH} >>> _t= ${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=/tmp/world make -DNO_CLEAN >> world >> -------------------------------------------------------------- >>>>> make world started on Wed Feb 2 11:45:08 PST 2011 >> -------------------------------------------------------------- >> "/usr/src/Makefile.inc1", line 120: Malformed conditional (${TARGET} >> == ${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. > > How does the ports tinderbox run make world? Just as you've described > or are there additional variables set? > > Warner > > >