Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Feb 2011 11:52:29 -0800
From:      Rob Farmer <rfarmer@predatorlabs.net>
To:        Warner Losh <imp@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r218130 - head
Message-ID:  <AANLkTi=JKYeACFoY8wiGMFabqHbR%2BMED%2B867=Ld_Heeu@mail.gmail.com>
In-Reply-To: <201101311517.p0VFHl9F028038@svn.freebsd.org>
References:  <201101311517.p0VFHl9F028038@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 31, 2011 at 7:17 AM, Warner Losh <imp@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=JKYeACFoY8wiGMFabqHbR%2BMED%2B867=Ld_Heeu>