Date: Sat, 22 Jul 2023 18:23:13 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 50a4d8b34570 - stable/13 - depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent Message-ID: <202307221823.36MIND9w075366@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=50a4d8b345705ff2180c150903228f99b08b5674 commit 50a4d8b345705ff2180c150903228f99b08b5674 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-07-10 22:50:09 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-07-22 18:22:34 +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 (cherry picked from commit 7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d) --- 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 58a7c72b2082..92a085067c2b 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -33,7 +33,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307221823.36MIND9w075366>