git: 7ba8cc9b7b6b - main - depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Jul 2023 22:57:58 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d commit 7ba8cc9b7b6bdea142d7ecb82c7d3a9b095e967d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-07-10 22:50:09 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> 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