diff options
author | imp <imp@FreeBSD.org> | 2014-04-18 17:03:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-04-18 17:03:58 +0000 |
commit | 05af977d7ba66a5a516211f67fae465e5bf34863 (patch) | |
tree | 04a3a7ae5a3e2ee005a82992aa612466d9e72ea6 /Makefile.inc1 | |
parent | 45481ab5835a397fc7869e0509e561e115d872e6 (diff) | |
download | FreeBSD-src-05af977d7ba66a5a516211f67fae465e5bf34863.zip FreeBSD-src-05af977d7ba66a5a516211f67fae465e5bf34863.tar.gz |
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.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 592cdda..c15a2ba 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1226,7 +1226,9 @@ _awk= usr.bin/awk _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" || ${MK_CLANG} != "no" +# We need to build tlbgen when we're building clang either as +# the bootstrap compiler, or as the part of the normal build. +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" _clang_tblgen= \ lib/clang/libllvmsupport \ lib/clang/libllvmtablegen \ @@ -1366,22 +1368,19 @@ _kgzip= usr.sbin/kgzip .endif .endif -.if ${XAS:M/*} == "" && ${MK_BINUTILS} != "no" +# If we're given an XAS, don't build binutils. +.if ${XAS:M/*} == "" && ${MK_BINUTILS_BOOTSTRAP} != "no" _binutils= gnu/usr.bin/binutils .endif # If an full path to an external cross compiler is given, don't build # a cross compiler. .if ${XCC:M/*} == "" && ${MK_CROSS_COMPILER} != "no" -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" +.if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang -.else -_cc= gnu/usr.bin/cc .endif - -# The boot2 for pc98 requires gcc. -.if ${TARGET} == "pc98" +.if ${MK_GCC_BOOTSTRAP} != "no" _cc= gnu/usr.bin/cc .endif .endif |