Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2015 22:36:02 +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: r288157 - head/share/mk
Message-ID:  <201509232236.t8NMa2Th078671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Sep 23 22:36:01 2015
New Revision: 288157
URL: https://svnweb.freebsd.org/changeset/base/288157

Log:
  META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.
  
  In the first build the TOOLSDIR does not exit yet which causes CC to default
  to the sys.mk version.  Once a TOOLSDIR is created during the build though,
  this logic was changing CC to ${TOOLSDIR}/usr/bin/cc even though that file
  did not exist.  Thus CC went from 'cc' to '/usr/bin/cc' which forced a
  rebuild of everything while using the same compiler.  Check that TOOLSDIR is
  not empty to avoid this.  If there is actually a TOOLSDIR cc then it will be
  used and properly rebuild.
  
  Sponsored by:	EMC / Isilon Storage Division

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

Modified: head/share/mk/local.meta.sys.mk
==============================================================================
--- head/share/mk/local.meta.sys.mk	Wed Sep 23 22:23:59 2015	(r288156)
+++ head/share/mk/local.meta.sys.mk	Wed Sep 23 22:36:01 2015	(r288157)
@@ -214,6 +214,7 @@ TOOLSDIR?= ${HOST_OBJTOP}/tools
 .elif defined(STAGE_HOST_OBJTOP) && exists(${STAGE_HOST_OBJTOP}/usr/bin)
 TOOLSDIR?= ${STAGE_HOST_OBJTOP}
 .endif
+.if !empty(TOOLSDIR)
 .if ${.MAKE.LEVEL} == 0 && exists(${TOOLSDIR}/usr/bin)
 PATH:= ${PATH:S,:, ,g:@d@${exists(${TOOLSDIR}$d):?${TOOLSDIR}$d:}@:ts:}:${PATH}
 .export PATH
@@ -224,6 +225,7 @@ CXX?= ${TOOLSDIR}/usr/bin/c++
 .export HOST_CC CC CXX
 .endif
 .endif
+.endif
 
 .if ${MACHINE:Nhost:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE}
 # cross-building



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