From a4366d1be29a74205a0e82821c28bd38eca7ed92 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sun, 10 Sep 2023 19:18:43 +0200 Subject: [PATCH 01/17] Make sure we use at least spirv 17, FTBFS otherwise --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index e8dc5bf5..a44eeee6 100755 --- a/debian/rules +++ b/debian/rules @@ -259,7 +259,7 @@ endif ifndef LLVM_SPIRV LLVM_SPIRV_INSTALLED = no else - ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv-$(LLVM_SPIRV_VERSION)) gt 14.0.0 ; echo $$?),0) + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' llvm-spirv-$(LLVM_SPIRV_VERSION)) gt 17.0.0 ; echo $$?),0) # Too old llvm-spirv version are failing. See #52200 LLVM_SPIRV_INSTALLED = yes else From ccce4c11df6cb3aa68f8423aa9ad7ef55a65455f Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:03:59 +0200 Subject: [PATCH 02/17] Add patch D158066 from llvm-toolchain-16 branch --- debian/patches/D158066.patch | 355 +++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 356 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..8db4a92f --- /dev/null +++ b/debian/patches/D158066.patch @@ -0,0 +1,355 @@ +Description: Fix SIMD compatibility headers on ppc64el +Origin/Author: https://reviews.llvm.org/D158066 +Bug-Debian: https://bugs.debian.org/1049362 + +diff --git a/clang/include/clang/Basic/BuiltinsPPC.def b/clang/include/clang/Basic/BuiltinsPPC.def +--- a/clang/include/clang/Basic/BuiltinsPPC.def ++++ b/clang/include/clang/Basic/BuiltinsPPC.def +@@ -151,8 +151,10 @@ + TARGET_BUILTIN(__builtin_ppc_extract_sig, "ULLid", "", "power9-vector") + 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", "") + TARGET_BUILTIN(__builtin_ppc_insert_exp, "ddULLi", "", "power9-vector") + BUILTIN(__builtin_ppc_fmsub, "dddd", "") + BUILTIN(__builtin_ppc_fmsubs, "ffff", "") +diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp +--- a/clang/lib/Basic/Targets/PPC.cpp ++++ b/clang/lib/Basic/Targets/PPC.cpp +@@ -262,6 +262,10 @@ + Builder.defineMacro("__builtin_minfe", "__builtin_ppc_minfe"); + Builder.defineMacro("__builtin_minfl", "__builtin_ppc_minfl"); + Builder.defineMacro("__builtin_minfs", "__builtin_ppc_minfs"); ++ Builder.defineMacro("__builtin_mffs", "__builtin_ppc_mffs"); ++ Builder.defineMacro("__builtin_mffsl", "__builtin_ppc_mffsl"); ++ Builder.defineMacro("__builtin_mtfsf", "__builtin_ppc_mtfsf"); ++ Builder.defineMacro("__builtin_set_fpscr_rn", "__builtin_ppc_set_fpscr_rn"); + } + + /// PPCTargetInfo::getTargetDefines - Return a set of the PowerPC-specific +diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp +--- a/clang/lib/CodeGen/CGBuiltin.cpp ++++ b/clang/lib/CodeGen/CGBuiltin.cpp +@@ -17062,6 +17062,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)); + } + } + +diff --git a/clang/lib/Headers/ppc_wrappers/smmintrin.h b/clang/lib/Headers/ppc_wrappers/smmintrin.h +--- a/clang/lib/Headers/ppc_wrappers/smmintrin.h ++++ b/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; + } +diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc.c b/clang/test/CodeGen/PowerPC/builtins-ppc.c +--- a/clang/test/CodeGen/PowerPC/builtins-ppc.c ++++ b/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); + } + +diff --git a/clang/test/CodeGen/PowerPC/ppc-emmintrin.c b/clang/test/CodeGen/PowerPC/ppc-emmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-emmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-emmintrin.c +@@ -8,6 +8,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK-P10 + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-BE + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ +diff --git a/clang/test/CodeGen/PowerPC/ppc-mmintrin.c b/clang/test/CodeGen/PowerPC/ppc-mmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-mmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-mmintrin.c +@@ -9,6 +9,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n| FileCheck %s --check-prefixes=CHECK-P9,CHECK,CHECK-LE + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-freebsd13.0 -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK-P8,CHECK,CHECK-BE + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-freebsd13.0 -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ +diff --git a/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c b/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c +@@ -13,6 +13,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -DNO_MM_MALLOC -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-gnu-linux -mcpu=pwr8 -DNO_MM_MALLOC -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + __m128d resd, md1, md2; +diff --git a/clang/test/CodeGen/PowerPC/ppc-smmintrin.c b/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-smmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +@@ -15,6 +15,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefix=P10 + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-freebsd13.0 -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-freebsd13.0 -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ +@@ -239,44 +244,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/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c b/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c +@@ -13,6 +13,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-BE + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-gnu-linux -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + __m64 res, m1, m2; +diff --git a/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c b/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c +@@ -12,6 +12,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr7 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr7 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + unsigned short us; diff --git a/debian/patches/series b/debian/patches/series index 333e2cc8..6a2193ac 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -147,3 +147,4 @@ unwind-force-pthread-dl.diff force-sse2-compiler-rt.diff bolt-disable-emit-relocs.patch link-grpc.diff +D158066.patch From c6388ffd4aefd78d14850e1244985791cb787d13 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:04:11 +0200 Subject: [PATCH 03/17] Update changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index d4ae8966..c327a957 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-17 (1:17.0.0~+rc4-1~exp5) UNRELEASED; urgency=medium + + * debian/patches/D158066.patch: + - cherry-pick change from 1:16.0.6-11 + * Make sure at least spirv 17 is used, FTBFS with older version + + -- Gianfranco Costamagna Tue, 12 Sep 2023 08:51:38 +0200 + llvm-toolchain-17 (1:17.0.0~+rc4-1~exp4) experimental; urgency=medium [ Gianfranco Costamagna ] From 443f08468cb7d3b059e563067c8604e59704be92 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:06:48 +0200 Subject: [PATCH 04/17] Refresh D158066 patch --- debian/patches/D158066.patch | 125 ++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 17 deletions(-) diff --git a/debian/patches/D158066.patch b/debian/patches/D158066.patch index 99989d00..7f615de4 100644 --- a/debian/patches/D158066.patch +++ b/debian/patches/D158066.patch @@ -17,10 +17,23 @@ Index: llvm-toolchain-16-16.0.6/clang/include/clang/Basic/BuiltinsPPC.def 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 +diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp +--- a/clang/lib/Basic/Targets/PPC.cpp ++++ b/clang/lib/Basic/Targets/PPC.cpp +@@ -260,6 +260,10 @@ + Builder.defineMacro("__builtin_minfe", "__builtin_ppc_minfe"); + Builder.defineMacro("__builtin_minfl", "__builtin_ppc_minfl"); + Builder.defineMacro("__builtin_minfs", "__builtin_ppc_minfs"); ++ Builder.defineMacro("__builtin_mffs", "__builtin_ppc_mffs"); ++ Builder.defineMacro("__builtin_mffsl", "__builtin_ppc_mffsl"); ++ Builder.defineMacro("__builtin_mtfsf", "__builtin_ppc_mtfsf"); ++ Builder.defineMacro("__builtin_set_fpscr_rn", "__builtin_ppc_set_fpscr_rn"); + } + + /// PPCTargetInfo::getTargetDefines - Return a set of the PowerPC-specific +diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp +--- a/clang/lib/CodeGen/CGBuiltin.cpp ++++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -16742,6 +16742,11 @@ Value *Op1 = EmitScalarExpr(E->getArg(1)); return Builder.CreateFDiv(Op0, Op1, "swdiv"); @@ -33,10 +46,9 @@ Index: llvm-toolchain-16-16.0.6/clang/lib/CodeGen/CGBuiltin.cpp } } -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 +diff --git a/clang/lib/Headers/ppc_wrappers/smmintrin.h b/clang/lib/Headers/ppc_wrappers/smmintrin.h +--- a/clang/lib/Headers/ppc_wrappers/smmintrin.h ++++ b/clang/lib/Headers/ppc_wrappers/smmintrin.h @@ -14,7 +14,7 @@ #ifndef NO_WARN_X86_INTRINSICS @@ -160,10 +172,9 @@ Index: llvm-toolchain-16-16.0.6/clang/lib/Headers/ppc_wrappers/smmintrin.h } 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 +diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc.c b/clang/test/CodeGen/PowerPC/builtins-ppc.c +--- a/clang/test/CodeGen/PowerPC/builtins-ppc.c ++++ b/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 @@ -196,11 +207,65 @@ Index: llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/builtins-ppc.c 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 @@ +diff --git a/clang/test/CodeGen/PowerPC/ppc-emmintrin.c b/clang/test/CodeGen/PowerPC/ppc-emmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-emmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-emmintrin.c +@@ -8,6 +8,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK-P10 + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -ffp-contract=off -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-BE + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ +diff --git a/clang/test/CodeGen/PowerPC/ppc-mmintrin.c b/clang/test/CodeGen/PowerPC/ppc-mmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-mmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-mmintrin.c +@@ -9,6 +9,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n| FileCheck %s --check-prefixes=CHECK-P9,CHECK,CHECK-LE + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-freebsd13.0 -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK-P8,CHECK,CHECK-BE + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-freebsd13.0 -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS %s \ +diff --git a/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c b/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-pmmintrin.c +@@ -13,6 +13,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -DNO_MM_MALLOC -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-gnu-linux -mcpu=pwr8 -DNO_MM_MALLOC -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + __m128d resd, md1, md2; +diff --git a/clang/test/CodeGen/PowerPC/ppc-smmintrin.c b/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-smmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-smmintrin.c +@@ -15,6 +15,11 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefix=P10 + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + // RUN: %clang -S -emit-llvm -target powerpc64le-unknown-freebsd13.0 -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + // RUN: %clang -S -emit-llvm -target powerpc64-unknown-freebsd13.0 -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ +@@ -239,44 +244,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_.]+}}) @@ -263,3 +328,29 @@ Index: llvm-toolchain-16-16.0.6/clang/test/CodeGen/PowerPC/ppc-smmintrin.c // 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/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c b/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-tmmintrin.c +@@ -13,6 +13,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-BE + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-gnu-linux -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + __m64 res, m1, m2; +diff --git a/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c b/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c +--- a/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c ++++ b/clang/test/CodeGen/PowerPC/ppc-x86gprintrin.c +@@ -12,6 +12,9 @@ + // RUN: %clang -S -emit-llvm -target powerpc64-ibm-aix -mcpu=pwr7 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ + // RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s + ++// RUN: %clang -x c++ -S -emit-llvm -target powerpc64le-unknown-linux-gnu -mcpu=pwr7 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \ ++// RUN: -fno-discard-value-names -mllvm -disable-llvm-optzns -fsyntax-only ++ + #include + + unsigned short us; From 665dec9292b4a55531dae7cadd2258e557452ab6 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:06:58 +0200 Subject: [PATCH 05/17] Add patch to hopefully fix mips64el build --- debian/patches/mips64el-ompt.patch | 10 ++++++++++ debian/patches/series | 1 + 2 files changed, 11 insertions(+) create mode 100644 debian/patches/mips64el-ompt.patch diff --git a/debian/patches/mips64el-ompt.patch b/debian/patches/mips64el-ompt.patch new file mode 100644 index 00000000..3e84a148 --- /dev/null +++ b/debian/patches/mips64el-ompt.patch @@ -0,0 +1,10 @@ +--- llvm-toolchain-16-16.0.6.orig/openmp/runtime/cmake/config-ix.cmake ++++ llvm-toolchain-16-16.0.6/openmp/runtime/cmake/config-ix.cmake +@@ -328,6 +329,7 @@ else() + (LIBOMP_ARCH STREQUAL aarch64) OR + (LIBOMP_ARCH STREQUAL aarch64_a64fx) OR + (LIBOMP_ARCH STREQUAL ppc64le) OR ++ (LIBOMP_ARCH STREQUAL mips64) OR + (LIBOMP_ARCH STREQUAL ppc64) OR + (LIBOMP_ARCH STREQUAL riscv64) OR + (LIBOMP_ARCH STREQUAL loongarch64)) diff --git a/debian/patches/series b/debian/patches/series index 6cbaed91..1f72d367 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -153,3 +153,4 @@ ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch D158066.patch +mips64el-ompt.patch From 63151625c2ac12f1d1b5705fbb2d48f227b4548d Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:07:11 +0200 Subject: [PATCH 06/17] Drop mips64el hack --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 6cb1ab63..7d7c278f 100755 --- a/debian/rules +++ b/debian/rules @@ -1190,7 +1190,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"; 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 8746d3fe6e49442fa038d05dd1fec93296554a44 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:07:17 +0200 Subject: [PATCH 07/17] Update changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4bd4dfed..b8a4ed44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium + + * Second attempt to refresh D158066.patch (Closes: #1049362) + * Second attempt to fix mips64el without loosing ompd + + -- Gianfranco Costamagna Mon, 11 Sep 2023 15:40:42 +0200 + llvm-toolchain-16 (1:16.0.6-14) unstable; urgency=medium [ Sylvestre Ledru ] From d616c4013043da9a5944673a6e74ef061063604d Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 09:14:59 +0200 Subject: [PATCH 08/17] Update changelog --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2c1cd1de..7943038a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-17 (1:17.0.0~+rc4-1~exp5) UNRELEASED; urgency=medium +llvm-toolchain-17 (1:17.0.0~+rc4-1~exp5) experimental; urgency=medium * debian/patches/D158066.patch: - cherry-pick change from 1:16.0.6-11 From 92f7655f23e9f1166f6c39fe215d36f148d6624e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 12 Sep 2023 09:31:18 +0200 Subject: [PATCH 09/17] rename the patch for something more explicit --- debian/patches/{D158066.patch => D158066-simd-ppc64el.patch} | 0 debian/patches/series | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename debian/patches/{D158066.patch => D158066-simd-ppc64el.patch} (100%) diff --git a/debian/patches/D158066.patch b/debian/patches/D158066-simd-ppc64el.patch similarity index 100% rename from debian/patches/D158066.patch rename to debian/patches/D158066-simd-ppc64el.patch diff --git a/debian/patches/series b/debian/patches/series index 1f72d367..71f6fc95 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -152,5 +152,5 @@ amdgpu/nonlinux.patch ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch -D158066.patch +D158066-simd-ppc64el.patch mips64el-ompt.patch From 146c1bf5e8ed5dcdaa2f29dfa3c85c0b3d860bcd Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 19:32:39 +0200 Subject: [PATCH 10/17] Revert "Drop mips64el hack" This reverts commit 63151625c2ac12f1d1b5705fbb2d48f227b4548d. --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 7d7c278f..6cb1ab63 100755 --- a/debian/rules +++ b/debian/rules @@ -1190,7 +1190,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 d70fc9d350367d41b55ff14013108a6391be796a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 19:44:26 +0200 Subject: [PATCH 11/17] Upload --- debian/changelog | 1 - debian/patches/series | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b8a4ed44..746272f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,6 @@ llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium * Second attempt to refresh D158066.patch (Closes: #1049362) - * Second attempt to fix mips64el without loosing ompd -- Gianfranco Costamagna Mon, 11 Sep 2023 15:40:42 +0200 diff --git a/debian/patches/series b/debian/patches/series index 71f6fc95..60318593 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -153,4 +153,4 @@ ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch D158066-simd-ppc64el.patch -mips64el-ompt.patch +#mips64el-ompt.patch From bdaf3c52bac44a9f4284e603b83e7257af24abbf Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 19:32:39 +0200 Subject: [PATCH 12/17] Revert "Drop mips64el hack" This reverts commit 63151625c2ac12f1d1b5705fbb2d48f227b4548d. --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 9a215574..a44eeee6 100755 --- a/debian/rules +++ b/debian/rules @@ -1217,7 +1217,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 753379e0e06236751aed9a8b8ba475191220d234 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 19:44:26 +0200 Subject: [PATCH 13/17] Upload --- debian/changelog | 1 - debian/patches/series | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7943038a..33caad3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -124,7 +124,6 @@ llvm-toolchain-snapshot (1:17~++20230128060150+75153adeda1a-1~exp1) experimental llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium * Second attempt to refresh D158066.patch (Closes: #1049362) - * Second attempt to fix mips64el without loosing ompd -- Gianfranco Costamagna Mon, 11 Sep 2023 15:40:42 +0200 diff --git a/debian/patches/series b/debian/patches/series index 9aedc669..24c7fb9e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -148,4 +148,4 @@ force-sse2-compiler-rt.diff bolt-disable-emit-relocs.patch link-grpc.diff D158066-simd-ppc64el.patch -mips64el-ompt.patch +#mips64el-ompt.patch From 881afc1a01a64f9768345840ad9b251d65bd85d1 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 12 Sep 2023 19:57:53 +0200 Subject: [PATCH 14/17] Try to enable mips64el for experimental --- debian/changelog | 6 ++++++ debian/patches/series | 2 +- debian/rules | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 746272f9..9d892d5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-16 (1:16.0.6-15exp1) experimental; urgency=medium + + * Try to build mips64el + + -- Gianfranco Costamagna Tue, 12 Sep 2023 19:48:32 +0200 + llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium * Second attempt to refresh D158066.patch (Closes: #1049362) diff --git a/debian/patches/series b/debian/patches/series index 60318593..71f6fc95 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -153,4 +153,4 @@ ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch D158066-simd-ppc64el.patch -#mips64el-ompt.patch +mips64el-ompt.patch diff --git a/debian/rules b/debian/rules index 6cb1ab63..7d7c278f 100755 --- a/debian/rules +++ b/debian/rules @@ -1190,7 +1190,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"; 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 9b6ff62b57ac17aebbc3b69e58c3c3c5557e3367 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 13 Sep 2023 11:52:14 +0200 Subject: [PATCH 15/17] Revert "Try to enable mips64el for experimental" This reverts commit 881afc1a01a64f9768345840ad9b251d65bd85d1. --- debian/changelog | 6 ------ debian/patches/series | 2 +- debian/rules | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9d892d5a..746272f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -llvm-toolchain-16 (1:16.0.6-15exp1) experimental; urgency=medium - - * Try to build mips64el - - -- Gianfranco Costamagna Tue, 12 Sep 2023 19:48:32 +0200 - llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium * Second attempt to refresh D158066.patch (Closes: #1049362) diff --git a/debian/patches/series b/debian/patches/series index 71f6fc95..60318593 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -153,4 +153,4 @@ ubuntu-releases.patch new-cmake-build-fix.patch HIP-search-path-fix.patch D158066-simd-ppc64el.patch -mips64el-ompt.patch +#mips64el-ompt.patch diff --git a/debian/rules b/debian/rules index 7d7c278f..6cb1ab63 100755 --- a/debian/rules +++ b/debian/rules @@ -1190,7 +1190,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 f595c837a2a6c681e328d02706d54136bf5816b0 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sat, 16 Sep 2023 10:39:01 +0200 Subject: [PATCH 16/17] Make libclang-common-16-dev arch:any (Closes: #1041455) --- debian/control | 2 +- debian/control.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index bd8fbba0..2a17e73c 100644 --- a/debian/control +++ b/debian/control @@ -166,7 +166,7 @@ Description: Clang library - Development package libclang1-16. Package: libclang-common-16-dev -Architecture: all +Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm16 (>= ${source:Version}), libllvm16 (<< ${source:Version}.1~) diff --git a/debian/control.in b/debian/control.in index 6df959fa..c1862739 100644 --- a/debian/control.in +++ b/debian/control.in @@ -166,7 +166,7 @@ Description: Clang library - Development package libclang1-@LLVM_VERSION@. Package: libclang-common-@LLVM_VERSION@-dev -Architecture: all +Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm@LLVM_VERSION@ (>= ${source:Version}), libllvm@LLVM_VERSION@ (<< ${source:Version}.1~) From a20a6e46dcc91a341f326aabe80c118e213daf11 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sat, 16 Sep 2023 10:39:36 +0200 Subject: [PATCH 17/17] Update changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 746272f9..99a89e3c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-16 (1:16.0.6-16) UNRELEASED; urgency=medium + + * Make libclang-common-16-dev arch:any (Closes: #1041455) + + -- Gianfranco Costamagna Sat, 16 Sep 2023 10:39:22 +0200 + llvm-toolchain-16 (1:16.0.6-15) unstable; urgency=medium * Second attempt to refresh D158066.patch (Closes: #1049362)