From owner-svn-src-head@freebsd.org Thu Apr 6 18:22:00 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 8EC7CD326C4; Thu, 6 Apr 2017 18:22:00 +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 66C171A4A; Thu, 6 Apr 2017 18:22:00 +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 v36ILxLf090541; Thu, 6 Apr 2017 18:21:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v36ILxXa090537; Thu, 6 Apr 2017 18:21:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704061821.v36ILxXa090537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 6 Apr 2017 18:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316586 - in head: . share/mk X-SVN-Group: head 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: Thu, 06 Apr 2017 18:22:00 -0000 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 # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense.