Mail archive
alpine-aports

[alpine-aports] [PATCH] main/llvm5: build fix for gcc8

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Sat, 10 Nov 2018 12:01:14 +0000

The patch is taken from Fedora.
---
 main/llvm5/APKBUILD                           |  6 ++--
 ...type-in-ORC-readMem-client-interface.patch | 30 +++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 main/llvm5/fix-return-type-in-ORC-readMem-client-interface.patch
diff --git a/main/llvm5/APKBUILD b/main/llvm5/APKBUILD
index 24bf82a342..cbde304ede 100644
--- a/main/llvm5/APKBUILD
+++ b/main/llvm5/APKBUILD
_at_@ -6,7 +6,7 @@ _pkgname=llvm
 pkgver=5.0.1
 _majorver=${pkgver%%.*}
 pkgname=$_pkgname$_majorver
-pkgrel=4
+pkgrel=5
 pkgdesc="Low Level Virtual Machine compiler system, version $_majorver"
 arch="all"
 url="http://llvm.org/"
_at_@ -22,6 +22,7 @@ source="https://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz
 	dynamiclibrary-fix-build-musl.patch
 	fix-memory-mf_exec-on-aarch64.patch
 	fix-LLVMConfig-cmake-install-prefix.patch
+	fix-return-type-in-ORC-readMem-client-interface.patch
 	"
 builddir="$srcdir/$_pkgname-$pkgver.src"
 options="!checkroot"
_at_@ -258,4 +259,5 @@ sha512sums="bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b
 3bcfeccc1f14567f99029a131b1289290226d48855857f2eb6a251e041981a8b8b2d7965099df16ebf0a406e48130679f97235ef3f3524577413bb51cf40e613  fix-CheckAtomic.cmake.patch
 5e61bbeafa64dd858cde2e85d3001f3abc0379f7ca057e9f49684eeabc8b4663f79136d688aff8a83a480b3e7cde76823d381e9dd6933187a36ff59da85532b2  dynamiclibrary-fix-build-musl.patch
 e6d925ddc71f9f2ce8a859ac519dad51cba99c07129e378a5388bb1dd2f7d5b9d5ed392e85267fd20043789c7460a7d705eb8f970b2d130edbf5a934e9505ac4  fix-memory-mf_exec-on-aarch64.patch
-7d4825d16107e56a14b7b05be847f03d75e2e05952bea0742a1233b5b0441c9934d8058e612abb6471272884372d9bfd3348355fbd3c19cba82a554003cc3eec  fix-LLVMConfig-cmake-install-prefix.patch"
+7d4825d16107e56a14b7b05be847f03d75e2e05952bea0742a1233b5b0441c9934d8058e612abb6471272884372d9bfd3348355fbd3c19cba82a554003cc3eec  fix-LLVMConfig-cmake-install-prefix.patch
+f57c734687c8ceae8d1bbfcbfdeecb75a5059a112967f4ba639d78d2484e0cc1deabf02ba2d3a6f5283443bf8b3230f38ad143800f8f3327cca0d2691a3ddc3d  fix-return-type-in-ORC-readMem-client-interface.patch"
diff --git a/main/llvm5/fix-return-type-in-ORC-readMem-client-interface.patch b/main/llvm5/fix-return-type-in-ORC-readMem-client-interface.patch
new file mode 100644
index 0000000000..5296fdb0ba
--- /dev/null
+++ b/main/llvm5/fix-return-type-in-ORC-readMem-client-interface.patch
_at_@ -0,0 +1,30 @@
+From 5cea35478aaaac7728a50cbafd3770f96162f7ac Mon Sep 17 00:00:00 2001
+From: Tilmann Scheller <tschelle_at_redhat.com>
+Date: Thu, 1 Feb 2018 11:40:01 -0600
+Subject: [PATCH] Fix return type in ORC readMem() client interface.
+
+GCC 8.0.1 detects the type mismatch and causes the compilation to fail. Clang
+and earlier versions of GCC don't detect the issue.
+
+Fixes rhbz#1540620.
+---
+ include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+index da02250ba16..bed472e2e0e 100644
+--- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
++++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+_at_@ -713,8 +713,8 @@ private:
+ 
+   uint32_t getTrampolineSize() const { return RemoteTrampolineSize; }
+ 
+-  Expected<std::vector<char>> readMem(char *Dst, JITTargetAddress Src,
+-                                      uint64_t Size) {
++  Expected<std::vector<uint8_t>> readMem(char *Dst, JITTargetAddress Src,
++                                         uint64_t Size) {
+     // Check for an 'out-of-band' error, e.g. from an MM destructor.
+     if (ExistingError)
+       return std::move(ExistingError);
+-- 
+2.16.1
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Nov 10 2018 - 12:01:14 UTC