From owner-svn-src-all@freebsd.org Sat Jul 8 16:39:56 2017 Return-Path: Delivered-To: svn-src-all@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 EF1B7D9DA6E; Sat, 8 Jul 2017 16:39:56 +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 BE5E6A8F; Sat, 8 Jul 2017 16:39:56 +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 v68GdtSB090499; Sat, 8 Jul 2017 16:39:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68GdtmZ090498; Sat, 8 Jul 2017 16:39:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707081639.v68GdtmZ090498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 8 Jul 2017 16:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320806 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 320806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 16:39:57 -0000 Author: bdrewery Date: Sat Jul 8 16:39:55 2017 New Revision: 320806 URL: https://svnweb.freebsd.org/changeset/base/320806 Log: SYSTEM_COMPILER: Ensure there is not a stale compiler in WORLDTMP. In a scenario of cross-building it is possible that an OBJDIR's WORLDTMP contains an older compiler in WORLDTMP/usr/bin/cc that is not rebuilt if SYSTEM_COMPILER logic is triggered. This compiler was still incorrectly used. Address this by removing WORLDTMP/usr/bin/cc and all of the hardlinked files associated with it. Also do this for c++ for GCC builds. Sponsored by: Dell EMC Isilon MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jul 8 15:01:55 2017 (r320805) +++ head/Makefile.inc1 Sat Jul 8 16:39:55 2017 (r320806) @@ -761,7 +761,15 @@ _worldtmp: .PHONY .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -.endif +.if ${USING_SYSTEM_COMPILER} == "yes" +.for cc in cc c++ + if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \ + inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \ + find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \ + fi +.endfor +.endif # ${USING_SYSTEM_COMPILER} == "yes" +.endif # !defined(NO_CLEAN) # Our current approach to dependency tracking cannot cope with certain source # tree changes, particularly with respect to removing source files and