From owner-svn-src-head@freebsd.org Tue Aug 1 18:26:21 2017 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 E9394DB64C1; Tue, 1 Aug 2017 18:26:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B67CF63DD6; Tue, 1 Aug 2017 18:26:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71IQK84072220; Tue, 1 Aug 2017 18:26:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71IQK5j072218; Tue, 1 Aug 2017 18:26:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201708011826.v71IQK5j072218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Aug 2017 18:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321887 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 321887 X-SVN-Commit-Repository: base 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.23 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: Tue, 01 Aug 2017 18:26:22 -0000 Author: bdrewery Date: Tue Aug 1 18:26:20 2017 New Revision: 321887 URL: https://svnweb.freebsd.org/changeset/base/321887 Log: CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld. - bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first in PATH. - Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it overrides the PATH set in bsd.compiler.mk in sub-makes. The PATH set in bsd.compiler.mk is not exported and doing so would cause it to then override the BPATH set from environment. The only sane solution is to prepend into BPATH as needed. CCACHE_PATH could possibly be used for some of this as well. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/mk/bsd.compiler.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 1 18:25:04 2017 (r321886) +++ head/Makefile.inc1 Tue Aug 1 18:26:20 2017 (r321887) @@ -444,7 +444,7 @@ BUILD_ARCH!= uname -p .endif .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp -BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Tue Aug 1 18:25:04 2017 (r321886) +++ head/share/mk/bsd.compiler.mk Tue Aug 1 18:26:20 2017 (r321887) @@ -82,8 +82,11 @@ PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)? ${var}:= ${CCACHE_BIN} ${${var}} .endif .endfor -.elif empty(PATH:M*${CCACHE_WRAPPER_PATH}*) +.else +# Need to ensure CCACHE_WRAPPER_PATH is the first in ${PATH} +PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g} PATH:= ${CCACHE_WRAPPER_PATH}:${PATH} +CCACHE_WRAPPER_PATH_PFX= ${CCACHE_WRAPPER_PATH}: .endif # ${CCACHE_BUILD_TYPE} == "command" # GCC does not need the CCACHE_CPP2 hack enabled by default in devel/ccache. # The port enables it due to ccache passing preprocessed C to clang