From 082cc8fbd173bddbf4da7b04bfbf5fac493a900f Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 21 Nov 2022 20:46:12 +0000 Subject: [PATCH] zephyr/docker-build.sh: give PATH precedence to a local sparse Adjust PATH to give precedence to any local sparse. New precedence: 1. zephyr-workspace 2. /opt/sparse/bin 3. Anything else in default PATH Signed-off-by: Marc Herbert --- zephyr/docker-build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zephyr/docker-build.sh b/zephyr/docker-build.sh index 02aada258..0ab91dbd8 100755 --- a/zephyr/docker-build.sh +++ b/zephyr/docker-build.sh @@ -16,8 +16,10 @@ unset ZEPHYR_BASE test -e ./sof/scripts/xtensa-build-zephyr.py # See .github/workflows/zephyr.yml -PATH="$PATH":/opt/sparse/bin -command -v sparse || true +# /opt/sparse is the current location in the zephyr-build image. +# Give any sparse in the workspace precedence. +PATH="$(pwd)"/sparse:/opt/sparse/bin:"$PATH" +command -V sparse || true : REAL_CC="$REAL_CC"