From nobody Tue Jul 11 00:53:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R0Mmk5sF8z4dRM7; Tue, 11 Jul 2023 00:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R0Mmk5HM0z4HXX; Tue, 11 Jul 2023 00:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689036790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAcj9sIDsNxxr2U5lJKgdpWfJ5+jWDYImsYRh2DPneo=; b=LFLAAPoZxAMnrACtscQ98zfezj59XRM6cEc2AzhvhTN/D1GDK3V9BsZ+6LzX8jFkoqRHPR GdvfoONwFXGFs4N8r0U/SbfaIVZuZGsK+OyI6+gl16XuZOSrm82FbaFs+xBUzhKOSJxFhV hlprjCYFv4ndsc61koYPLmPND6CikZsL1Ab/JdlhA/mtu3iZzmM43HZx0f5aIIqZCjqA/d qlNfBNCjFXy56GxqO1+kflFt1qKfG6f5Cw3ZR9rFb7ulOkXVnAznZzusX0dGRLpnIMMoOO g1m0htaj2mRPXf3P5DuGeP91GvNVV21zoN3k+FWTok4YBRKQxeUj7xBxngZy9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689036790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAcj9sIDsNxxr2U5lJKgdpWfJ5+jWDYImsYRh2DPneo=; b=dNy4m7+OgQ371S4guKZ5bNEgcmlDZg1ACKTBlgvigNLbYxkNPEuGaP5C80gqj7xphrVic6 gNykQg8ccEGliayfk3cVpjhLtteKcKNr/lVguYchY5Q3UHrucRpZ4z1Q5LlLYgG7wuf91y 9EqTkl54YGFiiDT1wi0cyR8qHgqe9k4EbL8lFOJpqLQT4y6c91nh8C6ngxU5P3MHkOmsL2 UdqvInZbW0xR+kGHNJdc/Na/dMBjH9XrSTK4jRonY/Rx9KaomFTQdOngnJguBrgKUxDtb2 TQDpWFymEk2DTJcAWWyDLgPZRyD/eBwpgGBbO6YnFIALdxVDw90KIXkS4C3iNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689036790; a=rsa-sha256; cv=none; b=mm5PZJVfvVzbPjNmjMz1yr866d36/gfF7DR4CBxZciEPfblZ7yPWWaXI4ipbEen8wNMrqf 9khejCo5EXhQouUuAdm9xMNoL5y/QzmQD006kFoZlXRgARunPtI8jxMN+kA78SU3YmyWfg stGOE7qckeYbQ7y+cbEfUOduZdeGoUicIUSRRgoaw3XR76GES/Fr7wVuqqhhi/smcfgyGP F5vduIqkUVvWJ2+iL8PVy6QxrShXi0EF3Zya65xHGY1csfh11SdngZjFzQZFyp3D5Q59Ri cTWBIb3UhXh3nRILzkxdMzqksVfSN4EMndam/pjXgpyLTViuJxVLl+jFT95oEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R0Mmk4MFtz1578; Tue, 11 Jul 2023 00:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36B0rAtv098469; Tue, 11 Jul 2023 00:53:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36B0rA3L098468; Tue, 11 Jul 2023 00:53:10 GMT (envelope-from git) Date: Tue, 11 Jul 2023 00:53:10 GMT Message-Id: <202307110053.36B0rA3L098468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c70dd03a7ff6 - main - Make sure MACHINE(_ARCH) are exported for depend-cleanup.sh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c70dd03a7ff649f832f1d29179b9094720392bce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c70dd03a7ff649f832f1d29179b9094720392bce commit c70dd03a7ff649f832f1d29179b9094720392bce Author: Jessica Clarke AuthorDate: 2023-07-11 00:53:04 +0000 Commit: Jessica Clarke CommitDate: 2023-07-11 00:53:04 +0000 Make sure MACHINE(_ARCH) are exported for depend-cleanup.sh We run depend-cleanup.sh twice during the build. The second time is the normal run, where we run it under WMAKEENV and thus have CROSSENV's MACHINE(_ARCH)=${TARGET(_ARCH)} in the environment. However, the first time is for bootstrap-tools, where it's run under BMAKEENV and we don't have any assignments to MACHINE(_ARCH) in the environment, meaning the script sees them as unset. In practice this doesn't matter since the only use doesn't apply to bootstrap-tools, but it could be a future issue. Thus, explicitly export them for depend-cleanup.sh and have the script verify they're set. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40968 --- Makefile.inc1 | 3 ++- tools/build/depend-cleanup.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6db68b627d96..1e992b05c859 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1016,7 +1016,8 @@ _sanity_check: .PHONY .MAKE # replacing generated files. Handle these cases here in an ad-hoc fashion. _cleanobj_fast_depend_hack: .PHONY @echo ">>> Deleting stale dependencies..."; - sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} + MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} \ + sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} _worldtmp: .PHONY @echo diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 743da3361cf5..ce962cc1eb86 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -23,6 +23,16 @@ if [ ! -d "$OBJTOP" ]; then exit 1 fi +if [ -z "${MACHINE+set}" ]; then + echo "$(basename "$0"): MACHINE not set" >&2 + exit 1 +fi + +if [ -z "${MACHINE_ARCH+set}" ]; then + echo "$(basename "$0"): MACHINE_ARCH not set" >&2 + exit 1 +fi + # $1 directory # $2 source filename w/o extension # $3 source extension