Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2017 18:21:59 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316586 - in head: . share/mk
Message-ID:  <201704061821.v36ILxXa090537@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Thu Apr  6 18:21:59 2017
New Revision: 316586
URL: https://svnweb.freebsd.org/changeset/base/316586

Log:
  META_MODE: Fix build-tools still sometimes rebuilding during target build.
  
  In a cross-build, the build-tools are native host binaries.  We do not
  want to rebuild them when building for the target.  Bmake previously
  did not support checking .NOMETA on an existing target, so .NOMETA_CMP
  was used here.  However, .NOMETA_CMP still triggers meta mode conditions
  if the number of commands or the command changes.  In r312467 the paths
  to build ncurses files were modified and thus triggered meta mode to
  rebuild the build tools (make_keys, make_hash) in ncurses during the
  target build.  Bmake 20160604 committed in r301462 changed .NOMETA to
  also skip meta mode logic for an existing .meta file as well, thus it
  is now the proper fix here.
  
  I explored moving the build-tools output to WORLDTMP/tools with
  relatively good success, but have concerns that doing so would be
  problematic for downstream vendors who use LOCAL_TOOL_DIRS and
  expect the tools to be in current OBJDIR for the target.  It also
  adds more complexity into finding the tools during target build
  and handling of where they are for rescue/rescue and
  mkcsmapper_static/mkesdb_static which should really not be connected in
  build-tools anyway.
  
  MFC after:	2 weeks
  Reported by:	many
  Sponsored by:	Dell EMC Isilon

Modified:
  head/Makefile.inc1
  head/Makefile.libcompat
  head/share/mk/bsd.crunchgen.mk

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Thu Apr  6 18:17:29 2017	(r316585)
+++ head/Makefile.inc1	Thu Apr  6 18:21:59 2017	(r316586)
@@ -466,7 +466,7 @@ CROSSENV+=	MAKEOBJDIRPREFIX=${OBJTREE} \
 		CPUTYPE=${TARGET_CPUTYPE}
 .if ${MK_META_MODE} != "no"
 # Don't rebuild build-tools targets during normal build.
-CROSSENV+=	BUILD_TOOLS_META=.NOMETA_CMP
+CROSSENV+=	BUILD_TOOLS_META=.NOMETA
 .endif
 .if ${MK_GROFF} != "no"
 CROSSENV+=	GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
@@ -2548,7 +2548,7 @@ CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${
 CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN}
 .if ${MK_META_MODE} != "no"
 # Don't rebuild build-tools targets during normal build.
-CD2MAKE+=	BUILD_TOOLS_META=.NOMETA_CMP
+CD2MAKE+=	BUILD_TOOLS_META=.NOMETA
 .endif
 XDDESTDIR=${DESTDIR}/${XDTP}
 .if !defined(OSREL)

Modified: head/Makefile.libcompat
==============================================================================
--- head/Makefile.libcompat	Thu Apr  6 18:17:29 2017	(r316585)
+++ head/Makefile.libcompat	Thu Apr  6 18:21:59 2017	(r316586)
@@ -116,7 +116,7 @@ LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${L
 		DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
 .if ${MK_META_MODE} != "no"
 # Don't rebuild build-tools targets during normal build.
-LIBCOMPATWMAKEENV+=	BUILD_TOOLS_META=.NOMETA_CMP
+LIBCOMPATWMAKEENV+=	BUILD_TOOLS_META=.NOMETA
 .endif
 LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
 		CXX="${XCXX} ${LIBCOMPATCXXFLAGS} ${LIBCOMPATCFLAGS}" \

Modified: head/share/mk/bsd.crunchgen.mk
==============================================================================
--- head/share/mk/bsd.crunchgen.mk	Thu Apr  6 18:17:29 2017	(r316585)
+++ head/share/mk/bsd.crunchgen.mk	Thu Apr  6 18:21:59 2017	(r316586)
@@ -133,7 +133,7 @@ ${PROG}: ${OUTPUTS} objs .NOMETA .PHONY
 
 objs: ${OUTMK} .META
 	${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \
-	    ${MAKE} -f ${OUTMK} BUILD_TOOLS_META=.NOMETA_CMP objs
+	    ${MAKE} -f ${OUTMK} BUILD_TOOLS_META=.NOMETA objs
 
 # <sigh> Someone should replace the bin/csh and bin/sh build-tools with
 # shell scripts so we can remove this nonsense.



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