From 0951f6940528c215a27c28b0989f6a1f73459827 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:47 -0700 Subject: [PATCH] d/rules: Call bash to use 'command -v' to location llvm-spirv executable Signed-off-by: Jordan Justen --- debian/changelog | 3 +++ debian/rules | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3889fb14..f8978b69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ llvm-toolchain-13 (1:13.0.1-8) UNRELEASED; urgency=medium as llvm-spir is too old on these version. See bug #52200 + [ Jordan Justen ] + * d/rules: Call bash to use 'command -v' to location llvm-spirv executable + -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 llvm-toolchain-13 (1:13.0.1-7) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 9e4f0438..fafa5d47 100755 --- a/debian/rules +++ b/debian/rules @@ -214,8 +214,10 @@ else control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif -ifeq ($(shell command -v llvm-spirv),) -LLVM_SPIRV_INSTALLED = no +LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv" 2>/dev/null) + +ifndef LLVM_SPIRV + LLVM_SPIRV_INSTALLED = no else ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv) gt 10.0.0 ; echo $$?),0) # Too old llvm-spirv version are failing. See #52200