From 29308f4310a26ad5b236d23a6eca224131f6b20f Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:31 -0700 Subject: [PATCH 01/10] d/changelog: Start 1:13.0.1-8 changelog Signed-off-by: Jordan Justen --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 71a10603..8445a941 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-13 (1:13.0.1-8) UNRELEASED; urgency=medium + + * New changelog + + -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 + llvm-toolchain-13 (1:13.0.1-7) unstable; urgency=medium [ Michael Biebl ] From 265a70d7d07477c29a2b4ac5878f39bd46ba1095 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 18 Oct 2021 16:15:10 +0200 Subject: [PATCH 02/10] Disable the build of libclc on old Ubuntu (Groovy & focal) as llvm-spir is too old on these version. See bug #52200 --- debian/changelog | 5 ++++- debian/rules | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8445a941..3889fb14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ llvm-toolchain-13 (1:13.0.1-8) UNRELEASED; urgency=medium - * New changelog + [ Sylvestre Ledru ] + * Disable the build of libclc on old Ubuntu (Groovy & focal) + as llvm-spir is too old on these version. + See bug #52200 -- Jordan Justen Wed, 26 Oct 2022 10:13:59 -0700 diff --git a/debian/rules b/debian/rules index e5d8cc21..cce08fec 100755 --- a/debian/rules +++ b/debian/rules @@ -217,7 +217,12 @@ endif ifeq ($(shell command -v llvm-spirv),) LLVM_SPIRV_INSTALLED = no else -LLVM_SPIRV_INSTALLED = yes + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv) ge 10.0.0 ; echo $$?),0) +# Too old llvm-spirv version are failing. See #52200 + LLVM_SPIRV_INSTALLED = yes + else + LLVM_SPIRV_INSTALLED = no + endif endif LIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" From 34a7ac73ed9387fc9efa0f179f7ae8c837be8af6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 18 Oct 2021 17:53:32 +0200 Subject: [PATCH 03/10] fix the version check --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index cce08fec..9e4f0438 100755 --- a/debian/rules +++ b/debian/rules @@ -217,7 +217,7 @@ endif ifeq ($(shell command -v llvm-spirv),) LLVM_SPIRV_INSTALLED = no else - ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv) ge 10.0.0 ; echo $$?),0) + 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 else From 0951f6940528c215a27c28b0989f6a1f73459827 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:47 -0700 Subject: [PATCH 04/10] 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 From 966bddda9db74b415a19744fa726c19f6d1ff0a9 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:56 -0700 Subject: [PATCH 05/10] 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 f8978b69..b30538a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ llvm-toolchain-13 (1:13.0.1-8) 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 fafa5d47..475cb7f9 100755 --- a/debian/rules +++ b/debian/rules @@ -228,8 +228,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 @@ -642,7 +644,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 91091e3de5cdb7a7b3213e63b7355423562fc9e9 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:23:06 -0700 Subject: [PATCH 06/10] 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 b30538a8..94bb3176 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ llvm-toolchain-13 (1:13.0.1-8) 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 8bd4827f..cbe6d748 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -138,7 +138,6 @@ lower-python-dep.diff scan-build-py-fix-analyze-path.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 a3165e69a2e695f72698fe3795685a2726e03f4e Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:23:14 -0700 Subject: [PATCH 07/10] 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 94bb3176..5d043c99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ llvm-toolchain-13 (1:13.0.1-8) 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 475cb7f9..891ce6b9 100755 --- a/debian/rules +++ b/debian/rules @@ -214,16 +214,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 From 53ad1796240a07feab11c4095da66fd3724ff222 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Oct 2022 11:50:50 +0200 Subject: [PATCH 08/10] prepare upload --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5d043c99..76514b61 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-13 (1:13.0.1-8) UNRELEASED; urgency=medium +llvm-toolchain-13 (1:13.0.1-8) unstable; urgency=medium [ Sylvestre Ledru ] * Disable the build of libclc on old Ubuntu (Groovy & focal) From 0e6da0b3566cf0e363dcbf7a2146f3517998a9f6 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 28 Oct 2022 10:19:42 -0700 Subject: [PATCH 09/10] d/changelog: Start 1:13.0.1-9 changelog Signed-off-by: Jordan Justen --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 76514b61..db610918 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-13 (1:13.0.1-9) UNRELEASED; urgency=medium + + * UNRELEASED + + -- Jordan Justen Fri, 28 Oct 2022 10:17:57 -0700 + llvm-toolchain-13 (1:13.0.1-8) unstable; urgency=medium [ Sylvestre Ledru ] From 37a8a75e8630b00daf4667b492976d89fc226ad6 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 28 Oct 2022 10:21:39 -0700 Subject: [PATCH 10/10] d/rules: Don't send an empty string to cmake when llvm-spirv is not found Signed-off-by: Jordan Justen --- debian/changelog | 2 +- debian/rules | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index db610918..cfac21b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ llvm-toolchain-13 (1:13.0.1-9) UNRELEASED; urgency=medium - * UNRELEASED + * d/rules: Don't send an empty string to cmake when llvm-spirv is not found -- Jordan Justen Fri, 28 Oct 2022 10:17:57 -0700 diff --git a/debian/rules b/debian/rules index 891ce6b9..698482c0 100755 --- a/debian/rules +++ b/debian/rules @@ -234,10 +234,10 @@ else endif LIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" -LIBCLC_TARGETS_LLVM_SPIRV := "" +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)" + 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