aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2017-04-13 22:07:34 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2017-04-13 22:07:34 +0000
commit848d5e929bde07f23ba51b170537a82d9756d340 (patch)
tree2432445e23162b2fe3217b135bf6d2c8b1e2e61c /Makefile
parent19625f29fe7bd0af6b28132a66b0dde570e03e49 (diff)
downloadsrc-848d5e929bde07f23ba51b170537a82d9756d340.tar.gz
src-848d5e929bde07f23ba51b170537a82d9756d340.zip
Cache compiler metadata and reuse it at installworld time.
Right after cross-tools, a compiler-metadata.mk file is created that stores all of the bsd.compiler.mk metadata. It is then read in with a fail-safe during installworld time. The file is explicitly removed when invoking cross-tools to ensure that a stale file is not left around from odd manual 'make _cross-tools' -> 'make installworld' invocations. This fixes several issues: - With WITH_SYSTEM_COMPILER (default yes on head and no on releng/11.0): If you build on a system where the bootstrap compiler does not build due to the host compiler matching the in-tree one, but then installworld on another system where that logic fails (a bootstrap compiler is needed), the installworld immediately fails with: sh: cc: not found Note that fixing this logic may then hit a case where a rebuild is attempted in installworld. Normally cc would be ran with 'CFLAGS+=ERROR-tried-to-rebuild-during-make-install' to cause an error such as: cc: error: no such file or directory: 'ERROR-tried-to-rebuild-during-make-install' However, now it will just fail with the 'cc: not found' error. Inspection of the compile line will show 'ERROR-tried-to-rebuild-during-make-install'; It's not useful to set CC to anything other than 'cc' during install as it is more helpful to see the attempted compile rather than some other bogus error. - This now avoids running bsd.compiler.mk (cc executions) even more during installworld. There are compiler-dependent SUBDIR in the tree which required having a compiler during install. There is at least 1 case where CC is still executed in the install, such as from a LOOKUP!= in secure/lib/libcrypto/Makefile.inc checking for 'vzeroall' support. This is not significant for installworld as the lookup has a fallback (and hides its error) and only modifies CFLAGS, thus it's not worth fixing. PR: 212877 MFC after: 2 weeks Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=316794
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4190946cdaf6..e5cfe7b3fb9e 100644
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
installworld kernel-toolchain libraries lint maninstall \
obj objlink rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
- _build-tools _cross-tools _includes _libraries \
+ _build-tools _compiler-metadata _cross-tools _includes _libraries \
build32 distribute32 install32 buildsoft distributesoft installsoft \
builddtb xdev xdev-build xdev-install \
xdev-links native-xtools stageworld stagekernel stage-packages \