Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust rust: try to fix some llvm-10 fallout



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3055ca4f5fb5
branches:  trunk
changeset: 431858:3055ca4f5fb5
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat May 16 19:36:12 2020 +0000

description:
rust: try to fix some llvm-10 fallout

diffstat:

 lang/rust/distinfo                                   |   4 +++-
 lang/rust/patches/patch-src_rustllvm_PassWrapper.cpp |  15 +++++++++++++++
 lang/rust/patches/patch-src_rustllvm_RustWrapper.cpp |  20 ++++++++++++++++++++
 3 files changed, 38 insertions(+), 1 deletions(-)

diffs (61 lines):

diff -r 27fd57b0b3e9 -r 3055ca4f5fb5 lang/rust/distinfo
--- a/lang/rust/distinfo        Sat May 16 19:19:08 2020 +0000
+++ b/lang/rust/distinfo        Sat May 16 19:36:12 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.109 2020/05/16 10:39:51 he Exp $
+$NetBSD: distinfo,v 1.110 2020/05/16 19:36:12 tnn Exp $
 
 SHA1 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 91517fa95f954427c627cf63eb7c518abd068f3e
 RMD160 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 06a3d922b27aac2deb570301542897a131b47cd0
@@ -120,6 +120,8 @@
 SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = 7588a46aaa277ef04b33ac6d904b9d1d81579f2a
 SHA1 (patch-src_llvm-project_llvm_include_llvm_Analysis_ConstantFolding.h) = 977de4b2a9d37f7e7c782f2407c15591e032b6c6
 SHA1 (patch-src_llvm-project_llvm_utils_FileCheck_FileCheck.cpp) = 2675b93a1d636b297a3e1e84b915a15a3da67939
+SHA1 (patch-src_rustllvm_PassWrapper.cpp) = 057b21eb100613d24a496b72a0d6e22548101a96
+SHA1 (patch-src_rustllvm_RustWrapper.cpp) = 3440de7536d05ea93c1d5c01bb09f5472e830ca8
 SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 3aac5d54a6fe96b9559552e67e497488142d4e80
 SHA1 (patch-src_tools_cargo_tests_testsuite_build.rs) = 10e6c1253adac0262b000aec7636fa0d2ebb666c
 SHA1 (patch-src_tools_rls_rls_src_cmd.rs) = fade3e60fecac5c4e4d4ee5bee82659b4eb385b7
diff -r 27fd57b0b3e9 -r 3055ca4f5fb5 lang/rust/patches/patch-src_rustllvm_PassWrapper.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/rust/patches/patch-src_rustllvm_PassWrapper.cpp      Sat May 16 19:36:12 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_rustllvm_PassWrapper.cpp,v 1.1 2020/05/16 19:36:13 tnn Exp $
+
+LLVM 10 compatibility
+
+--- src/rustllvm/PassWrapper.cpp.orig  2020-04-20 22:17:56.000000000 +0000
++++ src/rustllvm/PassWrapper.cpp
+@@ -67,7 +67,7 @@ extern "C" void LLVMInitializePasses() {
+ }
+ 
+ extern "C" void LLVMTimeTraceProfilerInitialize() {
+-#if LLVM_VERSION_GE(9, 0)
++#if LLVM_VERSION_GE(9, 0) && LLVM_VERSION_LT(10, 0)
+   timeTraceProfilerInitialize();
+ #endif
+ }
diff -r 27fd57b0b3e9 -r 3055ca4f5fb5 lang/rust/patches/patch-src_rustllvm_RustWrapper.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/rust/patches/patch-src_rustllvm_RustWrapper.cpp      Sat May 16 19:36:12 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_rustllvm_RustWrapper.cpp,v 1.1 2020/05/16 19:36:13 tnn Exp $
+
+LLVM 10 compatibility
+
+--- src/rustllvm/RustWrapper.cpp.orig  2020-04-20 22:17:56.000000000 +0000
++++ src/rustllvm/RustWrapper.cpp
+@@ -1328,8 +1328,13 @@ extern "C" LLVMValueRef LLVMRustBuildMem
+                                             LLVMValueRef Dst, unsigned DstAlign,
+                                             LLVMValueRef Val,
+                                             LLVMValueRef Size, bool IsVolatile) {
++#if LLVM_VERSION_GE(10, 0)
++  return wrap(unwrap(B)->CreateMemSet(
++      unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
++#else
+   return wrap(unwrap(B)->CreateMemSet(
+       unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
++#endif
+ }
+ 
+ extern "C" LLVMValueRef



Home | Main Index | Thread Index | Old Index