From nobody Wed Aug 23 17:01:26 2023 X-Original-To: dev-commits-src-main@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 4RWCD63y9qz4r6rh; Wed, 23 Aug 2023 17:01:26 +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 4RWCD632zfz4MbQ; Wed, 23 Aug 2023 17:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692810086; 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=GTHWUAWn9e8S0KmmfWbCrYw4D+FC33TBQdACzvklkMY=; b=U2LKi1xi71l6QUPBy86ccMgJD/1CJJgabVySRiFtZgwYTcqhrWAMqMpdeiNwHmnTxX4NII LHKXO7+pu6ilIkXe9hXcS484Kn0uy7KJYWG2RsgawSgRAW4kNahi+F4sy/8fWhX3DOQrL1 XXdtvHf9hY9jN2J+UEle0sGncGBdQpHPCYVAq/KsBRf282FzfEGYKd8xnbeO4hk+c+dR/O cpIg+AuATd7la1Aug5hYGY4RF6YDdSIvL4Ue1QaJEWEa37N7uR2E++SUSD0LOkzkQaeAiX vjz/335G2syjB+EXEa66WprtLWPhngdroj1KobFCj/0e854cO7Fj3+bppI39FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692810086; 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=GTHWUAWn9e8S0KmmfWbCrYw4D+FC33TBQdACzvklkMY=; b=BgX9MUTOO77bg5AC1Iak6JSMLKRFic2BsBjloz9NlldDDI9Ja79CZ2Jg+3meBzLPwaZava VerDxNYkIihzpLAcYAL3zcbTPFhJrht/PBbl+F7Y+aZNQKiLPrpSyNsOkmJlKQ7AMWOkXB uU3r0CF6MeHPBdArSwldjrVTaolMSe1KewLmP5fIdoekr7r5J8HvFKPVg+xYNMz4C1p2r3 tBpuKvdDiErDNKsa/J8egicc3NlJDN8O1RfNkXLMo/IlVFW1bSifWS74ES1QZQLKJ4aLco fNvb8UijfcHYonlE7akPPf0fn9JDYt20u8frLbekudJAGrFXphqU3EK2FwHPfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692810086; a=rsa-sha256; cv=none; b=J1jE0kOYjBYE2YVUWjeZJg8nri/mP1v0XOavlMgXfVugGzz2nAXe7hb4l9nrOWWC8+LQPN h8Y6JTMq2fBAJM2VJ5PvmZwWbMjrWa4otr05PaHW6O9dDRXWbNNfnh6CERuMOylzLeO4db dzrsFUdJA6lBC+/e3ivjVOEpi/jDg24wgEB97ff9KZYrGjiBSdoa4lix8+rH1MEiYKDAG8 46aondeYyhn7Wo6cE4w0FXSphY2w5EWtSFNVWBZHHAuiVRB/ZwiMTYn1U3cSuI0H8xzIX5 qquRUf8gG/afg6JuTz2DlNgPah18ik153Unj34CfHT5/SIT0u10SI3Nw4GnQWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RWCD628HkzshQ; Wed, 23 Aug 2023 17:01:26 +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 37NH1Q8I070060; Wed, 23 Aug 2023 17:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37NH1Q5G070057; Wed, 23 Aug 2023 17:01:26 GMT (envelope-from git) Date: Wed, 23 Aug 2023 17:01:26 GMT Message-Id: <202308231701.37NH1Q5G070057@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: 62f243acea24 - main - tools/build/make.py: Make --with-default-sys-path mirror usr.bin/bmake List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 62f243acea24f52c6420720db615535045489c50 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=62f243acea24f52c6420720db615535045489c50 commit 62f243acea24f52c6420720db615535045489c50 Author: Jessica Clarke AuthorDate: 2023-08-23 16:56:56 +0000 Commit: Jessica Clarke CommitDate: 2023-08-23 16:56:56 +0000 tools/build/make.py: Make --with-default-sys-path mirror usr.bin/bmake The top-level Makefile passes -m to its sub-makes in order to ensure they use the in-tree mk files in share/mk, but the top-level make itself has to rely on whatever environment the bmake used has. For FreeBSD, we configure the system bmake with .../share/mk:/usr/share/mk, which means it will pick up src's share/mk whenever run from within the src tree, but currently for non-FreeBSD we configure our bootstrap bmake only with bmake's own mk files. This is mostly compatible, with two exceptions: 1. "targets" runs at the top level, but needs TARGET_MACHINE_LIST and the corresponding MACHINE_ARCH_LIST_${target}, otherwise it will just print an empty list. 2. "universe" and "universe-toolchain", when run at the top level (i.e. not via the various wrappers around universe like tinderbox), end up failing in universe-toolchain itself with: bmake[1]: "/path/to/freebsd/share/mk/src.sys.obj.mk" line 112: Cannot use MAKEOBJDIR= Unset MAKEOBJDIR to get default: MAKEOBJDIR='${.CURDIR:S,^${SRCTOP},${OBJTOP},}' By including .../share/mk in the default sys path like FreeBSD's system bmake we ensure that we get the in-tree mk files for the top-level make, not just sub-makes, and avoid such issues. Note that we cannot (yet) stop using the installed mk files, since the MAKEOBJDIRPREFIX check in Makefile runs in the object directory and uses env -i, thereby losing the MAKESYSPATH exported by src.sys.env.mk. Other such issues may also exist, though are likely rare if so. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D41544 --- tools/build/make.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build/make.py b/tools/build/make.py index e25922c9a70d..5c483e8b45be 100755 --- a/tools/build/make.py +++ b/tools/build/make.py @@ -100,7 +100,8 @@ def bootstrap_bmake(source_root, objdir_prefix): bmake_installed_version + "', treating as not present") configure_args = [ - "--with-default-sys-path=" + str(bmake_install_dir / "share/mk"), + "--with-default-sys-path=.../share/mk:" + + str(bmake_install_dir / "share/mk"), "--with-machine=amd64", # TODO? "--with-machine-arch=amd64", "--without-filemon", "--prefix=" + str(bmake_install_dir)]