Skip to content

Commit 29dfcfb

Browse files
committed
check-for-missing-dlls: stop using BITNESS
The `BITNESS` idea hails from the time when it was assumed that there would only ever be a 32-bit and a 64-bit Windows, implying Intel/AMD CPUs. That has changed with the advent of ARM64, and we're slowly migrating away from using `BITNESS`; This here commit is another step on that journey. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 614cb0c commit 29dfcfb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

check-for-missing-dlls.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ ARCH="$(uname -m)" ||
2626
die "Could not determine architecture"
2727

2828
case "$ARCH" in
29-
i686) BITNESS=32;;
30-
x86_64) BITNESS=64;;
29+
i686) MINGW_PREFIX=mingw32;;
30+
x86_64) MINGW_PREFIX=mingw64;;
31+
aarch64) MINGW_PREFIX=clangarm64;;
3132
*) die "Unhandled architecture: $ARCH";;
3233
esac
3334

@@ -46,9 +47,9 @@ unused_dlls_file=/tmp/unused-dlls.$$.txt
4647
tmp_file=/tmp/tmp.$$.txt
4748
trap "rm \"$used_dlls_file\" \"$missing_dlls_file\" \"$unused_dlls_file\" \"$tmp_file\"" EXIT
4849

49-
all_files="$(export ARCH BITNESS && "$thisdir"/make-file-list.sh | tr A-Z a-z | grep -v '/getprocaddr64.exe$')" &&
50+
all_files="$(export ARCH && "$thisdir"/make-file-list.sh | tr A-Z a-z | grep -v '/getprocaddr64.exe$')" &&
5051
usr_bin_dlls="$(echo "$all_files" | grep '^usr/bin/[^/]*\.dll$')" &&
51-
mingw_bin_dlls="$(echo "$all_files" | grep '^mingw'$BITNESS'/bin/[^/]*\.dll$')" &&
52+
mingw_bin_dlls="$(echo "$all_files" | grep '^'$MINGW_PREFIX'/bin/[^/]*\.dll$')" &&
5253
dirs="$(echo "$all_files" | sed -n 's/[^/]*\.\(dll\|exe\)$//p' | sort | uniq)" &&
5354
for dir in $dirs
5455
do
@@ -57,7 +58,7 @@ do
5758

5859
case "$dir" in
5960
usr/*) dlls="$sys_dlls$LF$usr_bin_dlls$LF";;
60-
mingw$BITNESS/*) dlls="$sys_dlls$LF$mingw_bin_dlls$LF";;
61+
$MINGW_PREFIX/*) dlls="$sys_dlls$LF$mingw_bin_dlls$LF";;
6162
*) dlls="$sys_dlls$LF";;
6263
esac
6364

0 commit comments

Comments
 (0)