From owner-svn-src-head@freebsd.org Wed Sep 23 22:36:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 858B1A072CF; Wed, 23 Sep 2015 22:36:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 766221E5E; Wed, 23 Sep 2015 22:36:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8NMa2dR078672; Wed, 23 Sep 2015 22:36:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8NMa2Th078671; Wed, 23 Sep 2015 22:36:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509232236.t8NMa2Th078671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 23 Sep 2015 22:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288157 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 22:36:02 -0000 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