From 89e328e76bfd691f26934fe7c22181ee0454702b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 23 Oct 2022 16:08:11 +0200 Subject: [PATCH 01/29] Unbreak the cmake detection (Closes: #1021857, #1022414) --- debian/changelog | 6 ++++++ debian/rules | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2b401425..967e3e0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-14 (1:14.0.6-6) unstable; urgency=medium + + * Unbreak the cmake detection (Closes: #1021857, #1022414) + + -- Sylvestre Ledru Sun, 23 Oct 2022 16:07:45 +0200 + llvm-toolchain-14 (1:14.0.6-5) unstable; urgency=medium * Update of the build dep llvm-spirv => llvm-spirv-14 diff --git a/debian/rules b/debian/rules index 484d604a..6a6abcb8 100755 --- a/debian/rules +++ b/debian/rules @@ -938,8 +938,8 @@ endif # Also disable mlir-* checks in the cmake sed -i '/_IMPORT_CHECK_TARGETS \(mlir-\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake - sed -i '/_cmake_import_check_files_for_mli/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-release.cmake - sed -i '/_cmake_import_check_files_for_MLIR/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-release.cmake + sed -i '/_IMPORT_CHECK_FILES_FOR_\(mlir-\|llvm-bolt\|sancov\|Polly\|tblgen-lsp-server\|clang-format\|merge-fdata\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake + sed -i '/_cmake_import_check_files_for_\(mlir\|llvm-bolt\|sancov\|Polly\|tblgen-lsp-server\|clang-format\|merge-fdata\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake # Disable CMake's package validation checks for binaries that may not be installed sed -i 's|.*_IMPORT_CHECK_FILES_FOR_.*/bin/.*)|#&|' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake From 3bb6cd043834a55c0fcaab6d8bac2a978a6aba78 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 23 Oct 2022 16:08:57 +0200 Subject: [PATCH 02/29] add a test for wasm --- debian/qualify-clang.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index d96ed9a7..dfda6e44 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -1374,6 +1374,9 @@ EOF fi rm -f printf.c printf fi +echo '#include ' > foo.cpp +# Fails for now +clang++-$VERSION --target=wasm32-wasi -o foo.o -c foo.cpp||true echo ' #include From 62db712de0e6bd031537db127297567f8904408d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Oct 2022 09:23:31 +0200 Subject: [PATCH 03/29] disable sccache on bionic --- debian/rules | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/rules b/debian/rules index 6a6abcb8..3b8ab21f 100755 --- a/debian/rules +++ b/debian/rules @@ -429,6 +429,11 @@ ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes) export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/opt/sccache endif +# Disable sccache on bionic +ifneq (,$(filter $(DISTRO),bionic)) + SCCACHE_ENABLE=no +endif + GENERATOR=Ninja # enables cmake build targets like stage2-[target_name] From 0209958cde6c85b2247aa0537830ace9105a6821 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:31 -0700 Subject: [PATCH 04/29] 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 05/29] 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 06/29] 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 07/29] 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 08/29] 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 From 29308f4310a26ad5b236d23a6eca224131f6b20f Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 26 Oct 2022 10:22:31 -0700 Subject: [PATCH 09/29] 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 10/29] 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 11/29] 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 12/29] 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 13/29] 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 14/29] 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 15/29] 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 16/29] 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 e10ac5c55f5696ae9c90da285f7c63a745238220 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Oct 2022 12:47:30 +0200 Subject: [PATCH 17/29] Disable the cmake search for all binaries (cmake_import_check_files_for.*/bin/). Dunno why it regressed but we wasted too much time on this. --- debian/changelog | 8 ++++++++ debian/rules | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 967e3e0a..450fc1c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-14 (1:14.0.6-7) unstable; urgency=medium + + * Disable the cmake search for all binaries + (cmake_import_check_files_for.*/bin/). Dunno why it regressed + but we wasted too much time on this. + + -- Sylvestre Ledru Thu, 27 Oct 2022 12:47:19 +0200 + llvm-toolchain-14 (1:14.0.6-6) unstable; urgency=medium * Unbreak the cmake detection (Closes: #1021857, #1022414) diff --git a/debian/rules b/debian/rules index 3b8ab21f..01c163f7 100755 --- a/debian/rules +++ b/debian/rules @@ -943,8 +943,11 @@ endif # Also disable mlir-* checks in the cmake sed -i '/_IMPORT_CHECK_TARGETS \(mlir-\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake - sed -i '/_IMPORT_CHECK_FILES_FOR_\(mlir-\|llvm-bolt\|sancov\|Polly\|tblgen-lsp-server\|clang-format\|merge-fdata\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake - sed -i '/_cmake_import_check_files_for_\(mlir\|llvm-bolt\|sancov\|Polly\|tblgen-lsp-server\|clang-format\|merge-fdata\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake + + sed -i '/_cmake_import_check_files_for_.*\/bin\/.*/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake + sed -i '/_IMPORT_CHECK_FILES_FOR_.*\/bin\/.*/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake + sed -i '/_IMPORT_CHECK_FILES_FOR_\(mlir-\|Polly\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake + sed -i '/_cmake_import_check_files_for_\(mlir\|Polly\|MLIR\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake # Disable CMake's package validation checks for binaries that may not be installed sed -i 's|.*_IMPORT_CHECK_FILES_FOR_.*/bin/.*)|#&|' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake From 0e6da0b3566cf0e363dcbf7a2146f3517998a9f6 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 28 Oct 2022 10:19:42 -0700 Subject: [PATCH 18/29] 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 19/29] 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 From 2ae5beca4f01a8e8ee74fd1411b2f5596d394e61 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Oct 2022 09:08:20 +0200 Subject: [PATCH 20/29] remove the failed bionic sccache stuff --- debian/rules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/rules b/debian/rules index bbf1da04..09938ac3 100755 --- a/debian/rules +++ b/debian/rules @@ -439,11 +439,6 @@ ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes) export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/opt/sccache endif -# Disable sccache on bionic -ifneq (,$(filter $(DISTRO),bionic)) - SCCACHE_ENABLE=no -endif - GENERATOR=Ninja # enables cmake build targets like stage2-[target_name] From 2d8ec664cee381b8c938ea917e78936de8abec42 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 4 Nov 2022 19:36:34 +0100 Subject: [PATCH 21/29] move the lldb patches into a lldb dir --- debian/patches/{ => lldb}/lldb-libname.diff | 0 debian/patches/{ => lldb}/lldb-soname.diff | 0 debian/patches/{ => lldb}/print-lldb-path.patch | 0 debian/patches/{ => lldb}/test-disable-lldb-i386.diff | 0 debian/patches/series | 8 +++++--- 5 files changed, 5 insertions(+), 3 deletions(-) rename debian/patches/{ => lldb}/lldb-libname.diff (100%) rename debian/patches/{ => lldb}/lldb-soname.diff (100%) rename debian/patches/{ => lldb}/print-lldb-path.patch (100%) rename debian/patches/{ => lldb}/test-disable-lldb-i386.diff (100%) diff --git a/debian/patches/lldb-libname.diff b/debian/patches/lldb/lldb-libname.diff similarity index 100% rename from debian/patches/lldb-libname.diff rename to debian/patches/lldb/lldb-libname.diff diff --git a/debian/patches/lldb-soname.diff b/debian/patches/lldb/lldb-soname.diff similarity index 100% rename from debian/patches/lldb-soname.diff rename to debian/patches/lldb/lldb-soname.diff diff --git a/debian/patches/print-lldb-path.patch b/debian/patches/lldb/print-lldb-path.patch similarity index 100% rename from debian/patches/print-lldb-path.patch rename to debian/patches/lldb/print-lldb-path.patch diff --git a/debian/patches/test-disable-lldb-i386.diff b/debian/patches/lldb/test-disable-lldb-i386.diff similarity index 100% rename from debian/patches/test-disable-lldb-i386.diff rename to debian/patches/lldb/test-disable-lldb-i386.diff diff --git a/debian/patches/series b/debian/patches/series index a2fe91ba..1d83b5f0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -28,7 +28,7 @@ disable-display-PASS-UNSUPPORTED-XFAIL.diff # Lib names 0044-soname.diff -lldb-soname.diff +lldb/lldb-soname.diff #lldb-libname.diff openmp-soname.diff @@ -131,12 +131,12 @@ D98575.patch x86-fuzzer.patch python3-shebang.patch -print-lldb-path.patch +lldb/print-lldb-path.patch lower-python-dep.diff scan-build-py-fix-default-bin.diff omp-riscv64.patch -test-disable-lldb-i386.diff +lldb/test-disable-lldb-i386.diff unbreak-atomic-mips.diff llvm-fix-lld-linker-check.diff openmp-fix-runtimes-build.diff @@ -159,3 +159,5 @@ revert-update-doc.diff fix-typo.diff ubuntu-kinetic.patch fix-typo-1018770.diff +lldb/lldb-swig.diff +lldb/lldb-swig-2.diff From cb901ad96190e598a9a3ef7ff203a6ef9a10dfec Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 4 Nov 2022 19:36:47 +0100 Subject: [PATCH 22/29] add lldb swig patches --- debian/patches/lldb/lldb-swig-2.diff | 13 +++++++++++++ debian/patches/lldb/lldb-swig.diff | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 debian/patches/lldb/lldb-swig-2.diff create mode 100644 debian/patches/lldb/lldb-swig.diff diff --git a/debian/patches/lldb/lldb-swig-2.diff b/debian/patches/lldb/lldb-swig-2.diff new file mode 100644 index 00000000..54763838 --- /dev/null +++ b/debian/patches/lldb/lldb-swig-2.diff @@ -0,0 +1,13 @@ +diff --git a/lldb/bindings/python/python-typemaps.swig b/lldb/bindings/python/python-typemaps.swig +index 203be803d2ebd..11f68d59ae7be 100644 +--- a/lldb/bindings/python/python-typemaps.swig ++++ b/lldb/bindings/python/python-typemaps.swig +@@ -435,7 +435,7 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { + + %typemap(out) lldb::FileSP { + $result = nullptr; +- lldb::FileSP &sp = $1; ++ const lldb::FileSP &sp = $1; + if (sp) { + PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp)); + if (!pyfile.IsValid()) diff --git a/debian/patches/lldb/lldb-swig.diff b/debian/patches/lldb/lldb-swig.diff new file mode 100644 index 00000000..93b54528 --- /dev/null +++ b/debian/patches/lldb/lldb-swig.diff @@ -0,0 +1,26 @@ +diff --git a/lldb/bindings/CMakeLists.txt b/lldb/bindings/CMakeLists.txt +index c8aa0bcf96817..9eed2f1e62999 100644 +--- a/lldb/bindings/CMakeLists.txt ++++ b/lldb/bindings/CMakeLists.txt +@@ -26,8 +26,6 @@ set(SWIG_COMMON_FLAGS + -features autodoc + -I${LLDB_SOURCE_DIR}/include + -I${CMAKE_CURRENT_SOURCE_DIR} +- -D__STDC_LIMIT_MACROS +- -D__STDC_CONSTANT_MACROS + ${DARWIN_EXTRAS} + ) + +diff --git a/lldb/bindings/interfaces.swig b/lldb/bindings/interfaces.swig +index fb75513a0df1b..d984711bbd8a2 100644 +--- a/lldb/bindings/interfaces.swig ++++ b/lldb/bindings/interfaces.swig +@@ -1,8 +1,5 @@ + /* Various liblldb typedefs that SWIG needs to know about. */ + #define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */ +-/* The ISO C99 standard specifies that in C++ implementations limit macros such +- as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */ +-#define __STDC_LIMIT_MACROS + %include "stdint.i" + + %include "lldb/lldb-defines.h" From 875efbd5ba309fb19e9af6583970f790f7c21844 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 4 Nov 2022 19:37:32 +0100 Subject: [PATCH 23/29] Fix the lldb swig issues (closes: #1023444) --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 34ac6159..209c262a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-14 (1:14.0.6-8) UNRELEASED; urgency=medium + + * Fix the lldb swig issues (closes: #1023444) + + -- Sylvestre Ledru Fri, 04 Nov 2022 19:36:56 +0100 + llvm-toolchain-14 (1:14.0.6-7) unstable; urgency=medium * Disable the cmake search for all binaries From 1e3332f2bf0d95400f8b17c7d5d17a2a3302ce80 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 4 Nov 2022 19:44:02 +0100 Subject: [PATCH 24/29] fix version --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 209c262a..998bddf7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-14 (1:14.0.6-8) UNRELEASED; urgency=medium +llvm-toolchain-14 (1:14.0.6-8) unstable; urgency=medium * Fix the lldb swig issues (closes: #1023444) From ef8fc8008868f4420bc0ac0175f20d54a53a6c7d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Nov 2022 12:23:06 +0100 Subject: [PATCH 25/29] remove non applied patch --- .../remove-trailing-space-version.diff | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 debian/patches/remove-trailing-space-version.diff diff --git a/debian/patches/remove-trailing-space-version.diff b/debian/patches/remove-trailing-space-version.diff deleted file mode 100644 index fadcf7f7..00000000 --- a/debian/patches/remove-trailing-space-version.diff +++ /dev/null @@ -1,34 +0,0 @@ -Index: llvm-toolchain-10_10.0.1~+rc1/clang/lib/Basic/Version.cpp -=================================================================== ---- llvm-toolchain-10_10.0.1~+rc1.orig/clang/lib/Basic/Version.cpp -+++ llvm-toolchain-10_10.0.1~+rc1/clang/lib/Basic/Version.cpp -@@ -125,8 +125,12 @@ std::string getClangToolFullVersion(Stri - #ifdef CLANG_VENDOR - OS << CLANG_VENDOR; - #endif -- OS << ToolName << " version " CLANG_VERSION_STRING "-" DEB_PATCHSETVERSION " " -- << getClangFullRepositoryVersion(); -+ OS << ToolName << " version " CLANG_VERSION_STRING "-" DEB_PATCHSETVERSION; -+ -+ std::string repo = getClangFullRepositoryVersion(); -+ if (!repo.empty()) { -+ OS << " " << repo; -+ } - - return OS.str(); - } -@@ -139,7 +143,13 @@ std::string getClangFullCPPVersion() { - #ifdef CLANG_VENDOR - OS << CLANG_VENDOR; - #endif -- OS << "Clang " CLANG_VERSION_STRING " " << getClangFullRepositoryVersion(); -+ OS << "Clang " CLANG_VERSION_STRING; -+ -+ std::string repo = getClangFullRepositoryVersion(); -+ if (!repo.empty()) { -+ OS << " " << repo; -+ } -+ - return OS.str(); - } - From 63341e11a5f046da87c38981db7e3f4b47a48260 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Nov 2022 12:23:56 +0100 Subject: [PATCH 26/29] remove an old gcc 4.9 workaround --- debian/rules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/rules b/debian/rules index c69afcc7..8eab97a9 100755 --- a/debian/rules +++ b/debian/rules @@ -103,11 +103,6 @@ ifneq (,$(filter $(DEB_HOST_ARCH),i386 hurd-i386 kfreebsd-i386 armel mipsel powe LDFLAGS_EXTRA += -latomic endif -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.9-20140411-1~ ; echo $$?),0) -# Too old version of gcc. Force 4.9 - GCC_VERSION := 4.9 -endif - Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=OFF ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libz3-dev) gt 4.7.0; echo $$?),0) # no ocaml support in main for Ubuntu From 3270880abdc0788cc2b2c76f45322104c7297a2d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Nov 2022 15:19:49 +0100 Subject: [PATCH 27/29] We want to set the clang extra version ONLY in stage 2 because we want the clang stage 1 to be as reproducible as possible when building with sccache (because this tool do a hash using the compiler binary and other things) --- debian/rules | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 8eab97a9..f6cfbb0f 100755 --- a/debian/rules +++ b/debian/rules @@ -92,6 +92,12 @@ COMPILER_RT_USE_BUILTINS_LIBRARY := ON LIBCXX_EXCEPTIONS := ON LIBCXX_USE_COMPILER_RT := ON +# We want to set the clang extra version ONLY in stage 2 +# because we want the clang stage 1 to be as reproducible as possible +# when building with sccache (because this tool do a hash using the +# compiler binary and other things) +STAGE_2_CMAKE_EXTRA += -DCLANG_REPOSITORY_STRING=$(DEBIAN_REVISION) + ifneq (,$(filter $(DEB_HOST_ARCH),sparc sparc64)) STAGE_1_CMAKE_EXTRA += -DLLVM_PARALLEL_LINK_JOBS=4 endif @@ -523,9 +529,6 @@ override_dh_auto_configure: preconfigure $(CC) -v $(CXX) -v mkdir -p $(TARGET_BUILD) - mkdir -p clang/include/clang/Debian - sed -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \ - debian/debian_path.h > clang/include/clang/Debian/debian_path.h if test "$(SCAN_BUILD)" = "yes"; then \ patch -f -p1 < debian/patches/on-the-fly/use-scan-build-runtimes.diff||true; \ fi @@ -1171,7 +1174,7 @@ override_dh_gencontrol: override_dh_auto_clean: - rm -rf $(TARGET_BUILD) tools/clang/include/clang/Debian/debian_path.h llvm/docs/_build/ clang/docs/_build tools/clang/docs/_html/ + rm -rf $(TARGET_BUILD) llvm/docs/_build/ clang/docs/_build tools/clang/docs/_html/ # QA tools rm -rf cov-int/ reports/ rm -f `ls debian/*.in|sed -e "s|.in$$||g"` From 9ea3878d01abb0224522c5cf9c34584bdf9fd4ba Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Nov 2022 15:21:18 +0100 Subject: [PATCH 28/29] use the upstream option to set the option --- debian/patches/19-clang_debian_version.patch | 21 -------------------- debian/patches/series | 1 - 2 files changed, 22 deletions(-) delete mode 100644 debian/patches/19-clang_debian_version.patch diff --git a/debian/patches/19-clang_debian_version.patch b/debian/patches/19-clang_debian_version.patch deleted file mode 100644 index 89ac6bdc..00000000 --- a/debian/patches/19-clang_debian_version.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/clang/lib/Basic/Version.cpp -=================================================================== ---- llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415.orig/clang/lib/Basic/Version.cpp -+++ llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/clang/lib/Basic/Version.cpp -@@ -14,6 +14,7 @@ - #include "clang/Basic/LLVM.h" - #include "clang/Config/config.h" - #include "llvm/Support/raw_ostream.h" -+#include "clang/Debian/debian_path.h" - #include - #include - -@@ -95,7 +96,7 @@ std::string getClangToolFullVersion(Stri - #ifdef CLANG_VENDOR - OS << CLANG_VENDOR; - #endif -- OS << ToolName << " version " CLANG_VERSION_STRING; -+ OS << ToolName << " version " CLANG_VERSION_STRING "-" DEB_PATCHSETVERSION; - - std::string repo = getClangFullRepositoryVersion(); - if (!repo.empty()) { diff --git a/debian/patches/series b/debian/patches/series index 1d83b5f0..58e159af 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ # Debian versions -19-clang_debian_version.patch 0003-Debian-version-info-and-bugreport.patch clang-format-version.diff clang-analyzer-force-version.diff From e9022e33bc7dcce84eb6745d1483aab65c514ea7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Nov 2022 16:17:42 +0100 Subject: [PATCH 29/29] remove old an old and useless patch --- ...03-Debian-version-info-and-bugreport.patch | 19 ------------------- debian/patches/series | 1 - 2 files changed, 20 deletions(-) delete mode 100644 debian/patches/0003-Debian-version-info-and-bugreport.patch diff --git a/debian/patches/0003-Debian-version-info-and-bugreport.patch b/debian/patches/0003-Debian-version-info-and-bugreport.patch deleted file mode 100644 index 0de4a206..00000000 --- a/debian/patches/0003-Debian-version-info-and-bugreport.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- - lib/Support/CommandLine.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: llvm-toolchain-snapshot_14~++20210910110407+146ec74a8382/llvm/lib/Support/CommandLine.cpp -=================================================================== ---- llvm-toolchain-snapshot_14~++20210910110407+146ec74a8382.orig/llvm/lib/Support/CommandLine.cpp -+++ llvm-toolchain-snapshot_14~++20210910110407+146ec74a8382/llvm/lib/Support/CommandLine.cpp -@@ -2423,6 +2423,10 @@ public: - OS << " " << LLVM_VERSION_INFO; - #endif - OS << "\n "; -+#ifdef LLVM_DEBIAN_INFO -+ OS << LLVM_DEBIAN_INFO; -+#endif -+ OS << "\n "; - #if LLVM_IS_DEBUG_BUILD - OS << "DEBUG build"; - #else diff --git a/debian/patches/series b/debian/patches/series index 58e159af..5852e004 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ # Debian versions -0003-Debian-version-info-and-bugreport.patch clang-format-version.diff clang-analyzer-force-version.diff