From 09c99a505f255164de53a404b81d1aaf3f8c6a23 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Sun, 25 Jan 2026 16:10:55 +1100 Subject: 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. --- scripts/test | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'scripts/test') 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() { CXX=${cross_prefix}-g++-${gcc_ver} fi - if ! command -v "${CC}" >/dev/null 2>&1; then - echo "##### Error: ${CC} not found in PATH" - exit 1 - fi - AR=${cross_prefix}-ar STRIP=${cross_prefix}-strip RANLIB=${cross_prefix}-ranlib + # Check all binaries actually exist. + for c in "$CC" "$CXX" "$AR" "$STRIP" "$RANLIB"; do + if ! command -v "$c" >/dev/null 2>&1; then + echo "##### Error: $c not found" + exit 1 + fi + done + echo "##### Using $($CC --version | head -1)" } -- cgit v1.2.3-55-g6feb