diff mbox series

[meta-lts-mixins,scarthgap/rust,13/29] rust-llvm: Fix build break found with clang

Message ID f3c5abf3fbb5da4d0682011ecf2f330e9e85c668.1744061149.git.scott.murray@konsulko.com
State New
Headers show
Series Update to Rust 1.85.1 | expand

Commit Message

Scott Murray April 7, 2025, 9:30 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

call and callee have mismatched types, this patch fixes it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 88e5970998fb4c72844056be19e3a9f77de3f4d6)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 .../0001-NFC-fix-build-failure-100993.patch   | 30 +++++++++++++++++++
 recipes-devtools/rust/rust-llvm_1.82.0.bb     |  4 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 recipes-devtools/rust/rust-llvm/0001-NFC-fix-build-failure-100993.patch
diff mbox series

Patch

diff --git a/recipes-devtools/rust/rust-llvm/0001-NFC-fix-build-failure-100993.patch b/recipes-devtools/rust/rust-llvm/0001-NFC-fix-build-failure-100993.patch
new file mode 100644
index 0000000..ed26de7
--- /dev/null
+++ b/recipes-devtools/rust/rust-llvm/0001-NFC-fix-build-failure-100993.patch
@@ -0,0 +1,30 @@ 
+From 40b4fd7a3e81d32b29364a1b15337bcf817659c0 Mon Sep 17 00:00:00 2001
+From: Chen Zheng <czhengsz@cn.ibm.com>
+Date: Tue, 30 Jul 2024 09:02:07 +0800
+Subject: [PATCH] [NFC] fix build failure (#100993)
+
+Fix the build failure caused by
+https://github.com/llvm/llvm-project/pull/94944
+
+Fixes https://github.com/llvm/llvm-project/issues/100296
+Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/40b4fd7a3e81d32b29364a1b15337bcf817659c0]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ llvm/lib/Analysis/ConstantFolding.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
+index 85ee231675d0..084647b1d9d9 100644
+--- a/llvm/lib/Analysis/ConstantFolding.cpp
++++ b/llvm/lib/Analysis/ConstantFolding.cpp
+@@ -1782,8 +1782,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V,
+ }
+ 
+ #if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128)
+-Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
+-                            const APFloat &V, Type *Ty) {
++Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V,
++                            Type *Ty) {
+   llvm_fenv_clearexcept();
+   float128 Result = NativeFP(V.convertToQuad());
+   if (llvm_fenv_testexcept()) {
diff --git a/recipes-devtools/rust/rust-llvm_1.82.0.bb b/recipes-devtools/rust/rust-llvm_1.82.0.bb
index 509b507..17d49be 100644
--- a/recipes-devtools/rust/rust-llvm_1.82.0.bb
+++ b/recipes-devtools/rust/rust-llvm_1.82.0.bb
@@ -10,7 +10,9 @@  require rust-source.inc
 
 SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
             file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
-	    file://0003-llvm-fix-include-benchmarks.patch;striplevel=2"
+            file://0003-llvm-fix-include-benchmarks.patch;striplevel=2 \
+            file://0001-NFC-fix-build-failure-100993.patch;striplevel=2 \
+           "
 
 S = "${RUSTSRC}/src/llvm-project/llvm"