From owner-svn-src-head@freebsd.org Sun Nov 5 00:11:53 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 2311AE5AD97; Sun, 5 Nov 2017 00:11:53 +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 F294C63FD9; Sun, 5 Nov 2017 00:11:52 +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 vA50Bq5H042760; Sun, 5 Nov 2017 00:11:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA50BpCS042756; Sun, 5 Nov 2017 00:11:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711050011.vA50BpCS042756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 5 Nov 2017 00:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325412 - in head: . targets/pseudo/bootstrap-tools X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . targets/pseudo/bootstrap-tools X-SVN-Commit-Revision: 325412 X-SVN-Commit-Repository: base 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: Sun, 05 Nov 2017 00:11:53 -0000 Author: bdrewery Date: Sun Nov 5 00:11:51 2017 New Revision: 325412 URL: https://svnweb.freebsd.org/changeset/base/325412 Log: Fix nested MAKEOBJDIRPREFIX breaking various release/buildworld/toolchain targets. This problem was caused by r325329 and r325350. For the release(7) targets, some will run mm-mtree.sh which itself runs make with a MAKEOBJDIRPREFIX. The execution of that script leaks OBJROOT, MAKEOBJDIR, and MAKELEVEL=1 in the environment. This causes the mm-mtree makes to not do some basic setup of OBJROOT and only use this special MAKEOBJDIRPREFIX case which fails to empty out MAKEOBJDIRPREFIX for further nested makes, such as a tree walk. If that tree walk sets OBJROOT/OBJTOP such as r325329 is doing, then the wrong OBJDIRs end up being used due to the unemptied MAKEOBJDIRPREFIX being preferred over the proper MAKEOBJDIR. Pointyhat to: bdrewery Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/Makefile.libcompat head/targets/pseudo/bootstrap-tools/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 5 00:11:47 2017 (r325411) +++ head/Makefile.inc1 Sun Nov 5 00:11:51 2017 (r325412) @@ -523,6 +523,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ BSARGS= DESTDIR= \ OBJTOP='${WORLDTMP}/obj-tools' \ OBJROOT='$${OBJTOP}/' \ + MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ @@ -565,6 +566,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} \ DESTDIR= \ OBJTOP='${WORLDTMP}/obj-kernel-tools' \ OBJROOT='$${OBJTOP}/' \ + MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ MK_HTML=no -DNO_LINT MK_MAN=no \ Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Sun Nov 5 00:11:47 2017 (r325411) +++ head/Makefile.libcompat Sun Nov 5 00:11:51 2017 (r325412) @@ -129,6 +129,7 @@ LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \ LIBCOMPATWMAKE+= ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \ OBJTOP=${LIBCOMPAT_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ + MAKEOBJDIRPREFIX= \ MK_MAN=no MK_HTML=no LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \ MK_TOOLCHAIN=no ${IMAKE_INSTALL} \ @@ -188,6 +189,7 @@ build${libcompat}: .PHONY ${MAKE} SSP_CFLAGS= DESTDIR= \ OBJTOP=${LIBCOMPAT_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ + MAKEOBJDIRPREFIX= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ build-tools .endfor Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Sun Nov 5 00:11:47 2017 (r325411) +++ head/targets/pseudo/bootstrap-tools/Makefile Sun Nov 5 00:11:51 2017 (r325412) @@ -36,6 +36,7 @@ OSRELDATE?= 0 BSARGS= DESTDIR= \ OBJTOP='${WORLDTMP}/obj-tools' \ OBJROOT='$${OBJTOP}/' \ + MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET} \ SSP_CFLAGS= \