summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-07-07 09:27:18 +0200
committerMichał Górny <mgorny@gentoo.org>2018-07-07 09:38:10 +0200
commit2deb2d52d186165bf0d2d45405438e91f6a9a6de (patch)
treeebcb9fae94d352dfad04eb40c1326eabbc8e7969 /sys-devel
parentsys-apps/toybox: Bump (diff)
downloadgentoo-2deb2d52d186165bf0d2d45405438e91f6a9a6de.tar.gz
gentoo-2deb2d52d186165bf0d2d45405438e91f6a9a6de.tar.bz2
gentoo-2deb2d52d186165bf0d2d45405438e91f6a9a6de.zip
sys-devel/llvm: Patch gcc-8 compatibility in <6
Thanks to Ben Chaney for providing the patch. Closes: https://bugs.gentoo.org/655140
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm/files/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch31
-rw-r--r--sys-devel/llvm/llvm-4.0.1-r1.ebuild3
-rw-r--r--sys-devel/llvm/llvm-5.0.2.ebuild3
3 files changed, 37 insertions, 0 deletions
diff --git a/sys-devel/llvm/files/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch b/sys-devel/llvm/files/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch
new file mode 100644
index 000000000000..6eaacec77a84
--- /dev/null
+++ b/sys-devel/llvm/files/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch
@@ -0,0 +1,31 @@
+From b25d5675b67bd08e25dd093aaaf8c8f4bb1f822e Mon Sep 17 00:00:00 2001
+From: Tilmann Scheller <tschelle@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
+@@ -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.18.0
+
diff --git a/sys-devel/llvm/llvm-4.0.1-r1.ebuild b/sys-devel/llvm/llvm-4.0.1-r1.ebuild
index 044c8c45fedd..1df06e2d848c 100644
--- a/sys-devel/llvm/llvm-4.0.1-r1.ebuild
+++ b/sys-devel/llvm/llvm-4.0.1-r1.ebuild
@@ -79,6 +79,9 @@ src_prepare() {
# e.g. https://bugs.gentoo.org/617154
eapply "${FILESDIR}"/4.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch
+ # gcc-8 build failure
+ eapply "${FILESDIR}"/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch
+
# Remove failing test (fixed in newer versions)
rm test/tools/llvm-symbolizer/print_context.c || die
diff --git a/sys-devel/llvm/llvm-5.0.2.ebuild b/sys-devel/llvm/llvm-5.0.2.ebuild
index 768c86f3ad63..58c2bb820959 100644
--- a/sys-devel/llvm/llvm-5.0.2.ebuild
+++ b/sys-devel/llvm/llvm-5.0.2.ebuild
@@ -86,6 +86,9 @@ src_prepare() {
# Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD).
eapply "${FILESDIR}"/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch
+ # gcc-8 build failure
+ eapply "${FILESDIR}"/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch
+
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die