From nobody Mon Jul 10 22:57:58 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 4R0KCp5QxyzZTSC; Mon, 10 Jul 2023 22:57:58 +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 4R0KCp51Dxz3q8B; Mon, 10 Jul 2023 22:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689029878; 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=QYCBU68nDeXQPTkZpWwHXGmBBMBRzMVZ9CjuwIxsYG8=; b=Ark6FN8luJ8JuWMLTJ6jim93DjvOwd8bFya8AGqSNIpxbgPTETdeeo/IPfb7ba+tLJJxPJ yO3qCtBTtmOq+KX/VjBvqPRkZVzDLNVqD8WUlaDBkh6tQkp00gxnrHDu4zxuQZaRTHw4EC uDd35u/W7TdG9i5a+cn19V3f5Pty7AKtlmBW3ZKg9tTjEzQXmBEHJQf1tC4B2VkB5t5PzM mwn619U6fxPFeTIS7NusCvdxBzOcxqbPI4gYk3KFgfArI6JJd+lOTGU30X1wr/897P8SjH 5bTh0zUusSJGKRWawcI0ei+EpVzdtcS/qwqq6W8p5PIylkPg3V0ktu5aAd3ffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689029878; 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=QYCBU68nDeXQPTkZpWwHXGmBBMBRzMVZ9CjuwIxsYG8=; b=CdI/kgSWhyGRJrv/BTRkWYzZ6dLnhosiV4lcZ8NipKFCm2f0JYCYJIt53z6Wr2vO4xkgaX ZEUXcEIZJUWaV4Wmx43hbd3mmqxKhWm81UZ6JtuaJs92oU2/N5/AXK+fpRS/tp0rp0apW+ wRPLu8pFkhGfhqW74zOD4xNxy7uaeLXsoGE6sRvTeP6Qq0kVAkc2y7IKGTCfyL3fu8tNRk LWH7tfwF5xzLPGtgsJOISY9pdyz4uhVf+A1wEg4N88GH9/BkAsg+A1JFjjYWP6Wb62BltV OPNgh2ZphetBLc/LQZR76oEgxCKs3LBQ+ZnsijNqKIiDQyVIrs8ZZ2aWYd+ZRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689029878; a=rsa-sha256; cv=none; b=muRsjVhGqnWwd2sk0hsSPHQ3A9WhcOxSiEEYRaItcl+thE9WTXThX1r5lz1aK8J7tduXK7 viRf/0zEkStP/npBCIJp+umKXW9I3C5WnaAStNoC/EDUpAW3hV6e7bf/chE64iNlWg5QOw x0pK9HATQOoMgB1EBx3EMS29gPuHMtEeRbIBZmFldJksQOUDVkgFYOveSzj5yEd7i6lZbv LmOZV2B8GK2nd8ZPDMWk+DN1bz7HQbUe7zLrHUiGg+gEzTcwmXykz0HeHFQMjwOFH3guNE HCTsHgmQdk9KGt32+Dh81qZSGpjzJqZr9wsWDaMuBNhAHA1MLiXA8NT6BHF4+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 4R0KCp3yYvz12yX; Mon, 10 Jul 2023 22:57:58 +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 36AMvwPl099687; Mon, 10 Jul 2023 22:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36AMvwMB099686; Mon, 10 Jul 2023 22:57:58 GMT (envelope-from git) Date: Mon, 10 Jul 2023 22:57:58 GMT Message-Id: <202307102257.36AMvwMB099686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 7ba8cc9b7b6b - main - depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d commit 7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d Author: Dimitry Andric AuthorDate: 2023-07-10 22:50:09 +0000 Commit: Dimitry Andric CommitDate: 2023-07-10 22:57:33 +0000 depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent For example with the recent removal of ffs.S for 32-bit arm and i386, the egrep in clean_dep() did not find any files to remove, even if you added a "clean_dep lib/libc ffs S" line. This is because it will never find the ffs.S filename in the 64-bit .depend files for libc. Split the searching and removing of 32-bit dependencies and objects into a separate part to cope with this. This can be used similarly later on, for other bitnesses. MFC after: 3 days --- tools/build/depend-cleanup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 7b851873f288..e7e7f30ab16b 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -32,7 +32,11 @@ clean_dep() echo "Removing stale dependencies and objects for $2.$3" rm -f \ "$OBJTOP"/$1/.depend.$2.* \ - "$OBJTOP"/$1/$2.*o \ + "$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" + rm -f \ "$OBJTOP"/obj-lib32/$1/.depend.$2.* \ "$OBJTOP"/obj-lib32/$1/$2.*o fi