Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 16:52:14 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338145 - head/tools/build/mk
Message-ID:  <201808211652.w7LGqElC037854@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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}



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