From f667185dabd4ebb8fd8bdceed64432a6fff10d37 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 24 Jul 2023 08:29:24 +0200 Subject: [PATCH 01/27] Do the delete of wasi in libclang-rt regardless (Closes: #1041834) --- debian/changelog | 6 ++++++ debian/rules | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 478a5aae..cc36c106 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-16 (1:16.0.6-6) unstable; urgency=medium + + * Do the delete of wasi in libclang-rt regardless (Closes: #1041834) + + -- Sylvestre Ledru Mon, 24 Jul 2023 08:29:14 +0200 + llvm-toolchain-16 (1:16.0.6-5) unstable; urgency=medium [ Samuel Thibault ] diff --git a/debian/rules b/debian/rules index 4751d428..aa3281cc 100755 --- a/debian/rules +++ b/debian/rules @@ -1263,13 +1263,11 @@ ifneq (,$(filter libc++-$(LLVM_VERSION)-dev-wasm32, $(shell dh_listpackages))) mv $(CURDIR)/debian/libc++-$(LLVM_VERSION)-dev-wasm32/usr/lib/llvm-$(LLVM_VERSION)/include/wasm32-wasi/c++/v1/cxxabi.h \ $(CURDIR)/debian/libc++abi-$(LLVM_VERSION)-dev-wasm32/usr/lib/llvm-$(LLVM_VERSION)/include/wasm32-wasi/c++/v1/cxxabi.h; \ fi +endif # Because of hurd, we are more flexible in what we include in libclang-X.Y-rt # but we don't want to install wasi files into libclang-rt as they have their own package # So, we remove this directory from the package rm -fr $(CURDIR)/debian/libclang-rt-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION)/lib/wasi/ -endif - - repack_a_llvm_ir: ifeq (${LTO_ENABLE},yes) From c32f435a1d22f16e8cedbe902483356bb199577a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 1 Aug 2023 09:30:07 +0200 Subject: [PATCH 02/27] Enable again parallel build on riscv64 --- debian/rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index aa3281cc..a1d69fa2 100755 --- a/debian/rules +++ b/debian/rules @@ -192,9 +192,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc)) STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON endif -# more than 2 jobs causes OOM in Ubuntu and slows down build process. +# debug symbols OOM in Ubuntu Ubuntu and slows down build process. ifneq (,$(filter $(DEB_HOST_ARCH),riscv64)) - NJOBS=2 opt_flags = -O2 -DNDEBUG -g0 else opt_flags = -O2 -DNDEBUG -g1 From 4d733e01c2e74142208f5bea2797d7e02acf1d1f Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 2 Aug 2023 09:12:22 +0200 Subject: [PATCH 03/27] Use spirv-16 to build llvm, this should fix mesa build --- debian/changelog | 8 ++++++++ debian/control | 1 + debian/control.in | 1 + 3 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index cc36c106..7535f362 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-16 (1:16.0.6-7) unstable; urgency=medium + + * Use spirv-16 to build llvm. This should fix libclc-16 content + and fix mesa build + * Don't reduce parallel builds anymore on riscv64 + + -- Gianfranco Costamagna Wed, 02 Aug 2023 09:10:31 +0200 + llvm-toolchain-16 (1:16.0.6-6) unstable; urgency=medium * Do the delete of wasi in libclang-rt regardless (Closes: #1041834) diff --git a/debian/control b/debian/control index 915ff78b..29b1fe92 100644 --- a/debian/control +++ b/debian/control @@ -22,6 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, + llvm-spirv-16 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], diff --git a/debian/control.in b/debian/control.in index fc183864..02538a95 100644 --- a/debian/control.in +++ b/debian/control.in @@ -22,6 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, + llvm-spirv-16 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], From 8995e6778a39bbccb0e62260d0f2a1f63433eb93 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 2 Aug 2023 09:32:41 +0200 Subject: [PATCH 04/27] Make sure flang-16 depends on libflang-16-dev (Closes: #1041202) --- debian/changelog | 6 ++++++ debian/control | 2 +- debian/control.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7535f362..ff3d0193 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-16 (1:16.0.6-8) unstable; urgency=medium + + * Make sure flang-16 depends on libflang-16-dev (Closes: #1041202) + + -- Gianfranco Costamagna Wed, 02 Aug 2023 09:30:36 +0200 + llvm-toolchain-16 (1:16.0.6-7) unstable; urgency=medium * Use spirv-16 to build llvm. This should fix libclc-16 content diff --git a/debian/control b/debian/control index 29b1fe92..21544e04 100644 --- a/debian/control +++ b/debian/control @@ -935,7 +935,7 @@ Package: flang-16 # no 32bit support # https://github.com/llvm/llvm-project/issues/59845 Architecture: amd64 arm64 mips64el ppc64el kfreebsd-amd64 ppc64 sparc64 riscv64 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, +Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libflang-16-dev (= ${binary:Version}), Provides: fortran-compiler, gfortran-mod-15 Description: Fortran compiler Ground-up implementation of a Fortran front end written in diff --git a/debian/control.in b/debian/control.in index 02538a95..d807aa72 100644 --- a/debian/control.in +++ b/debian/control.in @@ -935,7 +935,7 @@ Package: flang-@LLVM_VERSION@ # no 32bit support # https://github.com/llvm/llvm-project/issues/59845 Architecture: amd64 arm64 mips64el ppc64el kfreebsd-amd64 ppc64 sparc64 riscv64 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, +Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libflang-@LLVM_VERSION@-dev (= ${binary:Version}), Provides: fortran-compiler, gfortran-mod-15 Description: Fortran compiler Ground-up implementation of a Fortran front end written in From 8a0b005291aec94ebd9edbad199a867a4a8ba7fd Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 3 Aug 2023 14:21:50 +0200 Subject: [PATCH 05/27] Enable spirv again to unbreak mesa build --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/control.in | 2 +- debian/rules | 3 --- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index ff3d0193..89fd47fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-16 (1:16.0.6-9) unstable; urgency=medium + + * Really enable spirv, and disable spirv on mips* since it's not yet + bootstrapped. Thanks for the patch + + -- Gianfranco Costamagna Thu, 03 Aug 2023 14:20:06 +0200 + llvm-toolchain-16 (1:16.0.6-8) unstable; urgency=medium * Make sure flang-16 depends on libflang-16-dev (Closes: #1041202) diff --git a/debian/control b/debian/control index 21544e04..7ce9ed6a 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, - llvm-spirv-16 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | + llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], diff --git a/debian/control.in b/debian/control.in index d807aa72..ae027566 100644 --- a/debian/control.in +++ b/debian/control.in @@ -22,7 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, - llvm-spirv-16 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | + llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], diff --git a/debian/rules b/debian/rules index a1d69fa2..f982b0ae 100755 --- a/debian/rules +++ b/debian/rules @@ -249,9 +249,6 @@ ifndef LLVM_SPIRV LLVM_SPIRV_VERSION := $(shell expr $(LLVM_VERSION) - 1) LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv-$(LLVM_SPIRV_VERSION)" 2>/dev/null) endif -# For now, disable spir because it needs -# 16 because of opaque pointers -undefine LLVM_SPIRV ifndef LLVM_SPIRV LLVM_SPIRV_INSTALLED = no else From 59a5e080da5bf903ade989eb1ef701acc49cae80 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 7 Aug 2023 12:09:59 +0200 Subject: [PATCH 06/27] Disable mlir test on armel, hangs --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index f982b0ae..2a1c3766 100755 --- a/debian/rules +++ b/debian/rules @@ -1326,7 +1326,7 @@ endif ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-libcxxabi || true # MLIR -ifeq (,$(filter $(DEB_HOST_ARCH), armhf i386 x32)) +ifeq (,$(filter $(DEB_HOST_ARCH), armel armhf i386 x32)) # Do not run MLIR test on i386 because of # https://github.com/llvm/llvm-project/issues/58357 ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-mlir || true From 32297590fc52db6391594459ddf836990abf1e24 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 7 Aug 2023 12:10:07 +0200 Subject: [PATCH 07/27] Update test to use libstdc++13-dev --- debian/tests/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index 2d82460d..026518dd 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -7,7 +7,7 @@ Restrictions: allow-stderr Architecture: amd64 arm64 i386 Tests: integration-test-suite-test -Depends: @, cmake, make, g++, libstdc++-10-dev +Depends: @, cmake, make, g++, libstdc++-13-dev Restrictions: allow-stderr Architecture: amd64 arm64 From 2c06d7deb9cfbf43a0cfd5f182b50357a75e2d04 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 7 Aug 2023 12:10:21 +0200 Subject: [PATCH 08/27] Update changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 89fd47fb..3fbac30a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-16 (1:16.0.6-10) unstable; urgency=medium + + * update test to depend on libstdc++-13-dev + * Also ignore mlir test on armel, hang + + -- Gianfranco Costamagna Mon, 07 Aug 2023 11:01:06 +0200 + llvm-toolchain-16 (1:16.0.6-9) unstable; urgency=medium * Really enable spirv, and disable spirv on mips* since it's not yet From 04b145d9b15e43db2a4d378f821c7ef9c378d70d Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:36:38 +0200 Subject: [PATCH 09/27] * debian/patches/D158066.patch: - upstream fix for Debian bug: #1049362 --- debian/patches/D158066.patch | 265 +++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 266 insertions(+) create mode 100644 debian/patches/D158066.patch diff --git a/debian/patches/D158066.patch b/debian/patches/D158066.patch new file mode 100644 index 00000000..99989d00 --- /dev/null +++ b/debian/patches/D158066.patch @@ -0,0 +1,265 @@ +Description: Fix SIMD compatibility headers on ppc64el +Origin/Author: https://reviews.llvm.org/D158066 +Bug-Debian: https://bugs.debian.org/1049362 + +Index: llvm-toolchain-16-16.0.6/clang/include/clang/Basic/BuiltinsPPC.def +=================================================================== +--- llvm-toolchain-16-16.0.6.orig/clang/include/clang/Basic/BuiltinsPPC.def ++++ llvm-toolchain-16-16.0.6/clang/include/clang/Basic/BuiltinsPPC.def +@@ -132,8 +132,10 @@ + BUILTIN(__builtin_ppc_extract_sig, "ULLid", "") + BUILTIN(__builtin_ppc_mtfsb0, "vUIi", "") + BUILTIN(__builtin_ppc_mtfsb1, "vUIi", "") ++BUILTIN(__builtin_ppc_mffs, "d", "") + BUILTIN(__builtin_ppc_mtfsf, "vUIiUi", "") + BUILTIN(__builtin_ppc_mtfsfi, "vUIiUIi", "") ++BUILTIN(__builtin_ppc_set_fpscr_rn, "di", "") + BUILTIN(__builtin_ppc_insert_exp, "ddULLi", "") + BUILTIN(__builtin_ppc_fmsub, "dddd", "") + BUILTIN(__builtin_ppc_fmsubs, "ffff", "") +Index: llvm-toolchain-16-16.0.6/clang/lib/CodeGen/CGBuiltin.cpp +=================================================================== +--- llvm-toolchain-16-16.0.6.orig/clang/lib/CodeGen/CGBuiltin.cpp ++++ llvm-toolchain-16-16.0.6/clang/lib/CodeGen/CGBuiltin.cpp +@@ -16742,6 +16742,11 @@ + Value *Op1 = EmitScalarExpr(E->getArg(1)); + return Builder.CreateFDiv(Op0, Op1, "swdiv"); + } ++ case PPC::BI__builtin_ppc_set_fpscr_rn: ++ return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::ppc_setrnd), ++ {EmitScalarExpr(E->getArg(0))}); ++ case PPC::BI__builtin_ppc_mffs: ++ return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::ppc_readflm)); + } + } + +Index: llvm-toolchain-16-16.0.6/clang/lib/Headers/ppc_wrappers/smmintrin.h +=================================================================== +--- llvm-toolchain-16-16.0.6.orig/clang/lib/Headers/ppc_wrappers/smmintrin.h ++++ llvm-toolchain-16-16.0.6/clang/lib/Headers/ppc_wrappers/smmintrin.h +@@ -14,7 +14,7 @@ + + #ifndef NO_WARN_X86_INTRINSICS + /* This header is distributed to simplify porting x86_64 code that +- makes explicit use of Intel intrinsics to powerp64/powerpc64le. ++ makes explicit use of Intel intrinsics to powerpc64/powerpc64le. + + It is the user's responsibility to determine if the results are + acceptable and make additional changes as necessary. +@@ -68,10 +68,10 @@ + __asm__("mffsce %0" : "=f"(__fpscr_save.__fr)); + __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; + #else +- __fpscr_save.__fr = __builtin_mffs(); ++ __fpscr_save.__fr = __builtin_ppc_mffs(); + __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; + __fpscr_save.__fpscr &= ~0xf8; +- __builtin_mtfsf(0b00000011, __fpscr_save.__fr); ++ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr); + #endif + /* Insert an artificial "read/write" reference to the variable + read below, to ensure the compiler does not schedule +@@ -83,10 +83,15 @@ + + switch (__rounding) { + case _MM_FROUND_TO_NEAREST_INT: +- __fpscr_save.__fr = __builtin_mffsl(); ++#ifdef _ARCH_PWR9 ++ __fpscr_save.__fr = __builtin_ppc_mffsl(); ++#else ++ __fpscr_save.__fr = __builtin_ppc_mffs(); ++ __fpscr_save.__fpscr &= 0x70007f0ffL; ++#endif + __attribute__((fallthrough)); + case _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC: +- __builtin_set_fpscr_rn(0b00); ++ __builtin_ppc_set_fpscr_rn(0b00); + /* Insert an artificial "read/write" reference to the variable + read below, to ensure the compiler does not schedule + a read/use of the variable before the FPSCR is modified, above. +@@ -102,7 +107,7 @@ + This can be removed if and when GCC PR102783 is fixed. + */ + __asm__("" : : "wa"(__r)); +- __builtin_set_fpscr_rn(__fpscr_save.__fpscr); ++ __builtin_ppc_set_fpscr_rn(__fpscr_save.__fpscr); + break; + case _MM_FROUND_TO_NEG_INF: + case _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC: +@@ -128,9 +133,14 @@ + */ + __asm__("" : : "wa"(__r)); + /* Restore enabled exceptions. */ +- __fpscr_save.__fr = __builtin_mffsl(); ++#ifdef _ARCH_PWR9 ++ __fpscr_save.__fr = __builtin_ppc_mffsl(); ++#else ++ __fpscr_save.__fr = __builtin_ppc_mffs(); ++ __fpscr_save.__fpscr &= 0x70007f0ffL; ++#endif + __fpscr_save.__fpscr |= __enables_save.__fpscr; +- __builtin_mtfsf(0b00000011, __fpscr_save.__fr); ++ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr); + } + return (__m128d)__r; + } +@@ -159,10 +169,10 @@ + __asm__("mffsce %0" : "=f"(__fpscr_save.__fr)); + __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; + #else +- __fpscr_save.__fr = __builtin_mffs(); ++ __fpscr_save.__fr = __builtin_ppc_mffs(); + __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; + __fpscr_save.__fpscr &= ~0xf8; +- __builtin_mtfsf(0b00000011, __fpscr_save.__fr); ++ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr); + #endif + /* Insert an artificial "read/write" reference to the variable + read below, to ensure the compiler does not schedule +@@ -174,10 +184,15 @@ + + switch (__rounding) { + case _MM_FROUND_TO_NEAREST_INT: +- __fpscr_save.__fr = __builtin_mffsl(); ++#ifdef _ARCH_PWR9 ++ __fpscr_save.__fr = __builtin_ppc_mffsl(); ++#else ++ __fpscr_save.__fr = __builtin_ppc_mffs(); ++ __fpscr_save.__fpscr &= 0x70007f0ffL; ++#endif + __attribute__((fallthrough)); + case _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC: +- __builtin_set_fpscr_rn(0b00); ++ __builtin_ppc_set_fpscr_rn(0b00); + /* Insert an artificial "read/write" reference to the variable + read below, to ensure the compiler does not schedule + a read/use of the variable before the FPSCR is modified, above. +@@ -193,7 +208,7 @@ + This can be removed if and when GCC PR102783 is fixed. + */ + __asm__("" : : "wa"(__r)); +- __builtin_set_fpscr_rn(__fpscr_save.__fpscr); ++ __builtin_ppc_set_fpscr_rn(__fpscr_save.__fpscr); + break; + case _MM_FROUND_TO_NEG_INF: + case _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC: +@@ -219,9 +234,14 @@ + */ + __asm__("" : : "wa"(__r)); + /* Restore enabled exceptions. */ +- __fpscr_save.__fr = __builtin_mffsl(); ++#ifdef _ARCH_PWR9 ++ __fpscr_save.__fr = __builtin_ppc_mffsl(); ++#else ++ __fpscr_save.__fr = __builtin_ppc_mffs(); ++ __fpscr_save.__fpscr &= 0x70007f0ffL; ++#endif + __fpscr_save.__fpscr |= __enables_save.__fpscr; +- __builtin_mtfsf(0b00000011, __fpscr_save.__fr); ++ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr); + } + return (__m128)__r; + } +Index: llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/builtins-ppc.c +=================================================================== +--- llvm-toolchain-16-16.0.6.orig/clang/test/CodeGen/PowerPC/builtins-ppc.c ++++ llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/builtins-ppc.c +@@ -1,5 +1,8 @@ + // REQUIRES: powerpc-registered-target +-// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s ++// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - \ ++// RUN: | FileCheck %s ++// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - \ ++// RUN: -target-cpu pwr9 | FileCheck %s --check-prefixes=P9,CHECK + + void test_eh_return_data_regno() + { +@@ -26,6 +29,9 @@ + + // CHECK: call double @llvm.ppc.setrnd(i32 %2) + res = __builtin_setrnd(x); ++ ++ // CHECK: call double @llvm.ppc.setrnd(i32 %4) ++ res = __builtin_ppc_set_fpscr_rn(x); + } + + void test_builtin_ppc_flm() { +@@ -33,7 +39,10 @@ + // CHECK: call double @llvm.ppc.readflm() + res = __builtin_readflm(); + +- // CHECK: call double @llvm.ppc.setflm(double %1) ++ // CHECK: call double @llvm.ppc.readflm() ++ res = __builtin_ppc_mffs(); ++ ++ // CHECK: call double @llvm.ppc.setflm(double %2) + res = __builtin_setflm(res); + } + +Index: llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +=================================================================== +--- llvm-toolchain-16-16.0.6.orig/clang/test/CodeGen/PowerPC/ppc-smmintrin.c ++++ llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +@@ -239,44 +239,48 @@ + // CHECK-LABEL: @test_round + + // CHECK-LABEL: define available_externally <4 x float> @_mm_round_ps(<4 x float> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) +-// CHECK: call signext i32 @__builtin_mffs() +-// CHECK: call signext i32 @__builtin_mtfsf(i32 noundef signext 3, double noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.readflm() ++// CHECK: call void @llvm.ppc.mtfsf(i32 3, double %{{[0-9a-zA-Z_.]+}}) + // CHECK: %{{[0-9a-zA-Z_.]+}} = call <4 x float> asm "", "=^wa,0" +-// CHECK: call signext i32 @__builtin_mffsl() +-// CHECK: call signext i32 @__builtin_set_fpscr_rn(i32 noundef signext 0) ++// CHECK: call double @llvm.ppc.readflm() ++// P10: call double @llvm.ppc.mffsl() ++// CHECK: call double @llvm.ppc.setrnd(i32 0) + // CHECK: %{{[0-9a-zA-Z_.]+}} = call <4 x float> asm "", "=^wa,0" + // CHECK: call <4 x float> @vec_rint(float vector[4]) + // CHECK: call void asm sideeffect "", "^wa" +-// CHECK: call signext i32 @__builtin_set_fpscr_rn(i64 noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.setrnd(i32 %{{[0-9a-zA-Z_.]+}}) + // CHECK: call <4 x float> @vec_floor(float vector[4]) + // CHECK: call <4 x float> @vec_ceil(float vector[4]) + // CHECK: call <4 x float> @vec_trunc(float vector[4]) + // CHECK: call <4 x float> @vec_rint(float vector[4]) + // CHECK: call void asm sideeffect "", "^wa" +-// CHECK: call signext i32 @__builtin_mffsl() +-// CHECK: call signext i32 @__builtin_mtfsf(i32 noundef signext 3, double noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.readflm() ++// P10: call double @llvm.ppc.mffsl() ++// CHECK: call void @llvm.ppc.mtfsf(i32 3, double %{{[0-9a-zA-Z_.]+}}) + + // CHECK-LABEL: define available_externally <4 x float> @_mm_round_ss(<4 x float> noundef %{{[0-9a-zA-Z_.]+}}, <4 x float> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) + // CHECK: call <4 x float> @_mm_round_ps(<4 x float> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) + // CHECK: extractelement <4 x float> %{{[0-9a-zA-Z_.]+}}, i32 0 + + // CHECK-LABEL: define available_externally <2 x double> @_mm_round_pd(<2 x double> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) +-// CHECK: call signext i32 @__builtin_mffs() +-// CHECK: call signext i32 @__builtin_mtfsf(i32 noundef signext 3, double noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.readflm() ++// CHECK: call void @llvm.ppc.mtfsf(i32 3, double %{{[0-9a-zA-Z_.]+}}) + // CHECK: %{{[0-9a-zA-Z_.]+}} = call <2 x double> asm "", "=^wa,0" +-// CHECK: call signext i32 @__builtin_mffsl() +-// CHECK: call signext i32 @__builtin_set_fpscr_rn(i32 noundef signext 0) ++// CHECK: call double @llvm.ppc.readflm() ++// P10: call double @llvm.ppc.mffsl() ++// CHECK: call double @llvm.ppc.setrnd(i32 0) + // CHECK: %{{[0-9a-zA-Z_.]+}} = call <2 x double> asm "", "=^wa,0" + // CHECK: call <2 x double> @vec_rint(double vector[2]) + // CHECK: call void asm sideeffect "", "^wa" +-// CHECK: call signext i32 @__builtin_set_fpscr_rn(i64 noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.setrnd(i32 %{{[0-9a-zA-Z_.]+}}) + // CHECK: call <2 x double> @vec_floor(double vector[2]) + // CHECK: call <2 x double> @vec_ceil(double vector[2]) + // CHECK: call <2 x double> @vec_trunc(double vector[2]) + // CHECK: call <2 x double> @vec_rint(double vector[2]) + // CHECK: call void asm sideeffect "", "^wa" +-// CHECK: call signext i32 @__builtin_mffsl() +-// CHECK: call signext i32 @__builtin_mtfsf(i32 noundef signext 3, double noundef %{{[0-9a-zA-Z_.]+}}) ++// CHECK: call double @llvm.ppc.readflm() ++// P10: call double @llvm.ppc.mffsl() ++// CHECK: call void @llvm.ppc.mtfsf(i32 3, double %{{[0-9a-zA-Z_.]+}}) + + // CHECK-LABEL: define available_externally <2 x double> @_mm_round_sd(<2 x double> noundef %{{[0-9a-zA-Z_.]+}}, <2 x double> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) + // CHECK: call <2 x double> @_mm_round_pd(<2 x double> noundef %{{[0-9a-zA-Z_.]+}}, i32 noundef signext %{{[0-9a-zA-Z_.]+}}) diff --git a/debian/patches/series b/debian/patches/series index 718c611a..3d38b7f8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -153,3 +153,4 @@ amdgpu/nonlinux.patch ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch +D158066.patch From f71afdd5edef034b840bfc01d96fa9e7f8b2bc32 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:37:27 +0200 Subject: [PATCH 10/27] Build-depend on libzstd-dev (Closes: #1047718) --- debian/control | 2 +- debian/control.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 7ce9ed6a..675f8a0a 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, binutils-dev, libxml2-dev, libjsoncpp-dev, pkg-config, - lcov, procps, help2man, zlib1g-dev, + lcov, procps, help2man, zlib1g-dev, libzstd-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, python3-recommonmark, doxygen, diff --git a/debian/control.in b/debian/control.in index ae027566..861d6422 100644 --- a/debian/control.in +++ b/debian/control.in @@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, binutils-dev, libxml2-dev, libjsoncpp-dev, pkg-config, - lcov, procps, help2man, zlib1g-dev, + lcov, procps, help2man, zlib1g-dev, libzstd-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, python3-recommonmark, doxygen, From f47bc1736eb9bc0b0a9cab4130802d9db69fcdcb Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:38:21 +0200 Subject: [PATCH 11/27] Explicitly depend on libcurl4-openssl-dev, since nss is being removed. (Closes: #1043552) --- debian/control | 2 +- debian/control.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 675f8a0a..9664cd9b 100644 --- a/debian/control +++ b/debian/control @@ -27,7 +27,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], wasi-libc | hello [ !any-i386], - libcurl4-dev, + libcurl4-openssl-dev | libcurl-dev, libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], diff --git a/debian/control.in b/debian/control.in index 861d6422..5b0eaf10 100644 --- a/debian/control.in +++ b/debian/control.in @@ -27,7 +27,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], wasi-libc | hello [ !any-i386], - libcurl4-dev, + libcurl4-openssl-dev | libcurl-dev, libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], From 6be367e58fdc055072653186473c64b2ec091d03 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:38:37 +0200 Subject: [PATCH 12/27] Disable unwind on mips64el, fixing FTBFS --- debian/control | 6 +++--- debian/control.in | 6 +++--- debian/rules | 9 ++++++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index 9664cd9b..13fa753d 100644 --- a/debian/control +++ b/debian/control @@ -689,7 +689,7 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: libc++1-16 (= ${binary:Version}), ${misc:Depends}, - libunwind-16-dev [amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64] + libunwind-16-dev [amd64 arm64 armhf i386 ppc64el ppc64 riscv64] Breaks: libc++-dev (<< 44) Provides: libc++-x.y-dev Conflicts: libc++-x.y-dev @@ -829,7 +829,7 @@ Description: OpenCL C language implementation - development files Package: libunwind-16 Section: libs -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 +Architecture: amd64 arm64 armhf i386 ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} @@ -846,7 +846,7 @@ Description: production-quality unwinder Package: libunwind-16-dev Section: libdevel -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 +Architecture: amd64 arm64 armhf i386 ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, diff --git a/debian/control.in b/debian/control.in index 5b0eaf10..8b55e308 100644 --- a/debian/control.in +++ b/debian/control.in @@ -689,7 +689,7 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: libc++1-@LLVM_VERSION@ (= ${binary:Version}), ${misc:Depends}, - libunwind-@LLVM_VERSION@-dev [amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64] + libunwind-@LLVM_VERSION@-dev [amd64 arm64 armhf i386 ppc64el ppc64 riscv64] Breaks: libc++-dev (<< 44) Provides: libc++-x.y-dev Conflicts: libc++-x.y-dev @@ -829,7 +829,7 @@ Description: OpenCL C language implementation - development files Package: libunwind-@LLVM_VERSION@ Section: libs -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 +Architecture: amd64 arm64 armhf i386 ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} @@ -846,7 +846,7 @@ Description: production-quality unwinder Package: libunwind-@LLVM_VERSION@-dev Section: libdevel -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 +Architecture: amd64 arm64 armhf i386 ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, diff --git a/debian/rules b/debian/rules index 2a1c3766..f1123ee0 100755 --- a/debian/rules +++ b/debian/rules @@ -221,6 +221,13 @@ ifneq (,$(filter $(DEB_HOST_ARCH),s390x)) LIBCXX_USE_COMPILER_RT := OFF endif +ifneq (,$(filter $(DEB_HOST_ARCH),mips64el)) + STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_BUILD_BUILTINS=OFF + COMPILER_RT_USE_BUILTINS_LIBRARY := OFF + LIBCXX_USE_COMPILER_RT := OFF +endif + ifneq (,$(filter $(DEB_HOST_ARCH),x32)) STAGE_ALL_CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=x86_64-linux-gnux32 STAGE_ALL_CMAKE_EXTRA += -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnux32 @@ -306,7 +313,7 @@ endif # Enable libunwind (or not) LIBUNWIND_ENABLE=yes -ifneq (,$(filter $(DEB_HOST_ARCH), s390x armel m68k mipsel hurd-i386 powerpc sparc sparc64 x32)) +ifneq (,$(filter $(DEB_HOST_ARCH), s390x armel m68k mipsel mips64el hurd-i386 powerpc sparc sparc64 x32)) LIBUNWIND_ENABLE=no # do not use compiler-rt builtins for libcxx (libcxxabi) when libunwind is # disabled since the gnu implementation in libgcc_s will then be required From 1b491748565ff85da7f2cc5dcac1632e47cb5d81 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:39:55 +0200 Subject: [PATCH 13/27] Upload to sid --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3fbac30a..4cc0d2ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +llvm-toolchain-16 (1:16.0.6-11) unstable; urgency=medium + + * debian/patches/D158066.patch: + - upstream fix for Debian bug: #1049362 + * Also build-depend on libzstd-dev (Closes: #1047718) + * Explicitly depend on libcurl4-openssl-dev, since nss is being removed. + (Closes: #1043552) + + -- Gianfranco Costamagna Thu, 17 Aug 2023 10:19:13 +0200 + llvm-toolchain-16 (1:16.0.6-10) unstable; urgency=medium * update test to depend on libstdc++-13-dev From 32947f0f45c963742d8a35e4f0fd6f397de58bf2 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 08:40:06 +0200 Subject: [PATCH 14/27] Drop old spirv versions --- debian/control | 4 +--- debian/control.in | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 13fa753d..e1be7bc9 100644 --- a/debian/control +++ b/debian/control @@ -22,9 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, - llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | - llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | - llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], + llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], wasi-libc | hello [ !any-i386], libcurl4-openssl-dev | libcurl-dev, diff --git a/debian/control.in b/debian/control.in index 8b55e308..6a9e731c 100644 --- a/debian/control.in +++ b/debian/control.in @@ -22,9 +22,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, - llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | - llvm-spirv-15 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | - llvm-spirv-14 [ amd64 arm64 armel armhf mips64el mipsel ppc64el riscv64 s390x ] | hello [!i386], + llvm-spirv-16 [ amd64 arm64 armel armhf ppc64el riscv64 s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386], wasi-libc | hello [ !any-i386], libcurl4-openssl-dev | libcurl-dev, From 59c796c0e29e548dda115556d2e5c681573a0d27 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 18 Aug 2023 17:32:13 +0200 Subject: [PATCH 15/27] Also runtime-depend on {libzstd,zlib1g}-dev, from Paravoid --- debian/control | 5 +++-- debian/control.in | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index e1be7bc9..c08a065d 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,8 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, binutils-dev, libxml2-dev, libjsoncpp-dev, pkg-config, - lcov, procps, help2man, zlib1g-dev, libzstd-dev, + lcov, procps, help2man, + zlib1g-dev, libzstd-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, python3-recommonmark, doxygen, @@ -546,7 +547,7 @@ Section: libdevel Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 riscv64 # ia64 hurd powerpc have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lld-16 (= ${binary:Version}), - liblld-16 (= ${binary:Version}) + liblld-16 (= ${binary:Version}), libzstd-dev, zlib1g-dev Pre-Depends: ${misc:Pre-Depends} Description: LLVM-based linker, header files LLD is a new, high-performance linker. It is built as a set of reusable diff --git a/debian/control.in b/debian/control.in index 6a9e731c..e8b8a25d 100644 --- a/debian/control.in +++ b/debian/control.in @@ -546,7 +546,7 @@ Section: libdevel Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 riscv64 # ia64 hurd powerpc have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lld-@LLVM_VERSION@ (= ${binary:Version}), - liblld-@LLVM_VERSION@ (= ${binary:Version}) + liblld-@LLVM_VERSION@ (= ${binary:Version}), libzstd-dev, zlib1g-dev Pre-Depends: ${misc:Pre-Depends} Description: LLVM-based linker, header files LLD is a new, high-performance linker. It is built as a set of reusable From ae1efa595d236b7818b6386b8537fe013dc98914 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 22 Aug 2023 11:30:54 +0200 Subject: [PATCH 16/27] Also runtime-depend on {libzstd,zlib1g}-dev, from Paravoid --- debian/control.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control.in b/debian/control.in index e8b8a25d..d390d38a 100644 --- a/debian/control.in +++ b/debian/control.in @@ -13,7 +13,8 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, binutils-dev, libxml2-dev, libjsoncpp-dev, pkg-config, - lcov, procps, help2man, zlib1g-dev, libzstd-dev, + lcov, procps, help2man, + zlib1g-dev, libzstd-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, python3-recommonmark, doxygen, From 77462f3ae35b9a5bcbb4bd231fe6708f909c031c Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 30 Aug 2023 11:35:18 +0200 Subject: [PATCH 17/27] Disable wasm support on powerpc and powerpcspe --- debian/changelog | 7 +++++++ debian/rules | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4cc0d2ea..51173c63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-16 (1:16.0.6-12) UNRELEASED; urgency=medium + + [ John Paul Adrian Glaubitz ] + * Disable wasm support on powerpc and powerpcspe + + -- John Paul Adrian Glaubitz Wed, 30 Aug 2023 11:34:13 +0200 + llvm-toolchain-16 (1:16.0.6-11) unstable; urgency=medium * debian/patches/D158066.patch: diff --git a/debian/rules b/debian/rules index f1123ee0..56680dfc 100755 --- a/debian/rules +++ b/debian/rules @@ -412,6 +412,10 @@ ifeq (,$(filter-out $(LIBCXX_WASM_DISABLE_DISTRO), $(DISTRO))) LIBCXX_WASM_ENABLE=no endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) + LIBCXX_WASM_ENABLE=no +endif + LLD_ENABLE=yes ifneq (,$(filter $(DEB_HOST_ARCH_OS),linux)) From 5088597e57db29b91b3ea37a2ea6b78965336c5f Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 30 Aug 2023 11:36:01 +0200 Subject: [PATCH 18/27] Remove powerpc from BINUTILS_GOLD_ARCHS again --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 51173c63..02aff884 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-16 (1:16.0.6-12) UNRELEASED; urgency=medium [ John Paul Adrian Glaubitz ] * Disable wasm support on powerpc and powerpcspe + * Remove powerpc from BINUTILS_GOLD_ARCHS again -- John Paul Adrian Glaubitz Wed, 30 Aug 2023 11:34:13 +0200 diff --git a/debian/rules b/debian/rules index 56680dfc..09bff929 100755 --- a/debian/rules +++ b/debian/rules @@ -274,7 +274,7 @@ ifeq ($(LLVM_SPIRV_INSTALLED),yes) LIBCLC_LLVM_SPIRV = "-DLLVM_SPIRV=$(LLVM_SPIRV)" endif -BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 ppc64 ppc64el x32 s390x powerpc hurd-i386 kfreebsd-amd64 kfreebsd-i386 +BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 ppc64 ppc64el x32 s390x hurd-i386 kfreebsd-amd64 kfreebsd-i386 ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0) ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) STAGE_ALL_CMAKE_EXTRA += -DLLVM_USE_LINKER=gold From 5fb230a269a65c0fe23b5b2cf21a3d8c3ef7230e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 20 Aug 2023 11:24:30 +0200 Subject: [PATCH 19/27] also disable the python3 lldb binding on bionic --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 09bff929..2e9fc51a 100755 --- a/debian/rules +++ b/debian/rules @@ -1180,7 +1180,7 @@ endif # Disable the python binding for buster. not sure why it regressed # regressed de4364f1ecaa..0745b0c0354a - if test "$(DISTRO)" = "buster"; then \ + if test "$(DISTRO)" = "buster" -o "$(DISTRO)" = "bionic"; then \ mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/; \ touch $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/empty; \ echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ From f6389192dcf5f7acac5e84204a5b662498a6b3eb Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 3 Sep 2023 14:06:24 +0200 Subject: [PATCH 20/27] Disable python3-lldb on mips64el to unnreak the build --- debian/changelog | 7 +++++-- debian/rules | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 02aff884..8c527910 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,13 @@ -llvm-toolchain-16 (1:16.0.6-12) UNRELEASED; urgency=medium +llvm-toolchain-16 (1:16.0.6-12) unstable; urgency=medium [ John Paul Adrian Glaubitz ] * Disable wasm support on powerpc and powerpcspe * Remove powerpc from BINUTILS_GOLD_ARCHS again - -- John Paul Adrian Glaubitz Wed, 30 Aug 2023 11:34:13 +0200 + [ Sylvestre Ledru ] + * Disable python3-lldb on mips64el to unnreak the build + + -- Sylvestre Ledru Sun, 03 Sep 2023 14:06:19 +0200 llvm-toolchain-16 (1:16.0.6-11) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 2e9fc51a..57988a3d 100755 --- a/debian/rules +++ b/debian/rules @@ -1180,7 +1180,7 @@ endif # Disable the python binding for buster. not sure why it regressed # regressed de4364f1ecaa..0745b0c0354a - if test "$(DISTRO)" = "buster" -o "$(DISTRO)" = "bionic"; then \ + if test "$(DISTRO)" = "buster" -o "$(DISTRO)" = "bionic" -o "$(DEB_HOST_ARCH)" = "mips64el" then \ mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/; \ touch $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/empty; \ echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ From 764d84bc2cd8cd7101fae534dbd8112020dbd618 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Sep 2023 23:06:37 +0200 Subject: [PATCH 21/27] fix typo --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8c527910..7ddc64a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ llvm-toolchain-16 (1:16.0.6-12) unstable; urgency=medium * Remove powerpc from BINUTILS_GOLD_ARCHS again [ Sylvestre Ledru ] - * Disable python3-lldb on mips64el to unnreak the build + * Disable python3-lldb on mips64el to unbreak the build -- Sylvestre Ledru Sun, 03 Sep 2023 14:06:19 +0200 From 8dfcd740c5d36dec010405c08410484352a6743b Mon Sep 17 00:00:00 2001 From: Samuel Henrique Date: Wed, 6 Sep 2023 21:16:32 +0100 Subject: [PATCH 22/27] Explicitly depend on libcurl4-openssl-dev, since nss is being removed. (Closes: #1043551) --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7ddc64a1..1817311f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,22 @@ llvm-toolchain-16 (1:16.0.6-12) unstable; urgency=medium +<<<<<<< [ John Paul Adrian Glaubitz ] * Disable wasm support on powerpc and powerpcspe * Remove powerpc from BINUTILS_GOLD_ARCHS again [ Sylvestre Ledru ] * Disable python3-lldb on mips64el to unbreak the build +======= + [ John Paul Adrian Glaubitz ] + * Disable wasm support on powerpc and powerpcspe + * Remove powerpc from BINUTILS_GOLD_ARCHS again + + [ Sylvestre Ledru ] + * Disable python3-lldb on mips64el to unnreak the build + * Explicitly depend on libcurl4-openssl-dev. Thanks to + Samuel Henrique for the patches +>>>>>>> -- Sylvestre Ledru Sun, 03 Sep 2023 14:06:19 +0200 From 1e7abf79ec19b0c2e9ad63fde9e45c9b640f9ba4 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Sep 2023 22:54:25 +0200 Subject: [PATCH 23/27] mergd From 66bfde8cec81df6a4b05ece5069d1a8ebce4ad3e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Sep 2023 23:27:04 +0200 Subject: [PATCH 24/27] fix typo --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 57988a3d..6f4a607a 100755 --- a/debian/rules +++ b/debian/rules @@ -1180,7 +1180,7 @@ endif # Disable the python binding for buster. not sure why it regressed # regressed de4364f1ecaa..0745b0c0354a - if test "$(DISTRO)" = "buster" -o "$(DISTRO)" = "bionic" -o "$(DEB_HOST_ARCH)" = "mips64el" then \ + if test "$(DISTRO)" = "buster" -o "$(DISTRO)" = "bionic" -o "$(DEB_HOST_ARCH)" = "mips64el"; then \ mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/; \ touch $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/gdb/python/ompd/empty; \ echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ From b4ca26951a4c5e7ce53ed186dd1a2ed7d3414866 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Sep 2023 23:29:11 +0200 Subject: [PATCH 25/27] fix changelog --- debian/changelog | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1817311f..7ddc64a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,22 +1,11 @@ llvm-toolchain-16 (1:16.0.6-12) unstable; urgency=medium -<<<<<<< [ John Paul Adrian Glaubitz ] * Disable wasm support on powerpc and powerpcspe * Remove powerpc from BINUTILS_GOLD_ARCHS again [ Sylvestre Ledru ] * Disable python3-lldb on mips64el to unbreak the build -======= - [ John Paul Adrian Glaubitz ] - * Disable wasm support on powerpc and powerpcspe - * Remove powerpc from BINUTILS_GOLD_ARCHS again - - [ Sylvestre Ledru ] - * Disable python3-lldb on mips64el to unnreak the build - * Explicitly depend on libcurl4-openssl-dev. Thanks to - Samuel Henrique for the patches ->>>>>>> -- Sylvestre Ledru Sun, 03 Sep 2023 14:06:19 +0200 From 9d8958e1b80b6eb7828d8d9a6cac4195ef8fe928 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 25 Aug 2023 17:30:12 +0200 Subject: [PATCH 26/27] Drop lldb-link-atomic-cmake.patch, probably already superseeded by upstream commit f753bfeeec449dcd0e56bfa98b359598e4798b1f --- .../patches/lldb/lldb-link-atomic-cmake.patch | 26 ------------------- debian/patches/series | 1 - 2 files changed, 27 deletions(-) delete mode 100644 debian/patches/lldb/lldb-link-atomic-cmake.patch diff --git a/debian/patches/lldb/lldb-link-atomic-cmake.patch b/debian/patches/lldb/lldb-link-atomic-cmake.patch deleted file mode 100644 index 61cbcfdd..00000000 --- a/debian/patches/lldb/lldb-link-atomic-cmake.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: Link with -latomic when mips* processor is detected -Author: Gianfranco Costamagna -Last-Update: 2016-07-27 - ---- - lldb/cmake/LLDBDependencies.cmake | 6 ++++++ - 1 file changed, 6 insertions(+) - -Index: llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487/lldb/source/Utility/CMakeLists.txt -=================================================================== ---- llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487.orig/lldb/source/Utility/CMakeLists.txt -+++ llvm-toolchain-snapshot_15~++20220407011631+46f0e2ceb487/lldb/source/Utility/CMakeLists.txt -@@ -15,6 +15,13 @@ endif() - - list(APPEND LLDB_SYSTEM_LIBS ${CMAKE_DL_LIBS}) - -+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips" OR -+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mipsel" OR -+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el" OR -+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "powerpcspe") -+ list(APPEND LLDB_SYSTEM_LIBS atomic) -+endif() -+ - if (CMAKE_SYSTEM_NAME MATCHES "Windows") - list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4) - endif () diff --git a/debian/patches/series b/debian/patches/series index 3d38b7f8..6cbaed91 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -51,7 +51,6 @@ scan-view-fix-path.diff fix-scan-view-path.diff # lldb -lldb/lldb-link-atomic-cmake.patch lldb/lldb-addversion-suffix-to-llvm-server-exec.patch lldb/lldb-missing-install.diff lldb/lldb-disable-swig-error.diff From f1404ffaf434b3e20c65105dcabb9893d8f0a5c9 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 7 Sep 2023 01:44:09 +0200 Subject: [PATCH 27/27] Update changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7ddc64a1..3e8ac9a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-16 (1:16.0.6-13) UNRELEASED; urgency=medium + + * Also runtime-depend on {libzstd,zlib1g}-dev, from Paravoid (Closes: + #1047718) + + -- Gianfranco Costamagna Thu, 07 Sep 2023 01:43:23 +0200 + llvm-toolchain-16 (1:16.0.6-12) unstable; urgency=medium [ John Paul Adrian Glaubitz ]