From 1d1009e59609950d56189d32df2e0caa368e3f6d Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 31 Oct 2023 23:35:25 +0100 Subject: [PATCH 01/35] Do not limit the parallel links on riscv64 The parallel links has been limited to 2 on riscv64 to support the Ubuntu riscv64 buildds. Now that the number of process is determined depending on the amount of buildd memory, this is no need anymore. --- debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/rules b/debian/rules index cb65d3f9..f4aa9ac8 100755 --- a/debian/rules +++ b/debian/rules @@ -210,7 +210,6 @@ endif # debug symbols OOM in Ubuntu Ubuntu and slows down build process. ifneq (,$(filter $(DEB_HOST_ARCH),riscv64)) opt_flags = -O2 -DNDEBUG -g0 - STAGE_ALL_CMAKE_EXTRA += -DLLVM_PARALLEL_LINK_JOBS=2 else opt_flags = -O2 -DNDEBUG -g1 endif From 35076f5af3efb3fcec33960a175cb1cb377ead4d Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Thu, 23 Nov 2023 09:45:14 +0100 Subject: [PATCH 02/35] * Fix stripping build flags on Ubuntu/ppc64el. --- debian/changelog | 1 + debian/rules | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ab4a95bc..1a862485 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium * Further limit the number of parallel processes * Don't build-depend on llvm-spirv-17 on armel and mipsel (LLVM 17 is not yet built on these architectures). + * Fix stripping build flags on Ubuntu/ppc64el. [ Sylvestre Ledru ] * Add a symlink for libc++experimental.a to /usr/lib/*/libc++experimental.a diff --git a/debian/rules b/debian/rules index 7b8438cd..0641f0ec 100755 --- a/debian/rules +++ b/debian/rules @@ -65,9 +65,13 @@ CONFIGURE_EXTRA = # disable fixfilepath in favor of the llvm-project supplied flavor, disable lto export DEB_BUILD_MAINT_OPTIONS = reproducible=-fixfilepath,-fixdebugpath optimize=-lto # these are handled on a per stage / build basis -export DEB_CFLAGS_MAINT_STRIP = -g -O2 -export DEB_CXXFLAGS_MAINT_STRIP = -g -O2 - +ifeq ($(VENDOR)-$(DEB_HOST_ARCH),Ubuntu-ppc64el) + export DEB_CFLAGS_MAINT_STRIP = -g -O3 + export DEB_CXXFLAGS_MAINT_STRIP = -g -O3 +else + export DEB_CFLAGS_MAINT_STRIP = -g -O2 + export DEB_CXXFLAGS_MAINT_STRIP = -g -O2 +endif include /usr/share/dpkg/buildflags.mk # We use a stage2 build. It means that a first clang is built using gcc, From d2e2ed9cdb4b65a6d609a1931ac00de4956bab24 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 23 Nov 2023 23:57:36 +0100 Subject: [PATCH 03/35] llvm-spirv-17: fix 'llvm-spirv-17 but it is not installable' on i386 --- debian/control | 2 +- debian/control.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 05127efc..b2b699c9 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, # llvm-spirv-17 [amd64 arm64 armel armhf i386 mips64el ppc64 ppc64el riscv64 s390x] | hello [!i386], - llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello [!i386], + llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello, spirv-tools [linux-any] | hello [!i386], wasi-libc | hello, libcurl4-openssl-dev | libcurl-dev, diff --git a/debian/control.in b/debian/control.in index 73e8d1d8..e8ae25cb 100644 --- a/debian/control.in +++ b/debian/control.in @@ -24,7 +24,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, # llvm-spirv-17 [amd64 arm64 armel armhf i386 mips64el ppc64 ppc64el riscv64 s390x] | hello [!i386], - llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello [!i386], + llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello, spirv-tools [linux-any] | hello [!i386], wasi-libc | hello, libcurl4-openssl-dev | libcurl-dev, From 5cda29f50904e3c99bd831157ac8fce29fbf04ca Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Fri, 24 Nov 2023 17:45:03 +0100 Subject: [PATCH 04/35] * libclang1-17: Only encode the major version in the soname. Closes: #1056126. --- debian/changelog | 1 + debian/libclang-X.Y-dev.links.in | 6 +++--- debian/libclang1-X.Y.links.in | 6 +++--- debian/libclang1-X.Y.symbols.in | 2 +- debian/patches/libclang-major-version-only.diff | 11 +++++++++++ debian/patches/series | 1 + debian/rules | 4 ++++ 7 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 debian/patches/libclang-major-version-only.diff diff --git a/debian/changelog b/debian/changelog index 1a862485..da975607 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium * Don't build-depend on llvm-spirv-17 on armel and mipsel (LLVM 17 is not yet built on these architectures). * Fix stripping build flags on Ubuntu/ppc64el. + * libclang1-17: Only encode the major version in the soname. Closes: #1056126. [ Sylvestre Ledru ] * Add a symlink for libc++experimental.a to /usr/lib/*/libc++experimental.a diff --git a/debian/libclang-X.Y-dev.links.in b/debian/libclang-X.Y-dev.links.in index a82e6089..7cd10c4d 100644 --- a/debian/libclang-X.Y-dev.links.in +++ b/debian/libclang-X.Y-dev.links.in @@ -1,3 +1,3 @@ -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so diff --git a/debian/libclang1-X.Y.links.in b/debian/libclang1-X.Y.links.in index dc4b7a44..f735225c 100644 --- a/debian/libclang1-X.Y.links.in +++ b/debian/libclang1-X.Y.links.in @@ -1,4 +1,4 @@ # as upstream -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 -usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1 -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1 +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ +usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1 diff --git a/debian/libclang1-X.Y.symbols.in b/debian/libclang1-X.Y.symbols.in index 49724304..2f07205d 100644 --- a/debian/libclang1-X.Y.symbols.in +++ b/debian/libclang1-X.Y.symbols.in @@ -1,4 +1,4 @@ -libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ libclang1-@LLVM_VERSION@ #MINVER# +libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ libclang1-@LLVM_VERSION@ #MINVER# (optional)LLVM_13@LLVM_13 1:15.0.7-3 (optional)LLVM_16@LLVM_16 1:16.0.2-1 (optional)LLVM_17@LLVM_17 1:17.0.1-1 diff --git a/debian/patches/libclang-major-version-only.diff b/debian/patches/libclang-major-version-only.diff new file mode 100644 index 00000000..36800f38 --- /dev/null +++ b/debian/patches/libclang-major-version-only.diff @@ -0,0 +1,11 @@ +--- a/clang/tools/libclang/CMakeLists.txt ++++ b/clang/tools/libclang/CMakeLists.txt +@@ -196,7 +196,7 @@ + OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map) + + set_target_properties(libclang PROPERTIES +- VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX} ++ VERSION ${LLVM_VERSION_MAJOR} + ${LIBCLANG_SOVERSION_ARG}) + endif() + endif() diff --git a/debian/patches/series b/debian/patches/series index 1bb20ec6..633aba14 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -149,3 +149,4 @@ bolt-disable-emit-relocs.patch link-grpc.diff D158066-simd-ppc64el.patch ubuntu-releases.patch +libclang-major-version-only.diff diff --git a/debian/rules b/debian/rules index 0641f0ec..f5413cb5 100755 --- a/debian/rules +++ b/debian/rules @@ -13,12 +13,14 @@ GXX_VERSIONED_PACKAGE := $(shell dpkg-query -W -f '$${Depends}' g++ | grep -o GXX_VERSIONED_EXECUTABLE := $(shell dpkg -L $(GXX_VERSIONED_PACKAGE) | grep '/usr/bin/g++-[0-9][0-9.]*' | xargs ls -d | tail -n1 ) GCC_VERSION := $(subst /usr/bin/g++-,,$(GXX_VERSIONED_EXECUTABLE)) +LLVM_EPOCH := 1: LLVM_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") LLVM_VERSION_FULL := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1,p") LLVM_VERSION_SNAPSHOT := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:(.*),\1,p") ifeq ($(LLVM_VERSION),$(LLVM_VERSION_FULL)) LLVM_VERSION_FULL := $(LLVM_VERSION).0.0 endif +LLVM_VERSION_NEXT := $(shell echo $(LLVM_VERSION_FULL) | awk -F. '{ OFS="."; $$NF+=1; print}') SOURCE_NAME := $(shell dpkg-parsechangelog -S Source) ifneq (,$(findstring snapshot,$(SOURCE_NAME))) @@ -604,7 +606,9 @@ stamps/preconfigure: sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \ -e "s|@BRANCH_NAME@|$(BRANCH_NAME)|g" \ -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \ + -e "s|@LLVM_EPOCH@|$(LLVM_EPOCH)|g" \ -e "s|@LLVM_VERSION_FULL@|$(LLVM_VERSION_FULL)|g" \ + -e "s|@LLVM_VERSION_NEXT@|$(LLVM_VERSION_NEXT)|g" \ -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \ done From 0bb9f9b7776f4359177c2f7137af45e3addd88d3 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sat, 25 Nov 2023 09:54:10 +0100 Subject: [PATCH 05/35] * libclang1-17: Provide a symlink for the last soname with the full version. --- debian/changelog | 1 + debian/libclang1-X.Y.links.in | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index da975607..b817622a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium yet built on these architectures). * Fix stripping build flags on Ubuntu/ppc64el. * libclang1-17: Only encode the major version in the soname. Closes: #1056126. + * libclang1-17: Provide a symlink for the last soname with the full version. [ Sylvestre Ledru ] * Add a symlink for libc++experimental.a to /usr/lib/*/libc++experimental.a diff --git a/debian/libclang1-X.Y.links.in b/debian/libclang1-X.Y.links.in index f735225c..76b6c36c 100644 --- a/debian/libclang1-X.Y.links.in +++ b/debian/libclang1-X.Y.links.in @@ -2,3 +2,5 @@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1 +# one link for the last soname with the full version +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ From 959d8c8ee100df40a8f3b19632a512c3b194ffd5 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Sat, 25 Nov 2023 11:20:13 +0100 Subject: [PATCH 06/35] Don't install *clang_rt* on sparc and sparc64 --- debian/changelog | 3 +++ debian/libclang-rt-X.Y-dev.install.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b817622a..59840cff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium * add a check that, if we are going to build wasm, wasi-libc is installed on the system + [ John Paul Adrian Glaubitz ] + * Don't install *clang_rt* on sparc and sparc64 + -- Sylvestre Ledru Mon, 20 Nov 2023 19:34:35 +0100 llvm-toolchain-17 (1:17.0.5-1) unstable; urgency=medium diff --git a/debian/libclang-rt-X.Y-dev.install.in b/debian/libclang-rt-X.Y-dev.install.in index 6864ec82..ebe7c0bd 100644 --- a/debian/libclang-rt-X.Y-dev.install.in +++ b/debian/libclang-rt-X.Y-dev.install.in @@ -2,7 +2,7 @@ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/share/*.txt usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/include/sanitizer/ -usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/lib/*/*clang_rt* +[!sparc !sparc64] usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/lib/*/*clang_rt* usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/README.txt usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/include/fuzzer/ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/include/orc/c_api.h From 70cf59d852e16acfe40067d297b7cf0d7ba7fd3b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Nov 2023 10:27:53 +0100 Subject: [PATCH 07/35] rebase of the patch --- debian/patches/0044-soname.diff | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/patches/0044-soname.diff b/debian/patches/0044-soname.diff index c678f7b0..ea0313c7 100644 --- a/debian/patches/0044-soname.diff +++ b/debian/patches/0044-soname.diff @@ -3,10 +3,10 @@ tools/llvm-shlib/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -Index: llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/clang/tools/libclang/CMakeLists.txt +Index: llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8/clang/tools/libclang/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79.orig/clang/tools/libclang/CMakeLists.txt -+++ llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/clang/tools/libclang/CMakeLists.txt +--- llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8.orig/clang/tools/libclang/CMakeLists.txt ++++ llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8/clang/tools/libclang/CMakeLists.txt @@ -134,7 +134,7 @@ if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHE remove_definitions("-D_XOPEN_SOURCE=700") endif() @@ -16,10 +16,10 @@ Index: llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/clang/tools/libc OUTPUT_NAME ${output_name} ${SOURCES} -Index: llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/llvm/tools/llvm-shlib/CMakeLists.txt +Index: llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8/llvm/tools/llvm-shlib/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79.orig/llvm/tools/llvm-shlib/CMakeLists.txt -+++ llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/llvm/tools/llvm-shlib/CMakeLists.txt +--- llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8.orig/llvm/tools/llvm-shlib/CMakeLists.txt ++++ llvm-toolchain-17_17.0.6~++20231127102111+f6c231c15ec8/llvm/tools/llvm-shlib/CMakeLists.txt @@ -32,6 +32,8 @@ if(LLVM_BUILD_LLVM_DYLIB) endif() add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) @@ -27,5 +27,5 @@ Index: llvm-toolchain-snapshot_17~++20230523093327+96a003b9bf79/llvm/tools/llvm- + set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME + list(REMOVE_DUPLICATES LIB_NAMES) - if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) - OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") + if((MINGW) OR (HAIKU) + OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") From c07405b825c6e4f87b459c206b59ee7d43c3a5bc Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Mon, 27 Nov 2023 10:36:47 +0100 Subject: [PATCH 08/35] * Restore the patch for D148945, searching /usr/lib/llvm-17/lib by default. Closes: #1056580. --- debian/changelog | 2 ++ debian/patches/D148945-revert.diff | 21 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 24 insertions(+) create mode 100644 debian/patches/D148945-revert.diff diff --git a/debian/changelog b/debian/changelog index 59840cff..6eda3383 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium * Fix stripping build flags on Ubuntu/ppc64el. * libclang1-17: Only encode the major version in the soname. Closes: #1056126. * libclang1-17: Provide a symlink for the last soname with the full version. + * Restore the patch for D148945, searching /usr/lib/llvm-17/lib by default. + Closes: #1056580. [ Sylvestre Ledru ] * Add a symlink for libc++experimental.a to /usr/lib/*/libc++experimental.a diff --git a/debian/patches/D148945-revert.diff b/debian/patches/D148945-revert.diff new file mode 100644 index 00000000..73426bdb --- /dev/null +++ b/debian/patches/D148945-revert.diff @@ -0,0 +1,21 @@ +Restore that for now, we're not GenToo ... + +https://reviews.llvm.org/D148945 +https://reviews.llvm.org/D122444 + +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -333,6 +333,13 @@ Linux::Linux(const Driver &D, const llvm + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++ // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs ++ // libc++.so in D.Dir+"/../lib/". Detect this path. ++ // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported. ++ if (StringRef(D.Dir).startswith(SysRoot) && ++ D.getVFS().exists(D.Dir + "/../lib/libc++.so")) ++ addPathIfExists(D, D.Dir + "/../lib", Paths); ++ + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); + } diff --git a/debian/patches/series b/debian/patches/series index 633aba14..20770031 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -150,3 +150,4 @@ link-grpc.diff D158066-simd-ppc64el.patch ubuntu-releases.patch libclang-major-version-only.diff +D148945-revert.diff From a505f7c3093c821bc92f3369f3c1f4af64b972a5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 28 Nov 2023 11:42:43 +0100 Subject: [PATCH 09/35] fix unpack --- debian/unpack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/unpack.sh b/debian/unpack.sh index 50beaf17..77447f06 100644 --- a/debian/unpack.sh +++ b/debian/unpack.sh @@ -1,6 +1,6 @@ set -e -ORIG_VERSION=snapshot -MAJOR_VERSION=17 # 8.0.1 +ORIG_VERSION=17 +MAJOR_VERSION=17.0.0 # 8.0.1 REV=`ls -1 *${ORIG_VERSION}_${MAJOR_VERSION}*~+*xz | tail -1|perl -ne 'print "$1\n" if /~\+(.*)\.orig/;' | sort -ru` VERSION=$REV From 408a72442de9473f683bc5ea4e9290a0170e0288 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 28 Nov 2023 12:17:09 +0100 Subject: [PATCH 10/35] fix changelog --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6eda3383..c32620a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium +llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium [ Matthias Klose ] * Further limit the number of parallel processes @@ -11,6 +11,7 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium Closes: #1056580. [ Sylvestre Ledru ] + * New upstream release * Add a symlink for libc++experimental.a to /usr/lib/*/libc++experimental.a to fix https://github.com/llvm/llvm-project/issues/72753 * try to relax the wasi-libc dep declaration for apt.llvm.org @@ -20,7 +21,7 @@ llvm-toolchain-17 (1:17.0.5-2) UNRELEASED; urgency=medium [ John Paul Adrian Glaubitz ] * Don't install *clang_rt* on sparc and sparc64 - -- Sylvestre Ledru Mon, 20 Nov 2023 19:34:35 +0100 + -- Sylvestre Ledru Tue, 28 Nov 2023 11:43:43 +0100 llvm-toolchain-17 (1:17.0.5-1) unstable; urgency=medium From 70032f71d7d5ad106f51d1fa844366e93cc97040 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 30 Nov 2023 22:04:50 +0100 Subject: [PATCH 11/35] Add new cmake-clang-test to spot issues such as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057151 --- debian/tests/cmake-clang-test | 29 ++++++++++++++++++++ debian/tests/{cmake-test => cmake-llvm-test} | 4 +-- debian/tests/control | 5 +++- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100755 debian/tests/cmake-clang-test rename debian/tests/{cmake-test => cmake-llvm-test} (91%) diff --git a/debian/tests/cmake-clang-test b/debian/tests/cmake-clang-test new file mode 100755 index 00000000..89aa8e55 --- /dev/null +++ b/debian/tests/cmake-clang-test @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +LLVM_VERSION=17 + +# this is taken from libjsoncpp package +# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we +# can avoid duplicating the effort (signal handling, etc.) here. +if [ -z "$AUTOPKGTEST_TMP" ] +then + echo "Required envvar AUTOPKGTEST_TMP \"$AUTOPKGTEST_TMP\" is not set" >&2 + exit 1 +fi + + +# the idea was taken from spirv-llvm-translator package + +cd "$AUTOPKGTEST_TMP" +cat < CMakeLists.txt +cmake_minimum_required(VERSION 3.22) +project(cmake-clang-test) +find_package(Clang) + +EOF + + +mkdir build && cd build +cmake .. diff --git a/debian/tests/cmake-test b/debian/tests/cmake-llvm-test similarity index 91% rename from debian/tests/cmake-test rename to debian/tests/cmake-llvm-test index f97d01e7..abaee6a2 100755 --- a/debian/tests/cmake-test +++ b/debian/tests/cmake-llvm-test @@ -18,8 +18,8 @@ fi cd "$AUTOPKGTEST_TMP" cat < CMakeLists.txt -cmake_minimum_required(VERSION 3.7) -project(cmake-test) +cmake_minimum_required(VERSION 3.22) +project(cmake-llvm-test) find_package(LLVM $LLVM_VERSION REQUIRED COMPONENTS Analysis diff --git a/debian/tests/control b/debian/tests/control index fd712f0f..fac936c4 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -11,9 +11,12 @@ Depends: @, cmake, make, g++, libstdc++-13-dev Restrictions: allow-stderr Architecture: amd64 arm64 -Tests: cmake-test +Tests: cmake-llvm-test Depends: gcc, build-essential, cmake, llvm-17-dev +Tests: cmake-clang-test +Depends: gcc, build-essential, cmake, clang-17 + Test-Command: python3 -c "import lldb; print(lldb.__file__); print(lldb)" Depends: python3-lldb-17 From 81ad4606812b05d8f867b356d28f5926137dcd68 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 30 Nov 2023 22:09:44 +0100 Subject: [PATCH 12/35] Add missing dependency for new test --- debian/tests/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index fac936c4..1e3e72a6 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -15,7 +15,7 @@ Tests: cmake-llvm-test Depends: gcc, build-essential, cmake, llvm-17-dev Tests: cmake-clang-test -Depends: gcc, build-essential, cmake, clang-17 +Depends: gcc, build-essential, cmake, llvm-17-dev, clang-17, libclang-17-dev Test-Command: python3 -c "import lldb; print(lldb.__file__); print(lldb)" Depends: python3-lldb-17 From a483a6798ae742592827bba425b814080a53c698 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 1 Dec 2023 10:49:34 +0100 Subject: [PATCH 13/35] Try to fix Debian bug #1057151 --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index f5413cb5..aadfed07 100755 --- a/debian/rules +++ b/debian/rules @@ -1235,8 +1235,8 @@ endif # 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 -# Adjust to the existing symlink. See #994827 - sed -i "s|libclang-$(LLVM_VERSION).so.$(LLVM_VERSION).*\"|libclang-$(LLVM_VERSION).so.1\"|" $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake +# Adjust to the existing symlink. See #994827 #1057151 + sed -i "s|libclang-$(LLVM_VERSION).so.$(LLVM_VERSION).*\"|libclang-$(LLVM_VERSION).so.$(LLVM_VERSION)\"|" $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake # Managed in python*-lldb-X.Y.links.in rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/*-packages/lldb/_lldb.so From 83ad62f9cf5a8a637055dea281b9e43e5767713a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 1 Dec 2023 10:50:39 +0100 Subject: [PATCH 14/35] Update changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index c32620a4..81c99296 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium + + * Add new cmake-clang-test to spot issues such as + Debina bug #1057151 + * Fix cmake file (Closes: #1057151) + + -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 + llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium [ Matthias Klose ] From e6bb61d2176fd5b03e15df05008b49faa7bff33b Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Fri, 1 Dec 2023 19:11:33 +0100 Subject: [PATCH 15/35] * Also use the free swap to determine the number of parallel processes. --- debian/changelog | 4 ++++ debian/rules | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 81c99296..0bd65adc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium + [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as Debina bug #1057151 * Fix cmake file (Closes: #1057151) + [ Matthias Klose ] + * Also use the free swap to determine the number of parallel processes. + -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index aadfed07..680c2fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -53,7 +53,7 @@ ifneq (,$(filter flang-$(LLVM_VERSION), $(packages))) else MEM_PER_CPU=2100 endif -NJOBS := $(shell mt=`awk '/^MemTotal/ { print $$2 }' /proc/meminfo`; \ +NJOBS := $(shell mt=`awk '/^(MemAvail|SwapFree)/ { mt += $$2 } END {print mt}' /proc/meminfo`; \ awk -vn=$(NCPUS) -vmt=$$mt -vm=$(MEM_PER_CPU) \ 'END { mt/=1024; n2 = int(mt/m); print n==1 ? 1 : n2 Date: Fri, 1 Dec 2023 23:37:39 +0100 Subject: [PATCH 16/35] Fix typo --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0bd65adc..10594ef6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as - Debina bug #1057151 + Debian bug #1057151 * Fix cmake file (Closes: #1057151) [ Matthias Klose ] From 97633b6d51ebc8579c5dbecd12a02fb933620620 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sat, 2 Dec 2023 23:20:35 +0100 Subject: [PATCH 17/35] * Set the cpu defaults for the ARM32 architectures: - armel: arm9e. Closes: #1056115. - armhf: cortex-a7. --- debian/changelog | 3 +++ debian/patches/arm32-defaults.diff | 18 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 22 insertions(+) create mode 100644 debian/patches/arm32-defaults.diff diff --git a/debian/changelog b/debian/changelog index 10594ef6..9edbef3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium [ Matthias Klose ] * Also use the free swap to determine the number of parallel processes. + * Set the cpu defaults for the ARM32 architectures: + - armel: arm9e. Closes: #1056115. + - armhf: cortex-a7. -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 diff --git a/debian/patches/arm32-defaults.diff b/debian/patches/arm32-defaults.diff new file mode 100644 index 00000000..fc077b65 --- /dev/null +++ b/debian/patches/arm32-defaults.diff @@ -0,0 +1,18 @@ +--- a/llvm/lib/TargetParser/ARMTargetParser.cpp ++++ b/llvm/lib/TargetParser/ARMTargetParser.cpp +@@ -558,6 +558,15 @@ + if (MArch == "v7k") + return "cortex-a7"; + break; ++ case llvm::Triple::Linux: ++ switch (Triple.getEnvironment()) { ++ case llvm::Triple::GNUEABI: ++ return "arm9e"; // armv5te ++ case llvm::Triple::GNUEABIHF: ++ return "cortex-a7"; // armv7-a ++ default: ++ return "armv5"; ++ } + default: + break; + } diff --git a/debian/patches/series b/debian/patches/series index 20770031..f77e9e6f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -151,3 +151,4 @@ D158066-simd-ppc64el.patch ubuntu-releases.patch libclang-major-version-only.diff D148945-revert.diff +arm32-defaults.diff From 695fe3013f0a13151e83ca1dc8dcb2306464935b Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Mon, 4 Dec 2023 13:23:09 +0100 Subject: [PATCH 18/35] * libclang1-17: Hard-code the last full versions for the symlinks. --- debian/changelog | 1 + debian/libclang1-X.Y.links.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9edbef3d..54ffe469 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Set the cpu defaults for the ARM32 architectures: - armel: arm9e. Closes: #1056115. - armhf: cortex-a7. + * libclang1-17: Hard-code the last full versions for the symlinks. -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 diff --git a/debian/libclang1-X.Y.links.in b/debian/libclang1-X.Y.links.in index 76b6c36c..b1ab4423 100644 --- a/debian/libclang1-X.Y.links.in +++ b/debian/libclang1-X.Y.links.in @@ -3,4 +3,5 @@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1 # one link for the last soname with the full version -usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION_FULL@ +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.17.0.5 +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.17.0.4 From 04b600fe3bac81a92dbc5f180a6127ace270cd1d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 5 Dec 2023 07:41:52 +0100 Subject: [PATCH 19/35] Revert " * Set the cpu defaults for the ARM32 architectures:" for causing this issue: https://lore.kernel.org/lkml/20231204225148.GA2094126@dev-arch.thelio-3990X/T/ This reverts commit 97633b6d51ebc8579c5dbecd12a02fb933620620. --- debian/changelog | 10 ++++++++++ debian/patches/arm32-defaults.diff | 18 ------------------ debian/patches/series | 1 - 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 debian/patches/arm32-defaults.diff diff --git a/debian/changelog b/debian/changelog index 54ffe469..e4cd45c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium +<<<<<<< [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as Debian bug #1057151 @@ -11,6 +12,15 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium - armel: arm9e. Closes: #1056115. - armhf: cortex-a7. * libclang1-17: Hard-code the last full versions for the symlinks. +======= + [ Gianfranco Costamagna ] + * Add new cmake-clang-test to spot issues such as + Debian bug #1057151 + * Fix cmake file (Closes: #1057151) + + [ Matthias Klose ] + * Also use the free swap to determine the number of parallel processes. +>>>>>>> -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 diff --git a/debian/patches/arm32-defaults.diff b/debian/patches/arm32-defaults.diff deleted file mode 100644 index fc077b65..00000000 --- a/debian/patches/arm32-defaults.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- a/llvm/lib/TargetParser/ARMTargetParser.cpp -+++ b/llvm/lib/TargetParser/ARMTargetParser.cpp -@@ -558,6 +558,15 @@ - if (MArch == "v7k") - return "cortex-a7"; - break; -+ case llvm::Triple::Linux: -+ switch (Triple.getEnvironment()) { -+ case llvm::Triple::GNUEABI: -+ return "arm9e"; // armv5te -+ case llvm::Triple::GNUEABIHF: -+ return "cortex-a7"; // armv7-a -+ default: -+ return "armv5"; -+ } - default: - break; - } diff --git a/debian/patches/series b/debian/patches/series index f77e9e6f..20770031 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -151,4 +151,3 @@ D158066-simd-ppc64el.patch ubuntu-releases.patch libclang-major-version-only.diff D148945-revert.diff -arm32-defaults.diff From e03dd055542c67176307db28fcab544b291af110 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 5 Dec 2023 07:45:54 +0100 Subject: [PATCH 20/35] fix changelog --- debian/changelog | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index e4cd45c5..f4dcf507 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,5 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium -<<<<<<< [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as Debian bug #1057151 @@ -8,19 +7,8 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium [ Matthias Klose ] * Also use the free swap to determine the number of parallel processes. - * Set the cpu defaults for the ARM32 architectures: - - armel: arm9e. Closes: #1056115. - - armhf: cortex-a7. * libclang1-17: Hard-code the last full versions for the symlinks. -======= - [ Gianfranco Costamagna ] - * Add new cmake-clang-test to spot issues such as - Debian bug #1057151 - * Fix cmake file (Closes: #1057151) - - [ Matthias Klose ] * Also use the free swap to determine the number of parallel processes. ->>>>>>> -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 From 01a06b481e5a2610c7387149b58978c3ec281f2c Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Tue, 5 Dec 2023 09:42:31 +0100 Subject: [PATCH 21/35] * Set the cpu defaults for the ARM32 architectures: - armel: arm926ej-s. Closes: #1056115. - armhf: cortex-a8. Thanks to Arnd Bergmann and Ard Biesheuvel for the fixes. --- debian/changelog | 4 ++++ debian/patches/arm32-defaults.diff | 14 ++++++++++++++ debian/patches/series | 1 + 3 files changed, 19 insertions(+) create mode 100644 debian/patches/arm32-defaults.diff diff --git a/debian/changelog b/debian/changelog index f4dcf507..27ac99ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Also use the free swap to determine the number of parallel processes. * libclang1-17: Hard-code the last full versions for the symlinks. * Also use the free swap to determine the number of parallel processes. + * Set the cpu defaults for the ARM32 architectures: + - armel: arm926ej-s. Closes: #1056115. + - armhf: cortex-a8. + Thanks to Arnd Bergmann and Ard Biesheuvel for the fixes. -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 diff --git a/debian/patches/arm32-defaults.diff b/debian/patches/arm32-defaults.diff new file mode 100644 index 00000000..4a392854 --- /dev/null +++ b/debian/patches/arm32-defaults.diff @@ -0,0 +1,14 @@ +--- a/llvm/lib/TargetParser/ARMTargetParser.cpp ++++ b/llvm/lib/TargetParser/ARMTargetParser.cpp +@@ -590,9 +590,9 @@ StringRef ARM::getARMCPUForArch(const ll + case llvm::Triple::EABIHF: + case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: +- return "cortex-a7"; ++ return "cortex-a8"; + default: +- return "arm7tdmi"; ++ return "arm926ej-s"; + } + } + diff --git a/debian/patches/series b/debian/patches/series index 20770031..f77e9e6f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -151,3 +151,4 @@ D158066-simd-ppc64el.patch ubuntu-releases.patch libclang-major-version-only.diff D148945-revert.diff +arm32-defaults.diff From 5e253166accd594a1756b882b6e8bc20e783d554 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Wed, 6 Dec 2023 09:59:55 +0100 Subject: [PATCH 22/35] * Apply the proposed fix for D158491, build failure on mips64el, still unreviewed upstream. Addresses: #1056116. --- debian/changelog | 2 ++ debian/patches/D158491.diff | 53 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 56 insertions(+) create mode 100644 debian/patches/D158491.diff diff --git a/debian/changelog b/debian/changelog index 27ac99ca..51fc43d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium - armel: arm926ej-s. Closes: #1056115. - armhf: cortex-a8. Thanks to Arnd Bergmann and Ard Biesheuvel for the fixes. + * Apply the proposed fix for D158491, build failure on mips64el, still + unreviewed upstream. Addresses: #1056116. -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 diff --git a/debian/patches/D158491.diff b/debian/patches/D158491.diff new file mode 100644 index 00000000..1ce768e1 --- /dev/null +++ b/debian/patches/D158491.diff @@ -0,0 +1,53 @@ +see https://reviews.llvm.org/D158491, still unreviewed upstream + +--- a/compiler-rt/lib/interception/interception.h ++++ b/compiler-rt/lib/interception/interception.h +@@ -199,8 +199,9 @@ + ".type " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", %function\n" \ + SANITIZER_STRINGIFY(TRAMPOLINE(func)) ":\n" \ + SANITIZER_STRINGIFY(CFI_STARTPROC) "\n" \ +- SANITIZER_STRINGIFY(ASM_TAIL_CALL) " __interceptor_" \ +- SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func)) "\n" \ ++ C_ASM_TAIL_CALL(SANITIZER_STRINGIFY(TRAMPOLINE(func)), \ ++ "__interceptor_" \ ++ SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func))) "\n" \ + SANITIZER_STRINGIFY(CFI_ENDPROC) "\n" \ + ".size " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \ + ".-" SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \ +--- a/compiler-rt/lib/sanitizer_common/sanitizer_asm.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_asm.h +@@ -44,6 +44,8 @@ + + #if defined(__x86_64__) || defined(__i386__) || defined(__sparc__) + # define ASM_TAIL_CALL jmp ++#elif defined(__mips__) && __mips_isa_rev >= 6 ++# define ASM_TAIL_CALL bc + #elif defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ + defined(__powerpc__) || defined(__loongarch_lp64) + # define ASM_TAIL_CALL b +@@ -53,6 +55,25 @@ + # define ASM_TAIL_CALL tail + #endif + ++#if defined(__mips64) && __mips_isa_rev < 6 ++# define C_ASM_TAIL_CALL(tfunc, ifunc) \ ++ "lui $t8, %hi(%neg(%gp_rel(" tfunc ")))\n" \ ++ "daddu $t8, $t8, $t9\n" \ ++ "daddu $t8, $t8, %lo(%neg(%gp_rel(" tfunc ")))\n" \ ++ "ld $t9, %got_disp(" ifunc ")($t8)\n" \ ++ "jr $t9\n" ++#elif defined(__mips__) && __mips_isa_rev < 6 ++# define C_ASM_TAIL_CALL(tfunc, ifunc) \ ++ ".set noreorder\n" \ ++ ".cpload $t9\n" \ ++ ".set reorder\n" \ ++ "lw $t9, %got(" ifunc ")($gp)\n" \ ++ "jr $t9\n" ++#elif defined(ASM_TAIL_CALL) ++# define C_ASM_TAIL_CALL(tfunc, ifunc) \ ++ SANITIZER_STRINGIFY(ASM_TAIL_CALL) " " ifunc ++#endif ++ + #if defined(__ELF__) && defined(__x86_64__) || defined(__i386__) || \ + defined(__riscv) + # define ASM_PREEMPTIBLE_SYM(sym) sym@plt diff --git a/debian/patches/series b/debian/patches/series index f77e9e6f..287502d7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -152,3 +152,4 @@ ubuntu-releases.patch libclang-major-version-only.diff D148945-revert.diff arm32-defaults.diff +D158491.diff From b3f5e896b1c6a716ef3c533ffd0eba43d9722653 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 10:23:03 +0100 Subject: [PATCH 23/35] qualify-clang.sh : add missing package --- debian/qualify-clang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 962be053..afe20b12 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -9,7 +9,7 @@ VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libclang-rt-${VERSION}-dev-wasm64_${DETAILED_VERSION}_all.deb libc++abi-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libc++-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libpolly-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb bolt-${VERSION}_${DETAILED_VERSION}_amd64.deb libbolt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb flang-${VERSION}_${DETAILED_VERSION}_amd64.deb libflang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-clang-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libclang-rt-${VERSION}-dev-wasm64_${DETAILED_VERSION}_all.deb libc++abi-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libc++-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libpolly-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb bolt-${VERSION}_${DETAILED_VERSION}_amd64.deb libbolt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb flang-${VERSION}_${DETAILED_VERSION}_amd64.deb libflang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo apt --purge remove 'libomp5-*' 'libc++*dev' 'libc++*' 'python3-lldb-*' 'libunwind-*' 'libclc-*' 'libclc-*dev' 'libmlir-*'" From f82e3a2f959809fd06dcb7ed251a4fcf1f219b0c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 10:25:31 +0100 Subject: [PATCH 24/35] libc++experimental.a is in libc++-17-dev, not libc++abi-17-dev --- debian/libc++-X.Y-dev.links.in | 1 + debian/libc++abi-X.Y-dev.links.in | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/libc++-X.Y-dev.links.in b/debian/libc++-X.Y-dev.links.in index 854e14b7..3e55af80 100644 --- a/debian/libc++-X.Y-dev.links.in +++ b/debian/libc++-X.Y-dev.links.in @@ -1,3 +1,4 @@ usr/lib/llvm-@LLVM_VERSION@/lib/libc++.so /usr/lib/@DEB_HOST_MULTIARCH@/libc++.so usr/lib/llvm-@LLVM_VERSION@/lib/libc++.a /usr/lib/@DEB_HOST_MULTIARCH@/libc++.a usr/lib/llvm-@LLVM_VERSION@/include/c++/v1 /usr/include/c++/v1 +usr/lib/llvm-@LLVM_VERSION@/lib/libc++experimental.a /usr/lib/@DEB_HOST_MULTIARCH@/libc++experimental.a diff --git a/debian/libc++abi-X.Y-dev.links.in b/debian/libc++abi-X.Y-dev.links.in index e1814c9b..6dd5f555 100644 --- a/debian/libc++abi-X.Y-dev.links.in +++ b/debian/libc++abi-X.Y-dev.links.in @@ -1,2 +1 @@ usr/lib/llvm-@LLVM_VERSION@/lib/libc++abi.so /usr/lib/@DEB_HOST_MULTIARCH@/libc++abi.so -usr/lib/llvm-@LLVM_VERSION@/lib/libc++experimental.a /usr/lib/@DEB_HOST_MULTIARCH@/libc++experimental.a From dd52f2e40c189db713624cb59c9bc0f4868f5cd6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 10:33:00 +0100 Subject: [PATCH 25/35] rename of the patch --- debian/patches/{D158491.diff => mips/D154390-pre-R6.diff} | 0 debian/patches/series | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename debian/patches/{D158491.diff => mips/D154390-pre-R6.diff} (100%) diff --git a/debian/patches/D158491.diff b/debian/patches/mips/D154390-pre-R6.diff similarity index 100% rename from debian/patches/D158491.diff rename to debian/patches/mips/D154390-pre-R6.diff diff --git a/debian/patches/series b/debian/patches/series index 287502d7..b3b2ddc0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -152,4 +152,4 @@ ubuntu-releases.patch libclang-major-version-only.diff D148945-revert.diff arm32-defaults.diff -D158491.diff +mips/D154390-pre-R6.diff From 2d79706115c87705caa59e9d88f6a65fc932ae76 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 11:20:00 +0100 Subject: [PATCH 26/35] Move the symlink /usr/lib/*/libc++experimental.a from libc++abi-17-dev to libc++-17-dev --- debian/changelog | 6 +++++- debian/control.in | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 51fc43d0..3632435f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,7 +16,11 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Apply the proposed fix for D158491, build failure on mips64el, still unreviewed upstream. Addresses: #1056116. - -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 + [ Sylvestre Ledru ] + * Move the symlink /usr/lib/*/libc++experimental.a from libc++abi-17-dev + to libc++-17-dev + + -- Sylvestre Ledru Wed, 06 Dec 2023 11:19:17 +0100 llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium diff --git a/debian/control.in b/debian/control.in index e8ae25cb..d12b8c58 100644 --- a/debian/control.in +++ b/debian/control.in @@ -689,10 +689,10 @@ Architecture: any Multi-Arch: same Depends: libc++1-@LLVM_VERSION@ (= ${binary:Version}), ${misc:Depends}, libunwind-@LLVM_VERSION@-dev [amd64 arm64 armhf i386 loong64 ppc64el ppc64 riscv64] -Breaks: libc++-dev (<< 44) +Breaks: libc++-dev (<< 44), libc++abi-@LLVM_VERSION@-dev (<< 1:17.0.6-2) Provides: libc++-x.y-dev Conflicts: libc++-x.y-dev -Replaces: libc++-x.y-dev +Replaces: libc++-x.y-dev, libc++abi-@LLVM_VERSION@-dev (<< 1:17.0.6-2) Description: LLVM C++ Standard library (development files) libc++ is another implementation of the C++ standard library . From 5643163c613bc2608b8e623674a818fd376c0a63 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 11:22:19 +0100 Subject: [PATCH 27/35] refresh debian/control --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index b2b699c9..77c96ddf 100644 --- a/debian/control +++ b/debian/control @@ -689,10 +689,10 @@ Architecture: any Multi-Arch: same Depends: libc++1-17 (= ${binary:Version}), ${misc:Depends}, libunwind-17-dev [amd64 arm64 armhf i386 loong64 ppc64el ppc64 riscv64] -Breaks: libc++-dev (<< 44) +Breaks: libc++-dev (<< 44), libc++abi-17-dev (<< 1:17.0.6-2) Provides: libc++-x.y-dev Conflicts: libc++-x.y-dev -Replaces: libc++-x.y-dev +Replaces: libc++-x.y-dev, libc++abi-17-dev (<< 1:17.0.6-2) Description: LLVM C++ Standard library (development files) libc++ is another implementation of the C++ standard library . From ee43996aaebe81a7745a931562a03ccd3599eaf8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 11:22:52 +0100 Subject: [PATCH 28/35] remove old break/replaces --- debian/changelog | 1 + debian/control | 10 ---------- debian/control.in | 10 ---------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3632435f..e4eb7aeb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium [ Sylvestre Ledru ] * Move the symlink /usr/lib/*/libc++experimental.a from libc++abi-17-dev to libc++-17-dev + * Remove some old break/replaces from 16 -- Sylvestre Ledru Wed, 06 Dec 2023 11:19:17 +0100 diff --git a/debian/control b/debian/control index 77c96ddf..b58c452d 100644 --- a/debian/control +++ b/debian/control @@ -187,8 +187,6 @@ Package: libclang-rt-17-dev Architecture: any Multi-Arch: same Section: libdevel -Breaks: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} Description: Compiler-rt - development package This package provides various libraries: @@ -205,10 +203,7 @@ Package: libclang-rt-17-dev-wasm32 Architecture: all Multi-Arch: foreign Section: libdevel -Breaks: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: libclang-common-17-dev (>= 1:16~++20230115053056+df5fc4504b86-1~exp1) Description: Compiler-rt - wasm32 builtins Provides the compiler-rt builtins for WebAssembly 32 bits @@ -216,10 +211,7 @@ Package: libclang-rt-17-dev-wasm64 Architecture: all Multi-Arch: foreign Section: libdevel -Breaks: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: libclang-common-17-dev (>= 1:16~++20230115053056+df5fc4504b86-1~exp1) Description: Compiler-rt - wasm64 builtins Provides the compiler-rt builtins for WebAssembly 64 bits @@ -229,8 +221,6 @@ Package: libpolly-17-dev Architecture: any Multi-Arch: same Section: libdevel -Breaks: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-17-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} Description: High-level loop and data-locality optimizer Uses an abstract mathematical representation based on integer polyhedra diff --git a/debian/control.in b/debian/control.in index d12b8c58..f83a0c73 100644 --- a/debian/control.in +++ b/debian/control.in @@ -187,8 +187,6 @@ Package: libclang-rt-@LLVM_VERSION@-dev Architecture: any Multi-Arch: same Section: libdevel -Breaks: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} Description: Compiler-rt - development package This package provides various libraries: @@ -205,10 +203,7 @@ Package: libclang-rt-@LLVM_VERSION@-dev-wasm32 Architecture: all Multi-Arch: foreign Section: libdevel -Breaks: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: libclang-common-@LLVM_VERSION@-dev (>= 1:16~++20230115053056+df5fc4504b86-1~exp1) Description: Compiler-rt - wasm32 builtins Provides the compiler-rt builtins for WebAssembly 32 bits @@ -216,10 +211,7 @@ Package: libclang-rt-@LLVM_VERSION@-dev-wasm64 Architecture: all Multi-Arch: foreign Section: libdevel -Breaks: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: libclang-common-@LLVM_VERSION@-dev (>= 1:16~++20230115053056+df5fc4504b86-1~exp1) Description: Compiler-rt - wasm64 builtins Provides the compiler-rt builtins for WebAssembly 64 bits @@ -229,8 +221,6 @@ Package: libpolly-@LLVM_VERSION@-dev Architecture: any Multi-Arch: same Section: libdevel -Breaks: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) -Replaces: libclang-common-@LLVM_VERSION@-dev (<< 1:16~++20230115053056+df5fc4504b86-1~exp1) Depends: ${shlibs:Depends}, ${misc:Depends} Description: High-level loop and data-locality optimizer Uses an abstract mathematical representation based on integer polyhedra From 55b75cf44f1eae97cd0e92f7264ea51b67d2af32 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 15:10:01 +0100 Subject: [PATCH 29/35] Fix the EmitBackendOutput test in debian/qualify-clang.sh --- debian/changelog | 3 ++- debian/qualify-clang.sh | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e4eb7aeb..d9bc14e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,8 +20,9 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Move the symlink /usr/lib/*/libc++experimental.a from libc++abi-17-dev to libc++-17-dev * Remove some old break/replaces from 16 + * Fix the EmitBackendOutput test in debian/qualify-clang.sh - -- Sylvestre Ledru Wed, 06 Dec 2023 11:19:17 +0100 + -- Sylvestre Ledru Wed, 06 Dec 2023 15:09:55 +0100 llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index afe20b12..d85aaed4 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -1376,6 +1376,7 @@ clang++-$VERSION -O2 -fprofile-instr-use=foo.profdata foo.cc -o foo # https://bugs.llvm.org/show_bug.cgi?id=44870 cat < foo.cpp #include +#include using namespace clang; @@ -1389,8 +1390,9 @@ int main() { llvm::Module* m; BackendAction* action; std::unique_ptr AsmOutStream; + IntrusiveRefCntPtr VFS; - EmitBackendOutput(*diags, *hsOpts, *cgOpts, *tOpts, *lOpts, *tDesc, m, *action, std::move(AsmOutStream)); + EmitBackendOutput(*diags, *hsOpts, *cgOpts, *tOpts, *lOpts, *tDesc, m, *action, VFS, std::move(AsmOutStream)); } EOF clang++-$VERSION foo.cpp -o test -lclangBasic -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangCodeGen -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangFrontend -lclangDriver -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -lclangBasic -ldl /usr/lib/llvm-$VERSION/lib/libLLVM-$VERSION.so -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -ldl -I /usr/lib/llvm-$VERSION/include/ -L/usr/lib/llvm-$VERSION/lib/ -lPolly -lPollyISL From 9622f7635adf9825d11845181ecb560841c1be12 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 17:56:50 +0100 Subject: [PATCH 30/35] Also add back /usr/lib/llvm-17/lib/libclang-17.so.1 --- debian/changelog | 1 + debian/libclang1-X.Y.links.in | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index d9bc14e9..bb8b38fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium to libc++-17-dev * Remove some old break/replaces from 16 * Fix the EmitBackendOutput test in debian/qualify-clang.sh + * Also add back /usr/lib/llvm-17/lib/libclang-17.so.1 -- Sylvestre Ledru Wed, 06 Dec 2023 15:09:55 +0100 diff --git a/debian/libclang1-X.Y.links.in b/debian/libclang1-X.Y.links.in index b1ab4423..91a1ca2d 100644 --- a/debian/libclang1-X.Y.links.in +++ b/debian/libclang1-X.Y.links.in @@ -1,6 +1,7 @@ # as upstream usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ +usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1 # one link for the last soname with the full version usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.17.0.5 From 92c2f7926007cbcdaf83d71f6667a5d155d766fb Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 8 Dec 2023 09:47:59 +0100 Subject: [PATCH 31/35] Drop sed command, useless now --- debian/rules | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/rules b/debian/rules index 11d00a96..d7ae36bb 100755 --- a/debian/rules +++ b/debian/rules @@ -1234,9 +1234,6 @@ endif # 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 -# Adjust to the existing symlink. See #994827 #1057151 - sed -i "s|libclang-$(LLVM_VERSION).so.$(LLVM_VERSION).*\"|libclang-$(LLVM_VERSION).so.$(LLVM_VERSION)\"|" $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake - # Managed in python*-lldb-X.Y.links.in rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/*-packages/lldb/_lldb.so From 142b0f07b475230a1749b8bacaf6ba31b7c41a8a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 8 Dec 2023 09:49:20 +0100 Subject: [PATCH 32/35] Update changelog --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bb8b38fb..a1aa88fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Add new cmake-clang-test to spot issues such as Debian bug #1057151 * Fix cmake file (Closes: #1057151) + * Drop sed command, useless now [ Matthias Klose ] * Also use the free swap to determine the number of parallel processes. @@ -23,7 +24,7 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium * Fix the EmitBackendOutput test in debian/qualify-clang.sh * Also add back /usr/lib/llvm-17/lib/libclang-17.so.1 - -- Sylvestre Ledru Wed, 06 Dec 2023 15:09:55 +0100 + -- Gianfranco Costamagna Fri, 08 Dec 2023 09:49:04 +0100 llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium From e080ef40f3c7e5f77d83ed748004939656386bef Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 8 Dec 2023 09:55:23 +0100 Subject: [PATCH 33/35] fix https://github.com/llvm/llvm-project/issues/74766 --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index d7ae36bb..6f953d47 100755 --- a/debian/rules +++ b/debian/rules @@ -624,6 +624,13 @@ stamps/preconfigure: debian/llvm-$(LLVM_VERSION)-linker-tools.links \ debian/libbolt-$(LLVM_VERSION)-dev.install + # workaround the breaks/replaces/conflicts introduced with the libc++ move + # we update the version to make it work with apt.llvm.org + # Yeah, this is ugly but I don't know how to do better + if test "$(LLVM_VERSION)" = "17"; then \ + sed -i -e "s|(<< 1:17.0.6-2)|(<< 1:17.0.6~++20231206041259)|g" debian/control; \ + fi + # llvm-spirv was found, so we can enable *.spv files. Debian # buster and Ubuntu 18.04 don't have llvm-spirv to create the # *.spv files. From 395e9a3e89eaa10541c71fdf4604f98ae3e90647 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Dec 2023 16:43:10 +0100 Subject: [PATCH 34/35] qualify-clang.sh: fix the filename --- debian/qualify-clang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index d85aaed4..a8aa3312 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -9,7 +9,7 @@ VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-clang-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libclang-rt-${VERSION}-dev-wasm64_${DETAILED_VERSION}_all.deb libc++abi-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libc++-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libpolly-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb bolt-${VERSION}_${DETAILED_VERSION}_amd64.deb libbolt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb flang-${VERSION}_${DETAILED_VERSION}_amd64.deb libflang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-clang-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libclang-rt-${VERSION}-dev-wasm64_${DETAILED_VERSION}_all.deb libc++abi-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libc++-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libpolly-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb bolt-${VERSION}_${DETAILED_VERSION}_amd64.deb libbolt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb flang-${VERSION}_${DETAILED_VERSION}_amd64.deb libflang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo apt --purge remove 'libomp5-*' 'libc++*dev' 'libc++*' 'python3-lldb-*' 'libunwind-*' 'libclc-*' 'libclc-*dev' 'libmlir-*'" From 5a842ba5c2d44316e121f4699583e13ad8afba84 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 9 Dec 2023 23:15:39 +0100 Subject: [PATCH 35/35] prepare upload --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a1aa88fb..38179801 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium +llvm-toolchain-17 (1:17.0.6-2) unstable; urgency=medium [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as