Subject: [alpine-aports] [PATCH] community/llvm3.7: fix build with gcc8

From: alpine-mips-patches <[email-masked]>
Date: Tue, 4 Dec 2018 17:42:27 +0000

---
 community/llvm3.7/APKBUILD                |  4 +++-
 community/llvm3.7/llvm-ValueMap-fix.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 community/llvm3.7/llvm-ValueMap-fix.patch

diff --git a/community/llvm3.7/APKBUILD b/community/llvm3.7/APKBUILD
index 8b9c17eca2..85be729acc 100644
--- a/community/llvm3.7/APKBUILD
+++ b/community/llvm3.7/APKBUILD
@@ -6,7 +6,7 @@ _pkgname=llvm
 pkgver=3.7.1
 _majorver=${pkgver%.*}
 pkgname=$_pkgname$_majorver
-pkgrel=6
+pkgrel=7
 pkgdesc="Low Level Virtual Machine compiler system (version $_majorver)"
 arch="all"
 url="http://llvm.org/"
@@ -15,6 +15,7 @@ depends_dev="$pkgname=$pkgver-r$pkgrel"
 makedepends="binutils-dev chrpath cmake file libffi-dev paxmark python2 zlib-dev"
 subpackages="$pkgname-static $pkgname-libs $pkgname-dev"
 source="https://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz
+	llvm-ValueMap-fix.patch
 	llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch
 	llvm-0002-Fix-build-with-musl-libc.patch
 	llvm-0003-Fix-DynamicLibrary-to-build-with-musl-libc.patch
@@ -204,6 +205,7 @@ _mv() {
 }
 
 sha512sums="ac521debc02f6deba96ef975d6a546b0c5c77299c1dbf5e1b87a7974ff5e7fd715bd7e384b92d9adf572ce47130bdbf6d3c648eb0d7f72f16f976292e4909e90  llvm-3.7.1.src.tar.xz
+006ef8c8a1d49321016cb0f251e256177100c1097a0dedec2061ffc1363ae3d159c56f22df7bea67b13991e61b1d5322feeb7c732aeccc1a35835a89c50f7560  llvm-ValueMap-fix.patch
 7a74abc15d8abb4ef4884469544168bfefb6859166f041c7d766157d77b20ea5b6bb06ffc0dd4f6965eab95294102f060d7a969e778ec933d2859c4900ec7380  llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch
 f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3cee76598a7cecb94aed0775a6d24fe73266f82749913fc3e71  llvm-0002-Fix-build-with-musl-libc.patch
 19bfb9282455d39d07dbb2b1293b03a45c57d522fbb9c5e58dac034200669628b97e7a90cd4ff5d52d9bb79acfccbef653d8a1140a7f0589ecd6f9b7c4ba0eb6  llvm-0003-Fix-DynamicLibrary-to-build-with-musl-libc.patch
diff --git a/community/llvm3.7/llvm-ValueMap-fix.patch b/community/llvm3.7/llvm-ValueMap-fix.patch
new file mode 100644
index 0000000000..a8f6631c26
--- /dev/null
+++ b/community/llvm3.7/llvm-ValueMap-fix.patch
@@ -0,0 +1,11 @@
+--- a/include/llvm/IR/ValueMap.h
++++ b/include/llvm/IR/ValueMap.h
+@@ -99,7 +99,7 @@
+   explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
+       : Map(NumInitBuckets), Data(Data) {}
+ 
+-  bool hasMD() const { return MDMap; }
++  bool hasMD() const { return bool(MDMap); }
+   MDMapT &MD() {
+     if (!MDMap)
+       MDMap.reset(new MDMapT);
-- 
2.19.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---