Subject: [alpine-aports] [PATCH 2/2] main/clang: Update to version 8.0.0

From: Marian Buschsieweke <[email-masked]>
Date: Tue, 7 May 2019 20:05:39 +0200

- Increased version number (7.0.1 --> 8.0.0)
- Slightly adapted 20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
- Adapted 10-add-musl-triples.patch
---
 main/clang/10-add-musl-triples.patch          | 46 +++++++++----------
 ...rotector-by-default-for-Alpine-Linux.patch |  6 +--
 main/clang/APKBUILD                           | 10 ++--
 3 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/main/clang/10-add-musl-triples.patch b/main/clang/10-add-musl-triples.patch
index fa837bbdef..2598d1920f 100644
--- a/main/clang/10-add-musl-triples.patch
+++ b/main/clang/10-add-musl-triples.patch
@@ -1,6 +1,16 @@
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -1813,7 +1814,9 @@
+diff -rupN cfe-8.0.0.src.bak/lib/Driver/ToolChains/Gnu.cpp cfe-8.0.0.src/lib/Driver/ToolChains/Gnu.cpp
+--- cfe-8.0.0.src.bak/lib/Driver/ToolChains/Gnu.cpp	2019-05-07 19:00:04.930230608 +0200
++++ cfe-8.0.0.src/lib/Driver/ToolChains/Gnu.cpp	2019-05-07 19:03:45.225863682 +0200
+@@ -1871,7 +1871,7 @@ void Generic_GCC::GCCInstallationDetecto
+   static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
+   static const char *const AArch64Triples[] = {
+       "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
+-      "aarch64-suse-linux", "aarch64-linux-android"};
++      "aarch64-suse-linux", "aarch64-linux-android", "aarch64-linux-musl"};
+   static const char *const AArch64beLibDirs[] = {"/lib"};
+   static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
+                                                  "aarch64_be-linux-gnu"};
+@@ -1882,7 +1882,9 @@ void Generic_GCC::GCCInstallationDetecto
    static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
                                               "armv7hl-redhat-linux-gnueabi",
                                               "armv6hl-suse-linux-gnueabi",
@@ -11,32 +21,22 @@
    static const char *const ARMebLibDirs[] = {"/lib"};
    static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
                                               "armeb-linux-androideabi"};
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp	
-@@ -1812,7 +1812,7 @@
-   static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
-   static const char *const AArch64Triples[] = {
-       "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
--      "aarch64-suse-linux"};
-+      "aarch64-suse-linux","aarch64-linux-musl"};
-   static const char *const AArch64beLibDirs[] = {"/lib"};
-   static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
-                                                  "aarch64_be-linux-gnu"};
-@@ -1837,14 +1837,15 @@
+@@ -1896,7 +1898,8 @@ void Generic_GCC::GCCInstallationDetecto
        "x86_64-redhat-linux",    "x86_64-suse-linux",
        "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
        "x86_64-slackware-linux", "x86_64-unknown-linux",
--      "x86_64-amazon-linux"};
-+      "x86_64-amazon-linux",	"x86_64-linux-musl"};
+-      "x86_64-amazon-linux",    "x86_64-linux-android"};
++      "x86_64-amazon-linux",    "x86_64-linux-android",
++      "x86_64-linux-musl"};
    static const char *const X32LibDirs[] = {"/libx32"};
    static const char *const X86LibDirs[] = {"/lib32", "/lib"};
    static const char *const X86Triples[] = {
-       "i686-linux-gnu",       "i686-pc-linux-gnu",     "i486-linux-gnu",
-       "i386-linux-gnu",       "i386-redhat-linux6E",   "i686-redhat-linux",
+@@ -1905,7 +1908,7 @@ void Generic_GCC::GCCInstallationDetecto
        "i586-redhat-linux",    "i386-redhat-linux",     "i586-suse-linux",
--      "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu"};
-+      "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
-+	  "i686-linux-musl"};
+       "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
+       "i686-linux-android",   "i386-gnu",              "i486-gnu",
+-      "i586-gnu",             "i686-gnu"};
++      "i586-gnu",             "i686-gnu",              "i686-linux-musl"};
  
    static const char *const MIPSLibDirs[] = {"/lib"};
-   static const char *const MIPSTriples[] = {"mips-linux-gnu", "mips-mti-linux",
+   static const char *const MIPSTriples[] = {
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 d545a5aff8..b30379be83 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
@@ -27,11 +27,11 @@ index 22dbbec..ba0d558 100644
 @@ -38,6 +38,7 @@ public:
    void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs,
                             llvm::opt::ArgStringList &CC1Args) const override;
-   bool isPIEDefault() const override;
+   CXXStdlibType GetDefaultCXXStdlibType() const override;
 +  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
+   bool isPIEDefault() const override;
+   bool IsMathErrnoDefault() const override;
    SanitizerMask getSupportedSanitizers() const override;
-   void addProfileRTLibs(const llvm::opt::ArgList &Args,
-                         llvm::opt::ArgStringList &CmdArgs) const override;
 diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c
 index 304e759..29ead22 100644
 --- a/test/Driver/fsanitize.c
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index da0ebd32bb..0e203e80e5 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -3,8 +3,8 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=clang
 # Note: Update together with llvm.
-pkgver=7.0.1
-pkgrel=1
+pkgver=8.0.0
+pkgrel=0
 _llvmver=${pkgver%%.*}
 pkgdesc="A C language family front-end for LLVM"
 arch="all"
@@ -90,6 +90,6 @@ analyzer() {
 	mv usr/share/scan-* "$subpkgdir"/usr/share/
 }
 
-sha512sums="df2f38153ebdc261bcfa6a569567f759bbb1a803192882a9d4eca55a47878166ac9057151a94ad341dc1281136547e4faa783a68070dfde2307b48cacd4b9194  cfe-7.0.1.src.tar.xz
-b52cb7d74636d39d12dd6c94a2b2a9c01e4d6a535d151aa8ca49b691eb20e1b4ea08481f1517ef81f4501ebc305a32d7951638cc0385fee134131e827bb0b2f3  10-add-musl-triples.patch
-b98f39354adf7cf09de5bcac498cccb5c5dd4b8ba7ea0e6c18f2f2204650288088a12b7a535451e21a451b890b70430d679a09df7161de03dbf30d6b49ee1ec0  20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
+sha512sums="98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3  cfe-8.0.0.src.tar.xz
+347dd76a1c05891264c60ed4ba535ff5fb7612f322cb169bfc1e666e1dc2c61ad8c33b1f1e66a3358bf1d8dfa592accc2d2e1ce7f47565ae85923cf8f0d68b41  10-add-musl-triples.patch
+eb4c2d63e8578dfbc993f5caba67595e332a3262f487787769079716939ba899630e456692410e5162e1467711d61f81b9c3ba7df6bef98f8e150d825f86a4b1  20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
-- 
2.21.0

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

---

From: Milan P. Stanić <[email-masked]>
Date: Sat, 15 Jun 2019 17:32:02 +0200

Hi,

Another patch for clang upgrade to version 8 is applied with git commit
54db62760803072c5308e62d769048d2f50b68be to aports.

If you think your version is more appropriate please inform us on
alpine-devel mailing list or on #alpine-devel IRC channel on freenode.

Thank you for helping Alpine

-- 
regards

> - Adapted 10-add-musl-triples.patch
...

---