Date: Wed, 2 Feb 2011 15:53:20 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: Warner Losh <imp@bsdimp.com> Cc: svn-src-head@freebsd.org, Warner Losh <imp@freebsd.org>, svn-src-all@freebsd.org, Rob Farmer <rfarmer@predatorlabs.net>, src-committers@freebsd.org Subject: Re: svn commit: r218130 - head Message-ID: <AANLkTim%2Bjqz_EVUGhKv1-8Qsxbr6z5u%2BXxoVxni3yo=-@mail.gmail.com> In-Reply-To: <4D49EA0A.8000406@bsdimp.com> References: <201101311517.p0VFHl9F028038@svn.freebsd.org> <AANLkTi=JKYeACFoY8wiGMFabqHbR%2BMED%2B867=Ld_Heeu@mail.gmail.com> <4D49EA0A.8000406@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 2, 2011 at 3:34 PM, Warner Losh <imp@bsdimp.com> wrote: > On 02/02/2011 12:52, Rob Farmer wrote: >> >> On Mon, Jan 31, 2011 at 7:17 AM, Warner Losh<imp@freebsd.org> =A0wrote: >>> >>> 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 mov= ed >>> =A0from TARGET to _TARGET in Makefile, and then set TARGET on the comma= nd >>> =A0line when we fork a submake with Makefile.inc1. >>> >>> =A0This makes mips/mips work again, even without the workaround committ= ed >>> 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(= r218129) >>> +++ head/Makefile =A0 =A0 =A0 Mon Jan 31 15:17:47 2011 =A0 =A0 =A0 =A0(= r218130) >>> @@ -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)&& =A0defined(TARGET) >>> +_TARGET_ARCH=3D =A0${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipse= l/} >>> +.elif !defined(TARGET)&& =A0defined(TARGET_ARCH)&& =A0\ >>> + =A0 =A0${TARGET_ARCH} !=3D ${MACHINE_ARCH} >>> +_TARGET=3D =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 -> =A0mipsel:mips >>> +.if defined(TARGET)&& =A0defined(TARGET_ARCH)&& =A0\ >>> + =A0 =A0${TARGET_ARCH} =3D=3D "mips"&& =A0${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 -> =A0armeb >>> +.if defined(TARGET_ARCH)&& =A0${TARGET_ARCH} =3D=3D "arm"&& >>> =A0defined(TARGET_BIG_ENDIAN) >>> +.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. =A0= use >>> armeb" >>> +_TARGET_ARCH=3Darmeb >>> +.endif >>> +.if defined(TARGET)&& =A0!defined(_TARGET) >>> +_TARGET=3D${TARGET} >>> +.endif >>> +.if defined(TARGET_ARCH)&& =A0!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_ARCH=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(r218= 129) >>> +++ head/Makefile.inc1 =A0Mon Jan 31 15:17:47 2011 =A0 =A0 =A0 =A0(r218= 130) >>> @@ -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)&& =A0defined(TARGET) >>> -TARGET_ARCH=3D =A0 ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipse= l/} >>> -.elif !defined(TARGET)&& =A0defined(TARGET_ARCH)&& =A0\ >>> - =A0 =A0${TARGET_ARCH} !=3D ${MACHINE_ARCH} >>> -TARGET=3D =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${TARGET_ARCH:C/mips.*e[lb]/m= ips/:C/armeb/arm/} >>> -.endif >>> -# Legacy names, for a transition period mips:mips -> =A0mipsel:mips >>> -.if defined(TARGET)&& =A0defined(TARGET_ARCH)&& =A0\ >>> - =A0 =A0${TARGET_ARCH} =3D=3D "mips"&& =A0${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 -> =A0armeb >>> -.if defined(TARGET_ARCH)&& =A0${TARGET_ARCH} =3D=3D "arm"&& >>> =A0defined(TARGET_BIG_ENDIAN) >>> -.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. =A0= use >>> 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 >>> mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips >>> powerpc 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 w= orld >> -------------------------------------------------------------- >>>>> >>>>> make world started on Wed Feb =A02 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. > > How does the ports tinderbox run make world? =A0Just as you've described = or > are there additional variables set? `make world DESTDIR=3D/' is broken. Based on the debug printf it's the recursive call into buildworld from world that's mucking up the order of things: $ make world DESTDIR=3D/ -------------------------------------------------------------- >>> make world started on Wed Feb 2 15:50:37 PST 2011 -------------------------------------------------------------- Entering buildworld "/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. Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim%2Bjqz_EVUGhKv1-8Qsxbr6z5u%2BXxoVxni3yo=->