Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2015 23:52:08 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290691 - head/share/mk
Message-ID:  <201511112352.tABNq86b095629@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Nov 11 23:52:08 2015
New Revision: 290691
URL: https://svnweb.freebsd.org/changeset/base/290691

Log:
  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

Modified:
  head/share/mk/local.init.mk
  head/share/mk/local.meta.sys.mk

Modified: head/share/mk/local.init.mk
==============================================================================
--- head/share/mk/local.init.mk	Wed Nov 11 23:10:09 2015	(r290690)
+++ head/share/mk/local.init.mk	Wed Nov 11 23:52:08 2015	(r290691)
@@ -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

Modified: head/share/mk/local.meta.sys.mk
==============================================================================
--- head/share/mk/local.meta.sys.mk	Wed Nov 11 23:10:09 2015	(r290690)
+++ head/share/mk/local.meta.sys.mk	Wed Nov 11 23:52:08 2015	(r290691)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511112352.tABNq86b095629>