aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Sing <joshua@joshuasing.dev>2026-01-25 16:10:55 +1100
committerJoshua Sing <joshua@joshuasing.dev>2026-01-25 16:10:55 +1100
commit09c99a505f255164de53a404b81d1aaf3f8c6a23 (patch)
tree5a0565b9ed349d53c7378e565fba13750a908ad9
parent1c945c2e11776c78c7e49e86c5a5aac23f48434b (diff)
downloadportable-09c99a505f255164de53a404b81d1aaf3f8c6a23.tar.gz
portable-09c99a505f255164de53a404b81d1aaf3f8c6a23.tar.bz2
portable-09c99a505f255164de53a404b81d1aaf3f8c6a23.zip
scripts/test: check all binaries for cross-compile
Probably safer to check all of them instead of just CC, since previously it seems the loongarch64 RANLIB variable could have been wrong. I am not sure if a missing binary could cause unexpected behaviour.
-rwxr-xr-xscripts/test13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/test b/scripts/test
index 5e95dfd..d874b64 100755
--- a/scripts/test
+++ b/scripts/test
@@ -27,15 +27,18 @@ setup_cross_compiler() {
27 CXX=${cross_prefix}-g++-${gcc_ver} 27 CXX=${cross_prefix}-g++-${gcc_ver}
28 fi 28 fi
29 29
30 if ! command -v "${CC}" >/dev/null 2>&1; then
31 echo "##### Error: ${CC} not found in PATH"
32 exit 1
33 fi
34
35 AR=${cross_prefix}-ar 30 AR=${cross_prefix}-ar
36 STRIP=${cross_prefix}-strip 31 STRIP=${cross_prefix}-strip
37 RANLIB=${cross_prefix}-ranlib 32 RANLIB=${cross_prefix}-ranlib
38 33
34 # Check all binaries actually exist.
35 for c in "$CC" "$CXX" "$AR" "$STRIP" "$RANLIB"; do
36 if ! command -v "$c" >/dev/null 2>&1; then
37 echo "##### Error: $c not found"
38 exit 1
39 fi
40 done
41
39 echo "##### Using $($CC --version | head -1)" 42 echo "##### Using $($CC --version | head -1)"
40} 43}
41 44