Separate out enabling building clang and/or gcc for the system and
authorimp <imp@FreeBSD.org>
Fri, 18 Apr 2014 17:03:58 +0000 (17:03 +0000)
committerimp <imp@FreeBSD.org>
Fri, 18 Apr 2014 17:03:58 +0000 (17:03 +0000)
commit05af977d7ba66a5a516211f67fae465e5bf34863
tree04a3a7ae5a3e2ee005a82992aa612466d9e72ea6
parent45481ab5835a397fc7869e0509e561e115d872e6
Separate out enabling building clang and/or gcc for the system and
building clang and/or gcc as the bootstrap compiler. Normally, the
default compiler is used. WITH_CLANG_BOOTSTRAP and/or
WITH_GCC_BOOTSTRAP will enable building these compilers as part
bootstrap phase.  WITH/WITHOUT_CLANG_IS_CC controls which compiler is
used by default for the bootstrap phase, as well as which compiler is
installed as cc.  buildworld now successfully completes building the
cross compiler with WITHOUT_CLANG=t and WITHOUT_GCC=t and produces a
built system with neither of these included.

Similarlly, MK_BINUTILS_BOOTSTRAP controls whether binutils is built
during this phase.

WITHOUT_CROSS_COMPILER will now force MK_BINUTILS_BOOTSTRAP=no,
MK_CLANG_BOOTSTRAP=no and MK_GCC_BOOTSTRAP=no.

BOOTSTRAP_COMPILER was considered, but rejected, since pc98 needs both
clang and gcc to bootstrap still. It should be revisisted in the
future if this requirement goes away. Values should be gcc, clang or
none. It could also be a list.

The odd interaction with Xfoo cross/external tools needs work, but
is beyond the scope of this change as well.
12 files changed:
Makefile.inc1
share/mk/bsd.own.mk
tools/build/options/WITHOUT_BINUTILS
tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP [new file with mode: 0644]
tools/build/options/WITHOUT_CLANG
tools/build/options/WITHOUT_CLANG_BOOTSTRAP [new file with mode: 0644]
tools/build/options/WITHOUT_CROSS_COMPILER
tools/build/options/WITHOUT_GCC
tools/build/options/WITHOUT_GCC_BOOTSTRAP [new file with mode: 0644]
tools/build/options/WITH_CLANG
tools/build/options/WITH_CLANG_BOOTSTRAP [new file with mode: 0644]
tools/build/options/WITH_GCC_BOOTSTRAP [new file with mode: 0644]