svn commit: r208964 - in head: . etc/mtree lib share/mk usr.bin

M. Warner Losh imp at bsdimp.com
Thu Jun 10 15:30:45 UTC 2010


In message: <201006091957.o59JvKbu025122 at svn.freebsd.org>
            Roman Divacky <rdivacky at freebsd.org> writes:
: Modified: head/share/mk/bsd.own.mk
: ==============================================================================
: --- head/share/mk/bsd.own.mk	Wed Jun  9 19:32:20 2010	(r208963)
: +++ head/share/mk/bsd.own.mk	Wed Jun  9 19:57:20 2010	(r208964)
: @@ -288,6 +288,18 @@ _no_fdt= FDT
:  .endif
:  
:  #
: +# Default behaviour of MK_CLANG depends on the architecture.
: +#
: +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
: +    ${MACHINE_ARCH} == "powerpc"
: +_clang_yes=CLANG
: +_clang_no=
: +.else
: +_clang_yes=
: +_clang_no=CLANG
: +.endif

We really should *NOT* be encoding architecture stuff like this into
bsd.own.mk.  Sometimes the right thing here is MACHINE_ARCH, and for
the moment, since clang is not a bootstrap tool, this is correct.
However, once clang is a bootstrap tool, this will be incorrect
because during the bootstrapping for cross building TARGET_ARCH is
what should be tested.  We have the same problem with the FTD stuff
that was recently committed.  raj@ and I have been talking about the
best ways to fix it.

I'm merging my tbemd code in the next few days/weeks and hope to start
to address this problem.  It already starts to address the insanity we
have in the Makefile.incs.

Warner


More information about the svn-src-all mailing list