From nobody Mon Dec 09 21:48:55 2024 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 4Y6b934f4Lz5gqPw; Mon, 09 Dec 2024 21:48:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y6b933vKXz4H8n; Mon, 9 Dec 2024 21:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733780935; 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=vrmXUvt9xsfJNP3mkEVBGPyX2W/sM+oPYqBevRGdZLc=; b=wstz44XxuSBlKDX1heqcvQvnJLbFcMdozO3ctNtIxyr2SLdYPzrysRhgXOAMcLj88SC5b/ BX4kNtIF7h1lKUT6UXRCD4TxWOlaSsbW6zdbib+tiLtI5zDqBgtbF1sLMtWPnqPSEk3NjQ muaiPH9bGnwK5ge91SKV10ejweaha+5m8evuD3PNgKZhG0SkVCrxhaDGLGnd3J84rCMZYP 8y3a8XMpqbOWRhaED7qN+5RRyDXJxFDqc2G6ivPJrIRrrnk9sJVtWU0qmxQoMmgD3TNrYV Zdqv0h02vVwNwVmPFLheAbTxVaVAjsaOzT5XLM2FHe9mTkx5feBSesz96iAMtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733780935; 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=vrmXUvt9xsfJNP3mkEVBGPyX2W/sM+oPYqBevRGdZLc=; b=WO0L+z/BeNY1pCO9G7bE1/igDRStuIBSkNaOYiS6BSyPggdYL1dfRVC1kjI83lW8Mkd+Gs TQuohdmZOVqcSjHarJGs+pbbqUkPfCxP9PydiHwZjzY1bXdCDvVldb/5pqbi7VMHAF69Ea 1/g3lGwufOY+2GHXjtKyr9kzzypQbW7nTTqHt20BxVoCV7OASwOYCkt7d8lFPvrjguK2Jx mp+6IVYijN8LAIaOzk2PmlsardoR1tzNhaPTCzfK+D05AUPjs6YgDzS5hL1xmo9kXuwYHO Q6j0S9M8vkgFe1XLibZopE1TN8nD94wO1lBnqyApgOEkTDkC2bkmF+TYe1BySw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733780935; a=rsa-sha256; cv=none; b=ZRG8+FXEs/yOVhg+SRPbJdl9eyinA9dYpycUgZRmNa6FNmhbAOH8tVckyKQt5qcdFPEmxo DyuhS0a7bp3wdH0dZ7dHMBos9FO18lCMx6oUyHwVHbBFFL3kZeg36zcG67KAUIkc1DEwYm PgmhTFxNRl341vJ2GXPk2jMZVdSSiGUFFvNIAteLVkiOBdVaZOnV81jH5DcwJB7uUjhpDL HCzrXAXnhrp1HkqFHKFwzkbeimTwK5hAEU87II8LTRmFIPP9yK4E2pK677v9l/2yHTzuLV 877JVIF8houXs2tGi83QaJCY023mbQFgbF7H/vfvksgccjS3smnivcfHx8iy/g== 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 4Y6b9339h5zvG7; Mon, 9 Dec 2024 21:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B9Lmts0033039; Mon, 9 Dec 2024 21:48:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B9Lmtlr033036; Mon, 9 Dec 2024 21:48:55 GMT (envelope-from git) Date: Mon, 9 Dec 2024 21:48:55 GMT Message-Id: <202412092148.4B9Lmtlr033036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 82fcae46051c - stable/13 - depend-cleanup.sh: Simplify the logic, and clean bootstrap tools. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 82fcae46051c3e395585d07e9bbfb8ef5f92a391 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=82fcae46051c3e395585d07e9bbfb8ef5f92a391 commit 82fcae46051c3e395585d07e9bbfb8ef5f92a391 Author: Dag-Erling Smørgrav AuthorDate: 2023-02-08 22:58:51 +0000 Commit: Brooks Davis CommitDate: 2024-12-09 21:46:29 +0000 depend-cleanup.sh: Simplify the logic, and clean bootstrap tools. * There's no need to check if the file exists before grepping it; if it does not exist, grep will fail, which is what we want. Just redirect the error message to /dev/null. * There's no need to split the .o and .pico cases; the bodies are identical, so combine the conditions. Use a glob to avoid a false negative if one exists but not the other. * Also run depend-cleanup.sh on the bootstrap build tree. This unbreaks the build after 29c5f8bf9a01. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D38447 (cherry picked from commit 0dfaefa975477cee2ec3155c3e0689ba1fcdde9a) Pull Request: https://github.com/freebsd/freebsd-src/pull/1543 --- Makefile.inc1 | 3 +++ tools/build/depend-cleanup.sh | 11 ++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index fc5e82d39eca..48cd0f1c772c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1084,6 +1084,9 @@ _bootstrap-tools: @echo "--------------------------------------------------------------" @echo ">>> stage 1.2: bootstrap tools" @echo "--------------------------------------------------------------" +.if ${MK_CLEAN} != "yes" + ${_+_}cd ${.CURDIR}; ${BMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack +.endif ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom \ ${WORLDTMP}/bin diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index fd0d7eb01fe7..fd29c50593a5 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -27,15 +27,8 @@ fi # $3 source extension clean_dep() { - if [ -e "$OBJTOP"/$1/.depend.$2.pico ] && \ - egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.pico; then \ - echo "Removing stale dependencies and objects for $2.$3"; \ - rm -f \ - "$OBJTOP"/$1/.depend.$2.* \ - "$OBJTOP"/$1/$2.*o - fi - if egrep -qw "$2\.$3" "$OBJTOP"/obj-lib32/$1/.depend.$2.*o 2>/dev/null; then - echo "Removing 32-bit stale dependencies and objects for $2.$3" + if egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.*o 2>/dev/null; then + echo "Removing stale dependencies and objects for $2.$3" rm -f \ "$OBJTOP"/obj-lib32/$1/.depend.$2.* \ "$OBJTOP"/obj-lib32/$1/$2.*o