From f9ffa7eb9a8418627c6b04d92ca3b85708fea1fb Mon Sep 17 00:00:00 2001
From: Rasmus Thomsen <oss@cogitri.dev>
Date: Sat, 28 Sep 2019 18:34:16 +0200
Subject: [PATCH] main/clang: upgrade to 9.0.0

---
 ...rotector-by-default-for-Alpine-Linux.patch |  2 +-
 main/clang/APKBUILD                           | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/main/clang/20-Enable-stack-protector-by-default-for-Alpine-Linux.patch b/main/clang/20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
index b63ecadc00cb..b8bd2e15fd1c 100644
--- a/main/clang/20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
+++ b/main/clang/20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
@@ -25,9 +25,9 @@ index 22dbbec..ba0d558 100644
 --- a/lib/Driver/ToolChains/Linux.h
 +++ b/lib/Driver/ToolChains/Linux.h
 @@ -39,6 +39,7 @@
-                            llvm::opt::ArgStringList &CC1Args) const override;
    CXXStdlibType GetDefaultCXXStdlibType() const override;
    bool isPIEDefault() const override;
+   bool isNoExecStackDefault() const override;
 +  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
    bool IsMathErrnoDefault() const override;
    SanitizerMask getSupportedSanitizers() const override;
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index 1a40b7d9dd47..bbabdb59710e 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -3,13 +3,14 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=clang
 # Note: Update together with llvm.
-pkgver=8.0.1
+pkgver=9.0.0
 pkgrel=0
 _llvmver=${pkgver%%.*}
 pkgdesc="A C language family front-end for LLVM"
 arch="all"
-url="http://llvm.org/"
-license="NCSA"
+url="https://llvm.org/"
+license="Apache-2.0"
+options="!check" # some 170 failing tests...
 makedepends="
 	cmake
 	isl-dev
@@ -17,9 +18,9 @@ makedepends="
 	libexecinfo-dev
 	libxml2-dev
 	libxml2-utils
-	llvm${_llvmver}-dev
-	llvm${_llvmver}-static
-	llvm${_llvmver}-test-utils
+	llvm$_llvmver-dev
+	llvm$_llvmver-static
+	llvm$_llvmver-test-utils
 	ninja
 	python3
 	"
@@ -27,7 +28,7 @@ checkdepends="diffutils bash"
 depends_dev="$pkgname=$pkgver-r$pkgrel"
 subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
 	$pkgname-analyzer::noarch"
-source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/cfe-$pkgver.src.tar.xz
+source="https://releases.llvm.org/$pkgver/cfe-$pkgver.src.tar.xz
 	10-add-musl-triples.patch
 	20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
 
@@ -94,6 +95,6 @@ analyzer() {
 	mv usr/share/scan-* "$subpkgdir"/usr/share/
 }
 
-sha512sums="1227b2d32052c70b4b494659849000188fce46fc31a71f3352ba8457ac0b0b17e4bc7c8589874c8586d55aa808ee6c1fceb7df501aafa33599f8df7bfd2b791d  cfe-8.0.1.src.tar.xz
+sha512sums="83fcca5499102b375e620cdac97d75e6111ebed4ef10240859ddd8a88bc5b022703739d2eae0d8693c91892ad11fc6b531c0dbee62fbce68d3be595b94f0b1fe  cfe-9.0.0.src.tar.xz
 367dcd43b42570b5688c4bb41daf2498447e9fa4384896e2b91782017a8ce15b1e6e15cb3a465595d69e681420fce170a6f9a57ea5268e21f0dec7d4605e4c4c  10-add-musl-triples.patch
-97633748b8cb125d606dbbf22381a4371abf0f49a1632cc19e84a361f16677ca3bc1a7c87943a2875cb6d39e6b72728aa21f09a49ca435558841f53b44568727  20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
+a8557c5a26774bf98548b9fe77cd54a1b0591bc75beffcb5fbd070986ba954d82255dddbcfcc884c07c3f433b1428c2a6ce649c3a158f4352f30e7057872335b  20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
-- 
GitLab