From nobody Mon Dec 09 21:48:58 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 4Y6b970m56z5gqgX; Mon, 09 Dec 2024 21:48:59 +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 4Y6b966G3Fz4HBy; Mon, 9 Dec 2024 21:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733780938; 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=iBwlukL00HrCJJkKRki7eI7yw2pwQXsTJucmuaouTjE=; b=FYaUQQZHnz3y7LKq0c3iBVXCf2nUkKB1wiGMwu4co+NzQUhRIp4D5R3N+/KpfPfHxMeimI 3iAO0Y+lgow6JMNbUt+w+1LaGpVakMCs+9MNHoPznA4FQZzH0Gh9BEnamTFp8fh/2bUY5e IqNOxHZ9La/k/KXT7Z6akBCJWY79h4+HtnJH6cvyB1f8iuYyyDiDsbdI4x57XUa6+waGru iNrIdMFCUkBhIxAn6brS6LMNN12ZEhsZYCT1g3fl1DezVwMf8Z4oW6zZdRdsfF1fNz0YFP 02D0TUjJyStP7M72Zz3AFswVAQwmfcZplP6S1vmcpG4yYlDsKGvI3rWrVEOB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733780938; 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=iBwlukL00HrCJJkKRki7eI7yw2pwQXsTJucmuaouTjE=; b=R05arJUTkShwbOAV3gQP6GQPnsV42qwmAnPWEUyN1agh6DNXWuulZMn16VmhMPNLLnlH+J /mUuaM+GO9wBawY01DsIHv58pERLMxt+j3QTVYuesdtU+TaVwie6frP5Fw62t1IM04PGzH EU1fjDTgDaKxIvdDcufsgCpEry4iVSav6Zqu+2ZjI06PLaU5LNnOsjLqNFo8jsPvouPhIL +qnok8/HsNCrUCy8XDaNwCBHsFrZOCyhTMKEa9sB8bcymETuvDGgYHfP0eq/MA3hsd3pGl Qv9iqaQAPB8RF/pyQtqF7O7IUkQwpXeQbRCYSN4V0Xpy0SD+p1o1K+o1d+H6Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733780938; a=rsa-sha256; cv=none; b=C2RompANLJOLxCAaKvfI3vdYI1Gb5x63Y7p/IH9LEH5F6GKQ61sOShYIhesFHdElu54i+Q h4n7PzS0wFIFLN72tQErFXU9k8bIEx9MIL6gEvlhjY5NuISAtXK+a3FwinA2Vm3HNrvPdf Vrr9RT/bWKRotb05OAndG8ZWwwhg/lO8HOB7ap4J2s9nAr6/+cOFtESgb6acq3SrP5NjvH 9jeP2CUbIzhsN3Tm/pZpxlu0T37sV7HWTWmzVqkyyR1y9rgJ/QA1bQS5nqKmLK5Sc/Gvuh 8qySyvlkpGrIgU6nbyXH1UFLCm315CP5Gi8YUNky82n9uJNAlTKXxMrrpygK6g== 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 4Y6b965RNrzvG9; Mon, 9 Dec 2024 21:48:58 +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 4B9LmwRI033224; Mon, 9 Dec 2024 21:48:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B9Lmwp8033219; Mon, 9 Dec 2024 21:48:58 GMT (envelope-from git) Date: Mon, 9 Dec 2024 21:48:58 GMT Message-Id: <202412092148.4B9Lmwp8033219@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: 50291c77306b - stable/13 - depend-cleanup.sh: Generalise lib32 code and avoid duplication 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: 50291c77306be87ee9f85fe557d47b65c8af50ed Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=50291c77306be87ee9f85fe557d47b65c8af50ed commit 50291c77306be87ee9f85fe557d47b65c8af50ed Author: Jessica Clarke AuthorDate: 2023-07-27 04:10:47 +0000 Commit: Brooks Davis CommitDate: 2024-12-09 21:46:55 +0000 depend-cleanup.sh: Generalise lib32 code and avoid duplication By passing through _ALL_libcompats we can avoid hard-coding the list of libcompats in depend-cleanup.sh. This cleanup also makes clean_dep shorter by using a loop instead of handling each case explicitly (at the expense of slightly tweaked logging). Reviewed by: brooks, jhb Differential Revision: https://reviews.freebsd.org/D41187 (cherry picked from commit 81805ec30074363e5d7d7add37b3ccf4f1eb396b) Pull Request: https://github.com/freebsd/freebsd-src/pull/1543 --- tools/build/depend-cleanup.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index e88a765357a5..7299ee0ccf6b 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -72,6 +72,9 @@ if [ -z "${MACHINE_ARCH+set}" ]; then err "MACHINE_ARCH not set" fi +# XXX: _ALL_libcompats not MFC'd in Makefile.inc1 +ALL_libcompats=32 + run() { if [ "$VERBOSE" ]; then @@ -87,12 +90,15 @@ run() # $3 source extension clean_dep() { - if egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.*o 2>/dev/null; then - echo "Removing stale dependencies and objects for $2.$3" - run rm -f \ - "$OBJTOP"/obj-lib32/$1/.depend.$2.* \ - "$OBJTOP"/obj-lib32/$1/$2.*o - fi + for libcompat in "" $ALL_libcompats; do + dirprfx=${libcompat:+obj-lib${libcompat}/} + if egrep -qw "$2\.$3" "$OBJTOP"/$dirprfx$1/.depend.$2.*o 2>/dev/null; then + echo "Removing stale ${libcompat:+lib${libcompat} }dependencies and objects for $2.$3" + run rm -f \ + "$OBJTOP"/$dirprfx$1/.depend.$2.* \ + "$OBJTOP"/$dirprfx$1/$2.*o + fi + done } # Date Rev Description @@ -106,7 +112,10 @@ if [ -e "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o ] && \ egrep -qw "cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c" \ "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o; then echo "Removing old ZFS tree" - run rm -rf "$OBJTOP"/cddl "$OBJTOP"/obj-lib32/cddl + for libcompat in "" $ALL_libcompats; do + dirprfx=${libcompat:+obj-lib${libcompat}/} + run rm -rf "$OBJTOP"/${dirprfx}cddl + done fi # 20200916 WARNS bumped, need bootstrapped crunchgen stubs @@ -127,7 +136,10 @@ fi # 20210108 821aa63a0940 non-widechar version of ncurses removed if [ -e "$OBJTOP"/lib/ncurses/ncursesw ]; then echo "Removing stale ncurses objects" - run rm -rf "$OBJTOP"/lib/ncurses "$OBJTOP"/obj-lib32/lib/ncurses + for libcompat in "" $ALL_libcompats; do + dirprfx=${libcompat:+obj-lib${libcompat}/} + run rm -rf "$OBJTOP"/${dirprfx}lib/ncurses + done fi # 20210608 f20893853e8e move from atomic.S to atomic.c