From owner-svn-src-all@freebsd.org Tue Aug 21 16:52:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C71710785C4; Tue, 21 Aug 2018 16:52:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D68658BF8A; Tue, 21 Aug 2018 16:52:14 +0000 (UTC) (envelope-from arichardson@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B73C826A83; Tue, 21 Aug 2018 16:52:14 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7LGqEja037855; Tue, 21 Aug 2018 16:52:14 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7LGqElC037854; Tue, 21 Aug 2018 16:52:14 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808211652.w7LGqElC037854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 21 Aug 2018 16:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338145 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 338145 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.27 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: Tue, 21 Aug 2018 16:52:15 -0000 Author: arichardson Date: Tue Aug 21 16:52:14 2018 New Revision: 338145 URL: https://svnweb.freebsd.org/changeset/base/338145 Log: Relax the check added in 338096 Checking for any include below ${SRCTOP}/sys is too strict and breaks e.g. mkimg which includes sys/sys/disk. ABI issues will only be caused by including headers in sys/sys since they might not match the host. Approved By: jhb (mentor) Suggested By: imp Modified: head/tools/build/mk/Makefile.boot Modified: head/tools/build/mk/Makefile.boot ============================================================================== --- head/tools/build/mk/Makefile.boot Tue Aug 21 16:51:45 2018 (r338144) +++ head/tools/build/mk/Makefile.boot Tue Aug 21 16:52:14 2018 (r338145) @@ -8,12 +8,14 @@ LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib # we do not want to capture dependencies referring to the above UPDATE_DEPENDFILE= no -.if !make(obj) # When building host tools we should never pull in headers from the source sys # directory to avoid any ABI issues that might cause the built binary to crash. # The only exceptions to this are sys/cddl/compat for dtrace bootstrap tools and # sys/crypto for libmd bootstrap. -.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*:N*${SRCTOP}/sys/crypto*) +# We have to skip this check during make obj since bsd.crunchgen.mk will run +# make obj on every directory during the build-tools phase. +.if !make(obj) +.if !empty(CFLAGS:M*${SRCTOP}/sys) .error Do not include $${SRCTOP}/sys when building bootstrap tools. \ Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \ Error was caused by Makefile in ${.CURDIR}