diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-11-11 23:52:08 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-11-11 23:52:08 +0000 |
commit | eab2be5c814def42cfea339474a165dee582d7ca (patch) | |
tree | bf3340cb3419b2a9aa08d7e7adc612f8612a36ff /share | |
parent | 330433bf80e6b5fa8248f71ab7bd5c55c95d4d2a (diff) | |
download | FreeBSD-src-eab2be5c814def42cfea339474a165dee582d7ca.zip FreeBSD-src-eab2be5c814def42cfea339474a165dee582d7ca.tar.gz |
Move META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, which
centralizes the handling of CC and HOST_CC.
This fixes a bug with WITH_CCACHE_BUILD when using MACHINE=host since
CC is overridden in local.init.mk via src.opts.mk long before bsd.compiler.mk
is included.
Originally the ccache implementation was placed in local.init.mk but moved
to bsd.compiler.mk as it seemed more proper and avoided other ordering
issues.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/local.init.mk | 6 | ||||
-rw-r--r-- | share/mk/local.meta.sys.mk | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/share/mk/local.init.mk b/share/mk/local.init.mk index a30ed0e..8954473 100644 --- a/share/mk/local.init.mk +++ b/share/mk/local.init.mk @@ -29,12 +29,6 @@ CXXFLAGS_LAST+= -I/usr/include .if ${.MAKE.DEPENDFILE:E} != "host" UPDATE_DEPENDFILE?= no .endif -HOST_CC?= /usr/bin/cc -CC= ${HOST_CC} -HOST_CXX?= /usr/bin/c++ -CXX= ${HOST_CXX} -HOST_CPP?= /usr/bin/cpp -CPP= ${HOST_CPP} HOST_CFLAGS+= -DHOSTPROG CFLAGS+= ${HOST_CFLAGS} .endif diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 9aac03d..87e9f01 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -218,6 +218,15 @@ CPP?= ${HOST_CPP} .endif .endif +.if ${MACHINE} == "host" +HOST_CC?= /usr/bin/cc +CC= ${HOST_CC} +HOST_CXX?= /usr/bin/c++ +CXX= ${HOST_CXX} +HOST_CPP?= /usr/bin/cpp +CPP= ${HOST_CPP} +.endif + .if ${MACHINE:Nhost:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE} # cross-building .if !defined(FREEBSD_REVISION) |