From bb73a68cfc5a251ade5993aff295916bffa6fe115886365760674a2d39634f5f Mon Sep 17 00:00:00 2001 From: William Brown Date: Tue, 5 Nov 2024 04:39:06 +0000 Subject: [PATCH] - Resolve build failure on PPC64LE due to invalid float cast * ppc64le-float.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust1.82?expand=0&rev=4 --- ppc64le-float.patch | 14 ++++++++++++++ rust1.82.changes | 6 ++++++ rust1.82.spec | 4 +++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ppc64le-float.patch diff --git a/ppc64le-float.patch b/ppc64le-float.patch new file mode 100644 index 0000000..91b7946 --- /dev/null +++ b/ppc64le-float.patch @@ -0,0 +1,14 @@ +diff -rupN rustc-1.82.0-src.orig/src/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp rustc-1.82.0-src/src/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp +--- rustc-1.82.0-src.orig/src/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp ++++ rustc-1.82.0-src/src/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp +@@ -1784,8 +1784,8 @@ Constant *ConstantFoldFP(double (*Native + } + + #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/rust1.82.changes b/rust1.82.changes index d67b12c..7a80761 100644 --- a/rust1.82.changes +++ b/rust1.82.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 5 03:41:46 UTC 2024 - William Brown + +- Resolve build failure on PPC64LE due to invalid float cast + * ppc64le-float.patch + ------------------------------------------------------------------- Tue Oct 22 02:58:38 UTC 2024 - William Brown diff --git a/rust1.82.spec b/rust1.82.spec index 6a4fe77..cf05cc0 100644 --- a/rust1.82.spec +++ b/rust1.82.spec @@ -1,5 +1,5 @@ # -# spec file for package rust1.81 +# spec file for package rust1.82 # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2019 Luke Jones, luke@ljones.dev @@ -267,8 +267,10 @@ Source209: %{dl_url}/rust-%{version_current}-riscv64gc-unknown-linux-gnu.ta NoSource: 209 # Make factory-auto stop complaining... Source1000: README.suse-maint + # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag Patch0: ignore-Wstring-conversion.patch +Patch1: ppc64le-float.patch # IMPORTANT - To generate patches for submodules in git so they apply relatively you can use # git format-patch --text --dst-prefix=b/src/tools/cargo/ HEAD~2