From 0209958cde6c85b2247aa0537830ace9105a6821 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:31 -0700 Subject: [PATCH 1/5] d/changelog: Start 1:14.0.6-7 changelog Signed-off-by: Jordan Justen --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 967e3e0a..bd9827dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-14 (1:14.0.6-7) UNRELEASED; urgency=medium + + [ Sylvestre Ledru ] + * disable sccache on bionic + + -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 + llvm-toolchain-14 (1:14.0.6-6) unstable; urgency=medium * Unbreak the cmake detection (Closes: #1021857, #1022414) From 3606129645cbe168c7a65b74116474616f20ab0c Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:47 -0700 Subject: [PATCH 2/5] 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 bd9827dd..a34e97ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ llvm-toolchain-14 (1:14.0.6-7) UNRELEASED; urgency=medium [ Sylvestre Ledru ] * disable sccache on bionic + [ 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-14 (1:14.0.6-6) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 3b8ab21f..f64e7549 100755 --- a/debian/rules +++ b/debian/rules @@ -223,8 +223,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 From a57d00a036f1d71a877336c021b39d05d7846233 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:56 -0700 Subject: [PATCH 3/5] d/rules: Set LLVM_SPIRV with cmake for libclc Signed-off-by: Jordan Justen --- debian/changelog | 1 + debian/rules | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a34e97ab..bbe280a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ llvm-toolchain-14 (1:14.0.6-7) UNRELEASED; urgency=medium [ Jordan Justen ] * d/rules: Call bash to use 'command -v' to location llvm-spirv executable + * d/rules: Set LLVM_SPIRV with cmake for libclc -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 diff --git a/debian/rules b/debian/rules index f64e7549..efa4560d 100755 --- a/debian/rules +++ b/debian/rules @@ -237,8 +237,10 @@ else endif LIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" +LIBCLC_TARGETS_LLVM_SPIRV := "" ifeq ($(LLVM_SPIRV_INSTALLED),yes) LIBCLC_TARGETS_TO_BUILD := $(LIBCLC_TARGETS_TO_BUILD)";spirv-mesa3d-;spirv64-mesa3d-" + LIBCLC_TARGETS_LLVM_SPIRV := "-DLLVM_SPIRV=$(LLVM_SPIRV)" endif BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 ppc64 ppc64el x32 s390x hurd-i386 kfreebsd-amd64 kfreebsd-i386 @@ -707,7 +709,8 @@ debian-libclc-build: -DCMAKE_INSTALL_DATADIR=lib \ -DCMAKE_INSTALL_INCLUDEDIR=include \ -DLLVM_CONFIG=$(STAGE_2_BIN_DIR)/llvm-config \ - -DLIBCLC_TARGETS_TO_BUILD=$(LIBCLC_TARGETS_TO_BUILD); \ + -DLIBCLC_TARGETS_TO_BUILD=$(LIBCLC_TARGETS_TO_BUILD) \ + $(LIBCLC_TARGETS_LLVM_SPIRV); \ ninja $(NJOBS) $(VERBOSE) touch $@ From d214584519939ccc4cacfb5d40220d296bc7fa0b Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:23:06 -0700 Subject: [PATCH 4/5] d/patches: Drop libclc-llvm-spirv.diff now that we are setting LLVM_SPIRV Signed-off-by: Jordan Justen --- debian/changelog | 1 + debian/patches/libclc-llvm-spirv.diff | 13 ------------- debian/patches/series | 1 - 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 debian/patches/libclc-llvm-spirv.diff diff --git a/debian/changelog b/debian/changelog index bbe280a7..ba8dbe85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-14 (1:14.0.6-7) UNRELEASED; urgency=medium [ Jordan Justen ] * d/rules: Call bash to use 'command -v' to location llvm-spirv executable * d/rules: Set LLVM_SPIRV with cmake for libclc + * d/patches: Drop libclc-llvm-spirv.diff now that we are setting LLVM_SPIRV -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 diff --git a/debian/patches/libclc-llvm-spirv.diff b/debian/patches/libclc-llvm-spirv.diff deleted file mode 100644 index 2d6e85bf..00000000 --- a/debian/patches/libclc-llvm-spirv.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt -index b8b5ceff086c..5964468358f2 100644 ---- a/libclc/CMakeLists.txt -+++ b/libclc/CMakeLists.txt -@@ -97,7 +97,7 @@ find_program( LLVM_CLANG clang PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH ) - find_program( LLVM_AS llvm-as PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH ) - find_program( LLVM_LINK llvm-link PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH ) - find_program( LLVM_OPT opt PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH ) --find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH ) -+find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR}) - - # Print toolchain - message( "clang: ${LLVM_CLANG}" ) diff --git a/debian/patches/series b/debian/patches/series index d2389a5a..a2fe91ba 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -135,7 +135,6 @@ print-lldb-path.patch lower-python-dep.diff scan-build-py-fix-default-bin.diff -libclc-llvm-spirv.diff omp-riscv64.patch test-disable-lldb-i386.diff unbreak-atomic-mips.diff From d03015ee7c5ecdb484227bb53c9ee91ef80755fa Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:23:14 -0700 Subject: [PATCH 5/5] d/rules: Check for llvm-spirv with version suffix Since llvm-spirv-13, the '-13' suffix has been added to the executable. Signed-off-by: Jordan Justen --- debian/changelog | 1 + debian/rules | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index ba8dbe85..d128799c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ llvm-toolchain-14 (1:14.0.6-7) UNRELEASED; urgency=medium * d/rules: Call bash to use 'command -v' to location llvm-spirv executable * d/rules: Set LLVM_SPIRV with cmake for libclc * d/patches: Drop libclc-llvm-spirv.diff now that we are setting LLVM_SPIRV + * d/rules: Check for llvm-spirv with version suffix -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 diff --git a/debian/rules b/debian/rules index efa4560d..f5739224 100755 --- a/debian/rules +++ b/debian/rules @@ -223,16 +223,22 @@ else control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif -LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv" 2>/dev/null) +LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv llvm-spirv-$(LLVM_VERSION)" 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 - LLVM_SPIRV_INSTALLED = yes + # if executable is llvm-spirv without a -$(LLVM_VERSION) suffix + ifeq ($(LLVM_SPIRV:-$(LLVM_VERSION)=),$(LLVM_SPIRV)) + # Too old llvm-spirv version are failing. See #52200 + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv) gt 10.0.0 ; echo $$?),0) + LLVM_SPIRV_INSTALLED = yes + else + LLVM_SPIRV_INSTALLED = no + endif else - LLVM_SPIRV_INSTALLED = no + # llvm-spirv renamed llvm-spirv-$(LLVM_VERSION) as of llvm-spirv-13 + LLVM_SPIRV_INSTALLED = yes endif endif