Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] LLVM 13
@ 2022-01-01 17:49 DBLouis
  2022-01-01 19:36 ` TeddyDD
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: DBLouis @ 2022-01-01 17:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

There is a new pull request by DBLouis against master on the void-packages repository

https://github.com/DBLouis/void-packages master
https://github.com/void-linux/void-packages/pull/34800

LLVM 13
This adds LLVM 13 and updates from LLVM 12.

*Work-in-progress*

The following packages need to be updated or patched:

- `beignet`
- `ispc`
- `qtcreator`

Rebuilt packages:

- `juCi++`
- `kdevelop`
- `codelite`
- `mesa`
- `include-what-you-use`
- `ccls`
- `clazy`
- `bpftrace`
- `qt5`
- `rtags`
- `shiboken2`
- `gnome-builder`
- `bcc`

A patch file from https://github.com/void-linux/void-packages/pull/34800.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-34800.patch --]
[-- Type: text/x-diff, Size: 105475 bytes --]

From 0443f5a9683c4fb0389f8b2ecc75394c76a56861 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:21:30 +0200
Subject: [PATCH 01/18] New package: llvm13-13.0.0

---
 common/shlibs                                 |  16 +-
 srcpkgs/clang                                 |   2 +-
 srcpkgs/clang-analyzer                        |   2 +-
 srcpkgs/clang-tools-extra                     |   2 +-
 srcpkgs/libclang                              |   2 +-
 srcpkgs/libclang-cpp                          |   2 +-
 srcpkgs/libcxx                                |   2 +-
 srcpkgs/libcxx-devel                          |   2 +-
 srcpkgs/libcxxabi                             |   2 +-
 srcpkgs/libcxxabi-devel                       |   2 +-
 srcpkgs/libllvm13                             |   1 +
 srcpkgs/libomp                                |   2 +-
 srcpkgs/libomp-devel                          |   2 +-
 srcpkgs/lld                                   |   2 +-
 srcpkgs/lld-devel                             |   2 +-
 srcpkgs/lldb                                  |   2 +-
 srcpkgs/lldb-devel                            |   2 +-
 srcpkgs/llvm-libunwind                        |   2 +-
 srcpkgs/llvm-libunwind-devel                  |   2 +-
 .../llvm13/files/llvm-Config-llvm-config.h    |   9 +
 ...clang-001-fix-unwind-chain-inclusion.patch |  44 ++
 .../patches/clang-002-add-musl-triples.patch  | 110 +++++
 .../clang-003-ppc64-dynamic-linker-path.patch |  13 +
 .../patches/clang-004-ppc64-musl-elfv2.patch  |  48 ++
 .../compiler-rt-aarch64-ucontext.patch        |  11 +
 .../compiler-rt-sanitizer-ppc64-musl.patch    |  35 ++
 .../patches/compiler-rt-xray-ppc64-musl.patch |  62 +++
 srcpkgs/llvm13/patches/libcxx-musl.patch      |  26 ++
 srcpkgs/llvm13/patches/libcxx-ppc.patch       |  22 +
 .../llvm13/patches/libcxx-ssp-nonshared.patch |  11 +
 srcpkgs/llvm13/patches/libcxxabi-dl.patch     |  25 ++
 srcpkgs/llvm13/patches/libunwind-ppc32.patch  |  63 +++
 srcpkgs/llvm13/patches/lldb-musl.patch        |  31 ++
 srcpkgs/llvm13/patches/llvm-001-musl.patch    |  57 +++
 .../patches/llvm-002-musl-ppc64-elfv2.patch   |  30 ++
 .../patches/llvm-003-ppc-secureplt.patch      |  11 +
 .../patches/llvm-004-override-opt.patch       |  18 +
 .../llvm13/patches/llvm-005-ppc-bigpic.patch  |  36 ++
 .../patches/llvm-006-aarch64-mf_exec.patch    |  25 ++
 .../llvm13/patches/ppc32-compiler-rt.patch    |  21 +
 srcpkgs/llvm13/template                       | 423 ++++++++++++++++++
 srcpkgs/llvm13/update                         |   3 +
 42 files changed, 1165 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libllvm13
 create mode 100644 srcpkgs/llvm13/files/llvm-Config-llvm-config.h
 create mode 100644 srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-ppc.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxxabi-dl.patch
 create mode 100644 srcpkgs/llvm13/patches/libunwind-ppc32.patch
 create mode 100644 srcpkgs/llvm13/patches/lldb-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-001-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-004-override-opt.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
 create mode 100644 srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
 create mode 100644 srcpkgs/llvm13/template
 create mode 100644 srcpkgs/llvm13/update

diff --git a/common/shlibs b/common/shlibs
index 999d3ad714b8..56e7ab0a88aa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -970,11 +970,12 @@ libuchardet.so.0 uchardet-0.0.6_1
 libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
 libyajl.so.2 yajl-2.0.1_1
 libconfuse.so.2 confuse-3.2.1_1
-liblldb.so.12 lldb-12.0.0_1
-libclang.so.12 libclang-12.0.0_1
-libclang-cpp.so.12 libclang-cpp-12.0.0_1
+liblldb.so.13 lldb-13.0.0_1
+libclang.so.13 libclang-13.0.0_1
+libclang-cpp.so.13 libclang-cpp-13.0.0_1
 libLLVM-11.so libllvm11-11.0.0_1
 libLLVM-12.so libllvm12-12.0.0_1
+libLLVM-13.so libllvm13-13.0.0_1
 libisofs.so.6 libisofs-0.6.24_1
 libmpack.so.0 libmpack-1.0.5_1
 libGeoIP.so.1 libgeoip-1.4.8_1
@@ -4097,3 +4098,12 @@ libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
+libomp.so libomp-13.0.0_1
+libomptarget.rtl.amdgpu.so libomp-13.0.0_1
+libomptarget.rtl.cuda.so libomp-13.0.0_1
+libomptarget.rtl.x86_64.so libomp-13.0.0_1
+libarcher.so libomp-13.0.0_1
+libomptarget.so libomp-13.0.0_1
+liblldbIntelFeatures.so.13 lldb-13.0.0_1
+libLTO.so.13 llvm13-13.0.0_1
+libRemarks.so.13 llvm13-13.0.0_1
diff --git a/srcpkgs/clang b/srcpkgs/clang
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang
+++ b/srcpkgs/clang
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/clang-analyzer b/srcpkgs/clang-analyzer
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang-analyzer
+++ b/srcpkgs/clang-analyzer
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/clang-tools-extra b/srcpkgs/clang-tools-extra
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang-tools-extra
+++ b/srcpkgs/clang-tools-extra
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libclang b/srcpkgs/libclang
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libclang
+++ b/srcpkgs/libclang
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libclang-cpp b/srcpkgs/libclang-cpp
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libclang-cpp
+++ b/srcpkgs/libclang-cpp
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxx b/srcpkgs/libcxx
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxx
+++ b/srcpkgs/libcxx
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxx-devel b/srcpkgs/libcxx-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxx-devel
+++ b/srcpkgs/libcxx-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxxabi b/srcpkgs/libcxxabi
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxxabi
+++ b/srcpkgs/libcxxabi
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxxabi-devel b/srcpkgs/libcxxabi-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxxabi-devel
+++ b/srcpkgs/libcxxabi-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libllvm13 b/srcpkgs/libllvm13
new file mode 120000
index 000000000000..d6366d7d3b95
--- /dev/null
+++ b/srcpkgs/libllvm13
@@ -0,0 +1 @@
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libomp b/srcpkgs/libomp
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libomp
+++ b/srcpkgs/libomp
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libomp-devel b/srcpkgs/libomp-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libomp-devel
+++ b/srcpkgs/libomp-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lld b/srcpkgs/lld
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lld
+++ b/srcpkgs/lld
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lld-devel b/srcpkgs/lld-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lld-devel
+++ b/srcpkgs/lld-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lldb b/srcpkgs/lldb
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lldb
+++ b/srcpkgs/lldb
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lldb-devel b/srcpkgs/lldb-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lldb-devel
+++ b/srcpkgs/lldb-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm-libunwind b/srcpkgs/llvm-libunwind
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/llvm-libunwind
+++ b/srcpkgs/llvm-libunwind
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm-libunwind-devel b/srcpkgs/llvm-libunwind-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/llvm-libunwind-devel
+++ b/srcpkgs/llvm-libunwind-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm13/files/llvm-Config-llvm-config.h b/srcpkgs/llvm13/files/llvm-Config-llvm-config.h
new file mode 100644
index 000000000000..2fa08c9be696
--- /dev/null
+++ b/srcpkgs/llvm13/files/llvm-Config-llvm-config.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
new file mode 100644
index 000000000000..e4eaa7783e7a
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
@@ -0,0 +1,44 @@
+From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
+From: Andrea Brancaleoni <miwaxe@gmail.com>
+Date: Tue, 8 Sep 2015 22:14:57 +0200
+Subject: [PATCH 2/7] fix unwind chain inclusion
+
+---
+ lib/Headers/unwind.h | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
+index 303d792..44e10cc 100644
+--- a/clang/lib/Headers/unwind.h
++++ b/clang/lib/Headers/unwind.h
+@@ -9,9 +9,6 @@
+ 
+ /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
+ 
+-#ifndef __CLANG_UNWIND_H
+-#define __CLANG_UNWIND_H
+-
+ #if defined(__APPLE__) && __has_include_next(<unwind.h>)
+ /* Darwin (from 11.x on) provide an unwind.h. If that's available,
+  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
+@@ -39,6 +36,9 @@
+ # endif
+ #else
+ 
++#ifndef __CLANG_UNWIND_H
++#define __CLANG_UNWIND_H
++
+ #include <stdint.h>
+ 
+ #ifdef __cplusplus
+@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
+ }
+ #endif
+ 
++#endif /* __CLANG_UNWIND_H */
++
+ #endif
+ 
+-#endif /* __CLANG_UNWIND_H */
+-- 
+2.5.1
diff --git a/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch b/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
new file mode 100644
index 000000000000..25688d40dbc2
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
@@ -0,0 +1,110 @@
+--- a/clang/lib/Driver/ToolChains/Gnu.cpp
++++ b/clang/lib/Driver/ToolChains/Gnu.cpp
+@@ -2086,7 +2086,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+   static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
+                                              "armv7hl-redhat-linux-gnueabi",
+                                              "armv6hl-suse-linux-gnueabi",
+-                                             "armv7hl-suse-linux-gnueabi"};
++                                             "armv7hl-suse-linux-gnueabi",
++                                             "armv7l-linux-gnueabihf"};
+   static const char *const ARMebLibDirs[] = {"/lib"};
+   static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
+                                              "armeb-linux-androideabi"};
+@@ -2153,8 +2154,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+       "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
+   static const char *const PPCLELibDirs[] = {"/lib32", "/lib"};
+   static const char *const PPCLETriples[] = {"powerpcle-linux-gnu",
+-                                             "powerpcle-unknown-linux-gnu",
+-                                             "powerpcle-linux-musl"};
++                                             "powerpcle-unknown-linux-gnu"};
+ 
+   static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
+   static const char *const PPC64Triples[] = {
+@@ -2235,6 +2235,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+     return;
+   }
+ 
++  if (TargetTriple.isMusl()) {
++    static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"};
++    static const char *const ARMHFMuslTriples[] = {
++        "arm-linux-musleabihf", "armv7l-linux-musleabihf"
++    };
++    static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"};
++    static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"};
++    static const char *const X86MuslTriples[] = {"i686-linux-musl"};
++    static const char *const MIPSMuslTriples[] = {
++        "mips-linux-musl", "mipsel-linux-musl",
++        "mipsel-linux-muslhf", "mips-linux-muslhf"
++    };
++    static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"};
++    static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"};
++    static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"};
++    static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"};
++
++    switch (TargetTriple.getArch()) {
++    case llvm::Triple::aarch64:
++      LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
++      TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
++      BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
++      BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
++      break;
++    case llvm::Triple::arm:
++      LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
++      if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
++        TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
++      } else {
++        TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples));
++      }
++      break;
++    case llvm::Triple::x86_64:
++      LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
++      TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
++      BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs));
++      BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
++      break;
++    case llvm::Triple::x86:
++      LibDirs.append(begin(X86LibDirs), end(X86LibDirs));
++      TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
++      BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
++      BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
++      break;
++    case llvm::Triple::mips:
++      LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs));
++      TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples));
++      break;
++    case llvm::Triple::ppc:
++      LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
++      TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
++      BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
++      BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
++      break;
++    case llvm::Triple::ppcle:
++      LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
++      TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
++      BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
++      BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
++      break;
++    case llvm::Triple::ppc64:
++      LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
++      TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
++      BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
++      BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
++      break;
++    case llvm::Triple::ppc64le:
++      LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
++      TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
++      BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
++      BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
++      break;
++    default:
++      break;
++    }
++    TripleAliases.push_back(TargetTriple.str());
++    if (TargetTriple.str() != BiarchTriple.str())
++      BiarchTripleAliases.push_back(BiarchTriple.str());
++    return;
++  }
++
+   // Android targets should not use GNU/Linux tools or libraries.
+   if (TargetTriple.isAndroid()) {
+     static const char *const AArch64AndroidTriples[] = {
diff --git a/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
new file mode 100644
index 000000000000..4ad6412d1e6c
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
@@ -0,0 +1,13 @@
+--- a/clang/lib/Driver/ToolChains/Linux.cpp
++++ b/clang/lib/Driver/ToolChains/Linux.cpp
+@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+     Loader = "ld.so.1";
+     break;
+   case llvm::Triple::ppc64:
+-    LibDir = "lib64";
+-    Loader =
+-        (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
+-    break;
+   case llvm::Triple::ppc64le:
+     LibDir = "lib64";
+     Loader =
diff --git a/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
new file mode 100644
index 000000000000..21fc8003c5f1
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
@@ -0,0 +1,48 @@
+--- a/clang/lib/Basic/Targets/PPC.h
++++ b/clang/lib/Basic/Targets/PPC.h
+@@ -415,11 +415,10 @@ public:
+       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
+     } else if ((Triple.getArch() == llvm::Triple::ppc64le)) {
+       DataLayout = "e-m:e-i64:64-n32:64";
+-      ABI = "elfv2";
+     } else {
+       DataLayout = "E-m:e-i64:64-n32:64";
+-      ABI = "elfv1";
+     }
++    ABI = "elfv2";
+ 
+     if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
+       LongDoubleWidth = LongDoubleAlign = 64;
+--- a/clang/lib/CodeGen/TargetInfo.cpp
++++ b/clang/lib/CodeGen/TargetInfo.cpp
+@@ -10927,9 +10927,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
+       return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true));
+ 
+     if (Triple.isOSBinFormatELF()) {
+-      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;
+-      if (getTarget().getABI() == "elfv2")
+-        Kind = PPC64_SVR4_ABIInfo::ELFv2;
++      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2;
++      if (getTarget().getABI() == "elfv1")
++        Kind = PPC64_SVR4_ABIInfo::ELFv1;
+       bool IsSoftFloat = CodeGenOpts.FloatABI == "soft";
+ 
+       return SetCGInfo(
+--- a/clang/lib/Driver/ToolChains/Clang.cpp
++++ b/clang/lib/Driver/ToolChains/Clang.cpp
+@@ -1920,14 +1920,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
+   const llvm::Triple &T = getToolChain().getTriple();
+   if (T.isOSBinFormatELF()) {
+     switch (getToolChain().getArch()) {
+-    case llvm::Triple::ppc64: {
+-      if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
+-          T.isOSOpenBSD() || T.isMusl())
+-        ABIName = "elfv2";
+-      else
+-        ABIName = "elfv1";
+-      break;
+-    }
++    case llvm::Triple::ppc64:
+     case llvm::Triple::ppc64le:
+       ABIName = "elfv2";
+       break;
diff --git a/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch b/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
new file mode 100644
index 000000000000..893c059d7b8d
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
@@ -0,0 +1,11 @@
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp.orig
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+@@ -1799,7 +1799,7 @@
+ 
+ static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) {
+   static const u32 kEsrMagic = 0x45535201;
+-  u8 *aux = ucontext->uc_mcontext.__reserved;
++  u8 *aux = reinterpret_cast<u8 *>(ucontext->uc_mcontext.__reserved);
+   while (true) {
+     _aarch64_ctx *ctx = (_aarch64_ctx *)aux;
+     if (ctx->size == 0) break;
diff --git a/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch b/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
new file mode 100644
index 000000000000..35f16d24f340
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
@@ -0,0 +1,35 @@
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+@@ -74,6 +74,10 @@
+ #include <sys/utsname.h>
+ #endif
+ 
++#if SANITIZER_LINUX && defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <sys/personality.h>
+ #endif
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+@@ -92,7 +92,7 @@
+ # include <utime.h>
+ # include <sys/ptrace.h>
+ #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
+-    SANITIZER_RISCV64
++    defined(__powerpc__) || SANITIZER_RISCV64
+ #  include <asm/ptrace.h>
+ #  ifdef __arm__
+ typedef struct user_fpregs elf_fpregset_t;
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+@@ -31,7 +31,7 @@
+ #include <sys/types.h> // for pid_t
+ #include <sys/uio.h> // for iovec
+ #include <elf.h> // for NT_PRSTATUS
+-#if (defined(__aarch64__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
++#if (defined(__aarch64__) || defined(__powerpc__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
+ // GLIBC 2.20+ sys/user does not include asm/ptrace.h
+ # include <asm/ptrace.h>
+ #endif
diff --git a/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
new file mode 100644
index 000000000000..d0b61c80c897
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
@@ -0,0 +1,62 @@
+--- a/compiler-rt/lib/xray/xray_powerpc64.inc
++++ b/compiler-rt/lib/xray/xray_powerpc64.inc
+@@ -12,7 +12,13 @@
+ 
+ #include <cstdint>
+ #include <mutex>
++#ifdef __GLIBC__
+ #include <sys/platform/ppc.h>
++#else
++#include <cctype>
++#include <cstring>
++#include <cstdlib>
++#endif
+ 
+ #include "xray_defs.h"
+ 
+@@ -20,13 +26,45 @@ namespace __xray {
+ 
+ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
+   CPU = 0;
++#ifdef __GLIBC__
+   return __ppc_get_timebase();
++#else
++  return __builtin_ppc_get_timebase();
++#endif
+ }
+ 
+ inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
+   static std::mutex M;
+   std::lock_guard<std::mutex> Guard(M);
++#ifdef __GLIBC__
+   return __ppc_get_timebase_freq();
++#else
++  /* FIXME: a less dirty implementation? */
++  static uint64_t base;
++  if (!base) {
++    FILE *f = fopen("/proc/cpuinfo", "rb");
++    if (f) {
++      ssize_t nr;
++      /* virtually always big enough to hold the line */
++      char buf[512];
++      while (fgets(buf, sizeof(buf), f)) {
++        char *ret = strstr(buf, "timebase");
++        if (!ret) {
++          continue;
++        }
++        ret += sizeof("timebase") - 1;
++        ret = strchr(ret, ':');
++        if (!ret) {
++          continue;
++        }
++        base = strtoul(ret + 1, nullptr, 10);
++        break;
++      }
++      fclose(f);
++    }
++  }
++  return base;
++#endif
+ }
+ 
+ inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {
diff --git a/srcpkgs/llvm13/patches/libcxx-musl.patch b/srcpkgs/llvm13/patches/libcxx-musl.patch
new file mode 100644
index 000000000000..bbd31ffc2cb1
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-musl.patch
@@ -0,0 +1,26 @@
+--- a/libcxx/include/locale
++++ b/libcxx/include/locale
+@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++        long long __ll = strtoll(__a, &__p2, __base);
++#else
+         long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
+@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++        unsigned long long __ll = strtoull(__a, &__p2, __base);
++#else
+         unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
diff --git a/srcpkgs/llvm13/patches/libcxx-ppc.patch b/srcpkgs/llvm13/patches/libcxx-ppc.patch
new file mode 100644
index 000000000000..7a92f8004e1c
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-ppc.patch
@@ -0,0 +1,22 @@
+This ensures `is_iec559` is defined correctly under all long double ABIs,
+including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__`
+is not defined on gcc.
+
+--- a/libcxx/include/limits
++++ b/libcxx/include/limits
+@@ -426,8 +426,14 @@ protected:
+     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
+     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
+ 
+-#if (defined(__ppc__) || defined(__ppc64__))
++#if defined(__powerpc__) || defined(__powerpc64__)
++#if (__LDBL_MAX_EXP__ > __DBL_MAX_EXP__) || (__LDBL_MANT_DIG__ == __DBL_MANT_DIG__)
++    /* IEEE 754 quadruple or double precision */
++    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
++#else
++    /* 128-bit IBM double-double */
+     static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
++#endif
+ #else
+     static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
+ #endif
diff --git a/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch b/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
new file mode 100644
index 000000000000..70292beb2fcd
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
@@ -0,0 +1,11 @@
+--- a/libcxx/CMakeLists.txt
++++ b/libcxx/CMakeLists.txt
+@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
+     target_link_libraries(${target} PRIVATE atomic)
+   endif()
+ 
++#ssp  target_link_libraries(${target} PRIVATE ssp_nonshared)
++
+   if (MINGW)
+     target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
+   endif()
diff --git a/srcpkgs/llvm13/patches/libcxxabi-dl.patch b/srcpkgs/llvm13/patches/libcxxabi-dl.patch
new file mode 100644
index 000000000000..3a15f9db8c98
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxxabi-dl.patch
@@ -0,0 +1,25 @@
+Also link to -ldl to prevent undefined references.
+
+--- a/libcxxabi/src/CMakeLists.txt
++++ b/libcxxabi/src/CMakeLists.txt
+@@ -73,6 +73,7 @@
+   endif()
+ 
+   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
++  add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
+ endif()
+ 
+ if (LIBCXXABI_USE_LLVM_UNWINDER)
+--- a/libcxx/CMakeLists.txt
++++ b/libcxx/CMakeLists.txt
+@@ -745,6 +745,10 @@
+     target_link_libraries(${target} PRIVATE m)
+   endif()
+ 
++  if (LIBCXX_HAS_C_LIB)
++    target_link_libraries(${target} PRIVATE dl)
++  endif()
++
+   if (LIBCXX_HAS_RT_LIB)
+     target_link_libraries(${target} PRIVATE rt)
+   endif()
diff --git a/srcpkgs/llvm13/patches/libunwind-ppc32.patch b/srcpkgs/llvm13/patches/libunwind-ppc32.patch
new file mode 100644
index 000000000000..74aa7576ecf9
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libunwind-ppc32.patch
@@ -0,0 +1,63 @@
+This fixes build at least with gcc9 which does not define `__ppc__`.
+
+--- a/libunwind/include/__libunwind_config.h
++++ b/libunwind/include/__libunwind_config.h
+@@ -49,7 +49,7 @@
+ #  define _LIBUNWIND_CONTEXT_SIZE 167
+ #  define _LIBUNWIND_CURSOR_SIZE 179
+ #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
+-# elif defined(__ppc__)
++# elif defined(__powerpc__)
+ #  define _LIBUNWIND_TARGET_PPC 1
+ #  define _LIBUNWIND_CONTEXT_SIZE 117
+ #  define _LIBUNWIND_CURSOR_SIZE 124
+--- a/libunwind/src/UnwindRegistersRestore.S
++++ b/libunwind/src/UnwindRegistersRestore.S
+@@ -392,7 +392,7 @@ Lnovec:
+   PPC64_LR(3)
+   bctr
+ 
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ 
+ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
+ //
+--- a/libunwind/src/UnwindRegistersSave.S
++++ b/libunwind/src/UnwindRegistersSave.S
+@@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
+   blr
+ 
+ 
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ 
+ //
+ // extern int unw_getcontext(unw_context_t* thread_state)
+--- a/libunwind/src/config.h
++++ b/libunwind/src/config.h
+@@ -95,12 +95,12 @@
+ #define _LIBUNWIND_BUILD_SJLJ_APIS
+ #endif
+ 
+-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__)
++#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__powerpc64__)
+ #define _LIBUNWIND_SUPPORT_FRAME_APIS
+ #endif
+ 
+ #if defined(__i386__) || defined(__x86_64__) ||                                \
+-    defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) ||        \
++    defined(__powerpc__) || defined(__powerpc64__) ||                          \
+     (!defined(__APPLE__) && defined(__arm__)) ||                               \
+     (defined(__arm64__) || defined(__aarch64__)) ||                            \
+     defined(__mips__)
+--- a/libunwind/src/libunwind.cpp
++++ b/libunwind/src/libunwind.cpp
+@@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor,
+ # define REGISTER_KIND Registers_x86_64
+ #elif defined(__powerpc64__)
+ # define REGISTER_KIND Registers_ppc64
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ # define REGISTER_KIND Registers_ppc
+ #elif defined(__aarch64__)
+ # define REGISTER_KIND Registers_arm64
diff --git a/srcpkgs/llvm13/patches/lldb-musl.patch b/srcpkgs/llvm13/patches/lldb-musl.patch
new file mode 100644
index 000000000000..601c0d138523
--- /dev/null
+++ b/srcpkgs/llvm13/patches/lldb-musl.patch
@@ -0,0 +1,31 @@
+--- a/lldb/source/Plugins/Process/Linux/Procfs.h
++++ b/lldb/source/Plugins/Process/Linux/Procfs.h
+@@ -10,21 +10,12 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
+ 
+-#ifdef __ANDROID__
+-#if defined(__arm64__) || defined(__aarch64__)
+-typedef unsigned long elf_greg_t;
+-typedef elf_greg_t
+-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
+-typedef struct user_fpsimd_state elf_fpregset_t;
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#elif defined(__mips__)
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#endif
+-#else // __ANDROID__
++#if !defined(__GLIBC__) && defined(__powerpc__)
++#define pt_regs musl_pt_regs
++#include <sys/procfs.h>
++#undef pt_regs
++#else
+ #include <sys/procfs.h>
+-#endif // __ANDROID__
++#endif
diff --git a/srcpkgs/llvm13/patches/llvm-001-musl.patch b/srcpkgs/llvm13/patches/llvm-001-musl.patch
new file mode 100644
index 000000000000..f2a3f8d62813
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-001-musl.patch
@@ -0,0 +1,57 @@
+From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
+From: Andrea Brancaleoni <miwaxe@gmail.com>
+Date: Tue, 8 Sep 2015 22:03:02 +0200
+Subject: [PATCH 3/3] musl
+
+---
+ include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
+ lib/Support/DynamicLibrary.cpp            | 2 +-
+ lib/Support/Unix/Signals.inc              | 6 +++---
+ utils/unittest/googletest/src/gtest.cc    | 1 +
+ 5 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
+index 34a8a1e3..1214ece5 100644
+--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+@@ -18,6 +18,15 @@
+ #include "llvm/IR/PassManager.h"
+ #include "llvm/Pass.h"
+ 
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++
+ namespace llvm {
+ template <typename T> class ArrayRef;
+ class Triple;
+diff --git a/lib/Support/Unix/DynamicLibrary.inc b/lib/Support/Unix/DynamicLibrary.inc
+index a2a37996..2f86c470 100644
+--- a/llvm/lib/Support/Unix/DynamicLibrary.inc
++++ b/llvm/lib/Support/Unix/DynamicLibrary.inc
+@@ -102,7 +102,7 @@ static void *DoSearch(const char* SymbolName) {
+ 
+ // This macro returns the address of a well-known, explicit symbol
+ #define EXPLICIT_SYMBOL(SYM) \
+-   if (!strcmp(SymbolName, #SYM)) return &SYM
++   if (!strcmp(SymbolName, #SYM)) return (void *)&SYM
+ 
+ // Under glibc we have a weird situation. The stderr/out/in symbols are both
+ // macros and global variables because of standards requirements. So, we
+diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
+index d882ab2e..f1fb12d0 100644
+--- a/llvm/utils/unittest/googletest/src/gtest.cc
++++ b/llvm/utils/unittest/googletest/src/gtest.cc
+@@ -128,6 +128,7 @@
+ 
+ #if GTEST_CAN_STREAM_RESULTS_
+ # include <arpa/inet.h>  // NOLINT
++# include <sys/socket.h>  // NOLINT
+ # include <netdb.h>  // NOLINT
+ # include <sys/socket.h>  // NOLINT
+ # include <sys/types.h>  // NOLINT
diff --git a/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch b/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
new file mode 100644
index 000000000000..0071d964bd37
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
@@ -0,0 +1,30 @@
+This patches LLVM to use ELFv2 on ppc64 unconditionally unless overridden. We
+need this because unlike most distros we use ELFv2 for both glibc and musl
+on big endian ppc64.
+
+diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
+index 0634833e..b7cbc2e7 100644
+--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -222,9 +222,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
+ 
+   switch (TT.getArch()) {
+   case Triple::ppc64le:
+-    return PPCTargetMachine::PPC_ABI_ELFv2;
+   case Triple::ppc64:
+-    return PPCTargetMachine::PPC_ABI_ELFv1;
++    return PPCTargetMachine::PPC_ABI_ELFv2;
+   default:
+     return PPCTargetMachine::PPC_ABI_UNKNOWN;
+   }
+diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+index 8b1cf6b5..296a2afa 100644
+--- a/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
++++ b/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+@@ -1,4 +1,5 @@
+-; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
diff --git a/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch b/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
new file mode 100644
index 000000000000..b5d15974375d
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
@@ -0,0 +1,11 @@
+--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
++++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+@@ -165,7 +165,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
+ 
+   if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) ||
+       TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
+-      TargetTriple.isMusl())
++      isTargetLinux())
+     SecurePlt = true;
+ 
+   if (HasSPE && IsPPC64)
diff --git a/srcpkgs/llvm13/patches/llvm-004-override-opt.patch b/srcpkgs/llvm13/patches/llvm-004-override-opt.patch
new file mode 100644
index 000000000000..51d0e4b31b32
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-004-override-opt.patch
@@ -0,0 +1,18 @@
+This allows us to override the optimization level as not all platforms can
+deal with -O3.
+
+--- a/llvm/CMakeLists.txt
++++ b/llvm/CMakeLists.txt
+@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
+   llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
+ endif()
+ 
++set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
++
++if (NOT VOID_CXX_OPT_FLAGS STREQUAL "")
++    llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
++endif()
++
+ # Put this before tblgen. Else we have a circular dependence.
+ add_subdirectory(lib/Demangle)
+ add_subdirectory(lib/Support)
diff --git a/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch b/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
new file mode 100644
index 000000000000..d332687b9d92
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
@@ -0,0 +1,36 @@
+From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 10:57:27 -0600
+Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
+
+---
+ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp  | 2 +-
+ llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
+index cce21f32..87ca5f9b 100644
+--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
++++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+@@ -520,7 +520,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
+ 
+   // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
+   if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
+-      M->getPICLevel() == PICLevel::BigPIC)
++      M->getPICLevel() != PICLevel::SmallPIC)
+     TlsRef = MCBinaryExpr::createAdd(
+         TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
+   const MachineOperand &MO = MI->getOperand(2);
+diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp
+index 5cc180d7..a5b02565 100644
+--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
++++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+@@ -117,7 +117,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
+   const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
+   // If -msecure-plt -fPIC, add 32768 to symbol.
+   if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
+-      M->getPICLevel() == PICLevel::BigPIC &&
++      M->getPICLevel() != PICLevel::SmallPIC &&
+       MO.getTargetFlags() == PPCII::MO_PLT)
+     Expr =
+         MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
diff --git a/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch b/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
new file mode 100644
index 000000000000..a00abd216665
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
@@ -0,0 +1,25 @@
+Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
+
+    Failing Tests (8):
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
+
+Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
+
+--- a/llvm/lib/Support/Unix/Memory.inc
++++ b/llvm/lib/Support/Unix/Memory.inc
+@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) {
+     return PROT_READ | PROT_WRITE | PROT_EXEC;
+   case llvm::sys::Memory::MF_EXEC:
+ #if (defined(__FreeBSD__) || defined(__POWERPC__) || defined (__ppc__) || \
+-     defined(_POWER) || defined(_ARCH_PPC))
++     defined(_POWER) || defined(_ARCH_PPC) || (defined(__linux__) && defined(__aarch64__)))
+     // On PowerPC, having an executable page that has no read permission
+     // can have unintended consequences.  The function InvalidateInstruction-
+     // Cache uses instructions dcbf and icbi, both of which are treated by
diff --git a/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch b/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
new file mode 100644
index 000000000000..8e0a9a779d1b
--- /dev/null
+++ b/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
@@ -0,0 +1,21 @@
+commit ba4ede595ff9599232f5dd2b4384c243137b53fc
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Tue Jun 22 23:40:54 2021 +0200
+
+    enable compiler-rt support for ppc32
+
+diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
+index 1edab43..5c0c8a2 100644
+--- a/compiler-rt/cmake/base-config-ix.cmake
++++ b/compiler-rt/cmake/base-config-ix.cmake
+@@ -182,9 +182,7 @@ macro(test_targets)
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le")
+       test_target_arch(powerpc64le "" "-m64")
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
+-      if(CMAKE_SYSTEM_NAME MATCHES "AIX")
+-        test_target_arch(powerpc "" "-m32")
+-      endif()
++      test_target_arch(powerpc "" "-m32")
+       test_target_arch(powerpc64 "" "-m64")
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x")
+       test_target_arch(s390x "" "")
diff --git a/srcpkgs/llvm13/template b/srcpkgs/llvm13/template
new file mode 100644
index 000000000000..08d847472525
--- /dev/null
+++ b/srcpkgs/llvm13/template
@@ -0,0 +1,423 @@
+# Template file for 'llvm13'
+pkgname=llvm13
+version=13.0.0
+revision=1
+wrksrc="llvm-project-${version}.src"
+build_wrksrc=llvm
+build_style=cmake
+configure_args="
+ -DCMAKE_BUILD_TYPE=Release -Wno-dev
+ -DENABLE_LINKER_BUILD_ID=YES
+ -DLLDB_USE_SYSTEM_SIX=YES
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES
+ -DLIBCXXABI_USE_LLVM_UNWINDER=YES
+ -DLIBCXXABI_ENABLE_STATIC_UNWINDER=YES
+ -DLIBOMP_ENABLE_SHARED=YES
+ -DLIBOMP_INSTALL_ALIASES=NO
+ -DLLVM_INCLUDE_DOCS=YES
+ -DLLVM_BUILD_DOCS=YES
+ -DLLVM_ENABLE_SPHINX=YES
+ -DSPHINX_WARNINGS_AS_ERRORS=NO
+ -DLLVM_INSTALL_UTILS=YES
+ -DLLVM_BUILD_LLVM_DYLIB=YES
+ -DLLVM_LINK_LLVM_DYLIB=YES
+ -DLLVM_ENABLE_RTTI=YES
+ -DLLVM_ENABLE_FFI=YES
+ -DLLVM_BINUTILS_INCDIR=/usr/include"
+hostmakedepends="perl python3 zlib-devel libffi-devel swig python3-Sphinx
+ python3-recommonmark python3-sphinx-automodapi"
+makedepends="python3-devel zlib-devel elfutils-devel libffi-devel libedit-devel
+ libxml2-devel binutils-devel libatomic-devel"
+depends="libllvm13>=${version}_${revision}"
+short_desc="Low Level Virtual Machine"
+maintainer="q66 <daniel@octaforge.org>"
+license="Apache-2.0"
+homepage="https://www.llvm.org"
+distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-project-${version}.src.tar.xz"
+checksum=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3
+lib32disabled=yes
+python_version=3
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
+	makedepends+=" libexecinfo-devel"
+	depends+=" libexecinfo-devel"
+fi
+
+# "operand out of range" assembler failures
+case "$XBPS_TARGET_MACHINE" in
+	ppc64*) ;;
+	ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
+esac
+
+_enabled_projects="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;libunwind;lld"
+
+_lldb_enable=yes
+_libomp_enable=no
+
+case "$XBPS_TARGET_MACHINE" in
+	ppc64le*) ;;
+	ppc*|i686*) _lldb_enable=no ;;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|ppc64*) _libomp_enable=yes;;
+esac
+
+subpackages="clang-tools-extra"
+
+# must go before clang
+if [ "$_libomp_enable" = "yes" ]; then
+	_enabled_projects+=";openmp"
+	subpackages+=" libomp libomp-devel"
+	# because of cmake nonsense referencing libomptarget.so.*
+	depends+=" libomp>=${version}_${revision}"
+fi
+
+subpackages+=" clang clang-analyzer libclang libclang-cpp
+ llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel
+ libcxxabi libcxxabi-devel libllvm13"
+
+if [ "$_lldb_enable" = "yes" ]; then
+	# XXX fails to cross compile due to python
+	_enabled_projects+=";lldb"
+	subpackages+=" lldb lldb-devel"
+fi
+
+subpackages+=" lld lld-devel"
+
+configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
+
+post_patch() {
+	if [ "$_lldb_enable" = "yes" ]; then
+		if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+			vsed -i 's|__ptrace_request|int|g' \
+				${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+		fi
+		# disable docs for lldb as they fail to generate
+		vsed -i '/add_subdirectory(docs)/d' \
+			${wrksrc}/lldb/CMakeLists.txt
+	fi
+
+	# update config.guess for better platform detection
+	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
+		${wrksrc}/llvm/cmake
+
+	# fix linker failures on some archs
+	vsed -i 's,check_library_exists(gcc_s .*,set(LIBCXXABI_HAS_GCC_S_LIB ON),' \
+		${wrksrc}/libcxxabi/cmake/config-ix.cmake
+	vsed -i 's,check_library_exists(gcc .*,set(LIBCXXABI_HAS_GCC_LIB ON),' \
+		${wrksrc}/libcxxabi/cmake/config-ix.cmake
+
+	# need libssp_nonshared on some musl platforms (because of nodefaultlibs)
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*) ;;
+		ppc*-musl|i686-musl|mips*-musl)
+			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
+				${wrksrc}/libunwind/src/CMakeLists.txt
+			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
+				${wrksrc}/libcxxabi/src/CMakeLists.txt
+			vsed -i 's,#ssp,,' ${wrksrc}/libcxx/CMakeLists.txt
+			;;
+	esac
+
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64-musl) # some sanitizer currently only on x86_64 stuff needs backtrace
+			vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \
+				${wrksrc}/compiler-rt/CMakeLists.txt
+			;;
+		arm*-musl|i686-musl) # sanitizer code is broken since it duplicates some libc bits
+			vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \
+				${wrksrc}/compiler-rt/cmake/config-ix.cmake
+			;;
+	esac
+}
+
+pre_configure() {
+	local triplet
+
+	# Vastly reduce size of debugging symbols:
+	CFLAGS=${CFLAGS/ -g/ -g1}
+	CXXFLAGS=${CXXFLAGS/ -g/ -g1}
+
+	# since gcc9, the build likes to blow up for ppc32 apparently because
+	# of clang being too large for a 24-bit relative call to the PLT, so
+	# optimize for size instead
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*) ;;
+		mips*-musl|ppc*) configure_args+=" -DVOID_CXX_OPT_FLAGS=-Os" ;;
+	esac
+
+	if [ "$CROSS_BUILD" ]; then
+		msg_normal "Building host tblgen\n"
+		mkdir -p build/HOST
+		cd build/HOST
+		CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
+			CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
+			cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+			-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
+		make ${makejobs} -C utils/TableGen
+		make ${makejobs} -C tools/clang/utils/TableGen
+		[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
+		configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
+		configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/clang-tblgen"
+		[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
+		cd ../..
+	fi
+
+	case "$XBPS_TARGET_MACHINE" in
+		i686*) _arch="X86";;
+		x86_64*) _arch="X86";;
+		armv5*) _arch="Armv5te";;
+		armv6*) _arch="Armv6";;
+		armv7*) _arch="Armv7";;
+		aarch64*) _arch="AArch64";;
+		mips*) _arch="Mips";;
+		ppc*) _arch="PowerPC";;
+		riscv64*) _arch="RISCV64";;
+	esac
+
+	triplet=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}
+
+	configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
+	configure_args+=" -DLLVM_HOST_TRIPLE=${triplet}"
+	configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${triplet}"
+}
+
+do_install() {
+	cd build
+	cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
+
+	# Required for multilib.
+	if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+		for _header in llvm-config; do
+			mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
+			vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
+				usr/include/llvm/Config ${_header}.h
+		done
+	fi
+
+	# Remove llvm-config-host in cross builds.
+	if [ "$CROSS_BUILD" ]; then
+		rm -f ${DESTDIR}/usr/bin/llvm-config-host
+	fi
+
+	# Install libcxxabi headers
+	vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
+	vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
+
+	# Install libunwind headers
+	vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/unwind.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
+		644 usr/include/mach-o
+}
+
+clang-analyzer_package() {
+	pycompile_dirs="usr/share/scan-view"
+	depends="clang-${version}_${revision} python3 perl"
+	short_desc+=" - A source code analysis framework"
+	homepage="https://clang-analyzer.llvm.org/"
+	pkg_install() {
+		vmove usr/share/man/man1/scan-build.1
+		vmove "/usr/bin/scan-*"
+		vmove "/usr/share/scan-*"
+		vmove "/usr/libexec/*analyzer"
+	}
+}
+
+clang-tools-extra_package() {
+	lib32disabled=yes
+	depends="clang-${version}_${revision} python3"
+	short_desc+=" - Extra Clang tools"
+	homepage="https://clang.llvm.org/extra/"
+	pkg_install() {
+		vmove usr/include/clang-tidy
+		vmove usr/bin/clang-apply-replacements
+		vmove usr/bin/clang-query
+		vmove usr/bin/clang-rename
+		vmove usr/bin/clang-tidy
+		vmove usr/bin/diagtool
+		vmove usr/bin/find-all-symbols
+		vmove usr/bin/hmaptool
+		vmove usr/bin/modularize
+		vmove usr/bin/pp-trace
+		vmove usr/bin/sancov
+		vmove "usr/lib/libclangApplyReplacements*"
+		vmove "usr/lib/libclangQuery*"
+		vmove "usr/lib/libclangTidy*"
+		vmove "usr/share/clang/*tidy*"
+		vmove usr/share/doc/clang-tools
+		vmove usr/share/man/man1/extraclangtools.1
+		vmove usr/share/man/man1/diagtool.1
+	}
+}
+
+clang_package() {
+	lib32disabled=yes
+	depends="libstdc++-devel libgcc-devel  binutils ${XBPS_TARGET_LIBC}-devel
+	 libclang-${version}_${revision}"
+	short_desc+=" - C language family frontend"
+	homepage="https://clang.llvm.org/"
+	pkg_install() {
+		vmove usr/include/clang
+		vmove usr/include/clang-c
+		vmove "usr/bin/*clang*"
+		vmove usr/bin/c-index-test
+		vmove usr/lib/clang
+		vmove usr/lib/cmake/clang
+		vmove "usr/lib/libclang*.a"
+		vmove "usr/lib/libclang*.so"
+		vmove usr/share/clang
+		vmove usr/share/doc/clang
+		vmove usr/share/man/man1/clang.1
+	}
+}
+
+libclang_package() {
+	short_desc+=" - C frontend runtime library"
+	pkg_install() {
+		vmove "usr/lib/libclang.so.*"
+	}
+}
+
+libclang-cpp_package() {
+	short_desc+=" - C frontend runtime library (C++ interface)"
+	pkg_install() {
+		vmove "usr/lib/libclang-cpp.so.*"
+	}
+}
+
+lld_package() {
+	lib32disabled=yes
+	short_desc+=" - linker"
+	homepage="https://lld.llvm.org"
+	pkg_install() {
+		vmove usr/bin/lld*
+		vmove usr/bin/wasm-ld
+		vmove usr/bin/ld.lld*
+		vmove usr/bin/ld64.lld*
+		vmove usr/share/doc/lld
+	}
+}
+
+lld-devel_package() {
+	lib32disabled=yes
+	short_desc+=" - linker - development files"
+	homepage="https://lld.llvm.org"
+	depends="lld>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/lld
+		vmove usr/lib/cmake/lld
+		vmove "usr/lib/liblld*a"
+	}
+}
+
+lldb_package() {
+	lib32disabled=yes
+	depends+=" python3-six"
+	short_desc+=" - LLDB debugger"
+	homepage="https://lldb.llvm.org/"
+	pkg_install() {
+		vmove usr/bin/*lldb*
+		vmove usr/lib/liblldb*so.*
+		vmove /usr/lib/python*
+	}
+}
+
+lldb-devel_package() {
+	lib32disabled=yes
+	depends="lldb>=${version}_${revision}"
+	short_desc+=" - LLDB debugger - development files"
+	pkg_install() {
+		vmove usr/include/lldb
+		vmove "usr/lib/liblldb*.so"
+	}
+}
+
+llvm-libunwind_package() {
+	short_desc+=" - libunwind"
+	pkg_install() {
+		vmove "usr/lib/libunwind.so.*"
+	}
+}
+
+llvm-libunwind-devel_package() {
+	short_desc+=" - libunwind - development files"
+	depends="llvm-libunwind>=${version}_${revision}"
+	conflicts="libunwind-devel>=0"
+	pkg_install() {
+		vmove usr/lib/libunwind.so
+		vmove usr/lib/libunwind.a
+		vmove "usr/include/*unwind*"
+		vmove usr/include/mach-o
+		vmove usr/share/doc/libunwind
+	}
+}
+
+libcxxabi_package() {
+	short_desc+=" - low level support for libc++"
+	pkg_install() {
+		vmove "usr/lib/libc++abi.so.*"
+	}
+}
+
+libcxxabi-devel_package() {
+	short_desc+=" - low level support for libc++ - development files"
+	depends="libcxxabi>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libc++abi.so
+		vmove usr/lib/libc++abi.a
+		vmove "usr/include/*cxxabi*"
+	}
+}
+
+libcxx_package() {
+	short_desc+=" - C++ standard library"
+	pkg_install() {
+		vmove "usr/lib/libc++.so.*"
+	}
+}
+
+libcxx-devel_package() {
+	short_desc+=" - C++ standard library - development files"
+	depends="libcxx>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libc++.so
+		vmove usr/lib/libc++.a
+		vmove usr/lib/libc++experimental.a
+		vmove usr/include/c++
+		vmove usr/share/doc/libcxx
+	}
+}
+
+libomp_package() {
+	short_desc+=" - Clang OpenMP support library"
+	pkg_install() {
+		vmove usr/lib/libomp.so
+		vmove "usr/lib/libomptarget.rtl.*.so"
+		vmove usr/lib/libarcher.so
+	}
+}
+
+libomp-devel_package() {
+	short_desc+=" - Clang OpenMP support library - development files"
+	depends="libomp>=${version}_${revision}"
+	pkg_install() {
+		vmove "usr/lib/libomp*.so"
+		vmove "usr/lib/libarcher*"
+		vmove "usr/include/omp*.h"
+		vmove "usr/lib/clang/${version}/include/omp*.h"
+		vmove usr/share/man/man1/llvmopenmp.1
+		vmove usr/share/doc/openmp
+	}
+}
+
+libllvm13_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/libLLVM-*.so*"
+	}
+}
diff --git a/srcpkgs/llvm13/update b/srcpkgs/llvm13/update
new file mode 100644
index 000000000000..e95cf26b3586
--- /dev/null
+++ b/srcpkgs/llvm13/update
@@ -0,0 +1,3 @@
+site="https://github.com/llvm/llvm-project/releases"
+pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
+ignore="*-rc*"

From 02699eaad6f3366ea2ea2515308d83237ba996c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:23:17 +0200
Subject: [PATCH 02/18] llvm: update to 13.0.0

---
 srcpkgs/llvm/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template
index a92db6f94f9f..bcfee82098ff 100644
--- a/srcpkgs/llvm/template
+++ b/srcpkgs/llvm/template
@@ -1,10 +1,10 @@
 # Template file for 'llvm'
 pkgname=llvm
-version=12.0.0
+version=13.0.0
 revision=1
 build_style=meta
-depends="llvm12"
-replaces="llvm11>=0 llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0"
+depends="llvm13"
+replaces="llvm12>=0 llvm11>=0 llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0"
 short_desc="LLVM meta package"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="Public Domain"

From a87c87b6a71043b895553cdb57eecd616b8ccafc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:43:56 +0200
Subject: [PATCH 03/18] llvm12: remove clang parts

---
 ...clang-001-fix-unwind-chain-inclusion.patch |  44 ---
 .../patches/clang-002-add-musl-triples.patch  | 110 -------
 .../clang-003-ppc64-dynamic-linker-path.patch |  13 -
 .../patches/clang-004-ppc64-musl-elfv2.patch  |  48 ---
 .../compiler-rt-aarch64-ucontext.patch        |  11 -
 .../compiler-rt-sanitizer-ppc64-musl.patch    |  35 --
 .../llvm12/patches/compiler-rt-size_t.patch   |  10 -
 .../patches/compiler-rt-xray-ppc64-musl.patch |  62 ----
 srcpkgs/llvm12/patches/libcxx-musl.patch      |  26 --
 srcpkgs/llvm12/patches/libcxx-ppc.patch       |  22 --
 .../llvm12/patches/libcxx-ssp-nonshared.patch |  11 -
 srcpkgs/llvm12/patches/libcxxabi-dl.patch     |  25 --
 srcpkgs/llvm12/patches/libunwind-ppc32.patch  |  63 ----
 srcpkgs/llvm12/patches/lldb-musl.patch        |  31 --
 .../llvm12/patches/ppc32-compiler-rt.patch    |  21 --
 srcpkgs/llvm12/template                       | 301 +-----------------
 16 files changed, 1 insertion(+), 832 deletions(-)
 delete mode 100644 srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-size_t.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-ppc.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxxabi-dl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libunwind-ppc32.patch
 delete mode 100644 srcpkgs/llvm12/patches/lldb-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/ppc32-compiler-rt.patch

diff --git a/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
deleted file mode 100644
index e4eaa7783e7a..000000000000
--- a/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
-From: Andrea Brancaleoni <miwaxe@gmail.com>
-Date: Tue, 8 Sep 2015 22:14:57 +0200
-Subject: [PATCH 2/7] fix unwind chain inclusion
-
----
- lib/Headers/unwind.h | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
-index 303d792..44e10cc 100644
---- a/clang/lib/Headers/unwind.h
-+++ b/clang/lib/Headers/unwind.h
-@@ -9,9 +9,6 @@
- 
- /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
- 
--#ifndef __CLANG_UNWIND_H
--#define __CLANG_UNWIND_H
--
- #if defined(__APPLE__) && __has_include_next(<unwind.h>)
- /* Darwin (from 11.x on) provide an unwind.h. If that's available,
-  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
-@@ -39,6 +36,9 @@
- # endif
- #else
- 
-+#ifndef __CLANG_UNWIND_H
-+#define __CLANG_UNWIND_H
-+
- #include <stdint.h>
- 
- #ifdef __cplusplus
-@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
- }
- #endif
- 
-+#endif /* __CLANG_UNWIND_H */
-+
- #endif
- 
--#endif /* __CLANG_UNWIND_H */
--- 
-2.5.1
diff --git a/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch b/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
deleted file mode 100644
index 25688d40dbc2..000000000000
--- a/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- a/clang/lib/Driver/ToolChains/Gnu.cpp
-+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
-@@ -2086,7 +2086,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-   static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
-                                              "armv7hl-redhat-linux-gnueabi",
-                                              "armv6hl-suse-linux-gnueabi",
--                                             "armv7hl-suse-linux-gnueabi"};
-+                                             "armv7hl-suse-linux-gnueabi",
-+                                             "armv7l-linux-gnueabihf"};
-   static const char *const ARMebLibDirs[] = {"/lib"};
-   static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
-                                              "armeb-linux-androideabi"};
-@@ -2153,8 +2154,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-       "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
-   static const char *const PPCLELibDirs[] = {"/lib32", "/lib"};
-   static const char *const PPCLETriples[] = {"powerpcle-linux-gnu",
--                                             "powerpcle-unknown-linux-gnu",
--                                             "powerpcle-linux-musl"};
-+                                             "powerpcle-unknown-linux-gnu"};
- 
-   static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
-   static const char *const PPC64Triples[] = {
-@@ -2235,6 +2235,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-     return;
-   }
- 
-+  if (TargetTriple.isMusl()) {
-+    static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"};
-+    static const char *const ARMHFMuslTriples[] = {
-+        "arm-linux-musleabihf", "armv7l-linux-musleabihf"
-+    };
-+    static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"};
-+    static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"};
-+    static const char *const X86MuslTriples[] = {"i686-linux-musl"};
-+    static const char *const MIPSMuslTriples[] = {
-+        "mips-linux-musl", "mipsel-linux-musl",
-+        "mipsel-linux-muslhf", "mips-linux-muslhf"
-+    };
-+    static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"};
-+    static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"};
-+    static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"};
-+    static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"};
-+
-+    switch (TargetTriple.getArch()) {
-+    case llvm::Triple::aarch64:
-+      LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
-+      TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
-+      BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
-+      BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
-+      break;
-+    case llvm::Triple::arm:
-+      LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
-+      if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
-+        TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
-+      } else {
-+        TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples));
-+      }
-+      break;
-+    case llvm::Triple::x86_64:
-+      LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
-+      TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
-+      BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs));
-+      BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
-+      break;
-+    case llvm::Triple::x86:
-+      LibDirs.append(begin(X86LibDirs), end(X86LibDirs));
-+      TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
-+      BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
-+      BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
-+      break;
-+    case llvm::Triple::mips:
-+      LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs));
-+      TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples));
-+      break;
-+    case llvm::Triple::ppc:
-+      LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
-+      TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
-+      BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
-+      BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
-+      break;
-+    case llvm::Triple::ppcle:
-+      LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
-+      TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
-+      BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
-+      BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
-+      break;
-+    case llvm::Triple::ppc64:
-+      LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
-+      TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
-+      BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
-+      BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
-+      break;
-+    case llvm::Triple::ppc64le:
-+      LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
-+      TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
-+      BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
-+      BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
-+      break;
-+    default:
-+      break;
-+    }
-+    TripleAliases.push_back(TargetTriple.str());
-+    if (TargetTriple.str() != BiarchTriple.str())
-+      BiarchTripleAliases.push_back(BiarchTriple.str());
-+    return;
-+  }
-+
-   // Android targets should not use GNU/Linux tools or libraries.
-   if (TargetTriple.isAndroid()) {
-     static const char *const AArch64AndroidTriples[] = {
diff --git a/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
deleted file mode 100644
index 4ad6412d1e6c..000000000000
--- a/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/clang/lib/Driver/ToolChains/Linux.cpp
-+++ b/clang/lib/Driver/ToolChains/Linux.cpp
-@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
-     Loader = "ld.so.1";
-     break;
-   case llvm::Triple::ppc64:
--    LibDir = "lib64";
--    Loader =
--        (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
--    break;
-   case llvm::Triple::ppc64le:
-     LibDir = "lib64";
-     Loader =
diff --git a/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
deleted file mode 100644
index 21fc8003c5f1..000000000000
--- a/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/clang/lib/Basic/Targets/PPC.h
-+++ b/clang/lib/Basic/Targets/PPC.h
-@@ -415,11 +415,10 @@ public:
-       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
-     } else if ((Triple.getArch() == llvm::Triple::ppc64le)) {
-       DataLayout = "e-m:e-i64:64-n32:64";
--      ABI = "elfv2";
-     } else {
-       DataLayout = "E-m:e-i64:64-n32:64";
--      ABI = "elfv1";
-     }
-+    ABI = "elfv2";
- 
-     if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
-       LongDoubleWidth = LongDoubleAlign = 64;
---- a/clang/lib/CodeGen/TargetInfo.cpp
-+++ b/clang/lib/CodeGen/TargetInfo.cpp
-@@ -10927,9 +10927,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
-       return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true));
- 
-     if (Triple.isOSBinFormatELF()) {
--      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;
--      if (getTarget().getABI() == "elfv2")
--        Kind = PPC64_SVR4_ABIInfo::ELFv2;
-+      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2;
-+      if (getTarget().getABI() == "elfv1")
-+        Kind = PPC64_SVR4_ABIInfo::ELFv1;
-       bool IsSoftFloat = CodeGenOpts.FloatABI == "soft";
- 
-       return SetCGInfo(
---- a/clang/lib/Driver/ToolChains/Clang.cpp
-+++ b/clang/lib/Driver/ToolChains/Clang.cpp
-@@ -1920,14 +1920,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
-   const llvm::Triple &T = getToolChain().getTriple();
-   if (T.isOSBinFormatELF()) {
-     switch (getToolChain().getArch()) {
--    case llvm::Triple::ppc64: {
--      if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
--          T.isOSOpenBSD() || T.isMusl())
--        ABIName = "elfv2";
--      else
--        ABIName = "elfv1";
--      break;
--    }
-+    case llvm::Triple::ppc64:
-     case llvm::Triple::ppc64le:
-       ABIName = "elfv2";
-       break;
diff --git a/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch b/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
deleted file mode 100644
index 893c059d7b8d..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp.orig
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-@@ -1799,7 +1799,7 @@
- 
- static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) {
-   static const u32 kEsrMagic = 0x45535201;
--  u8 *aux = ucontext->uc_mcontext.__reserved;
-+  u8 *aux = reinterpret_cast<u8 *>(ucontext->uc_mcontext.__reserved);
-   while (true) {
-     _aarch64_ctx *ctx = (_aarch64_ctx *)aux;
-     if (ctx->size == 0) break;
diff --git a/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch b/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
deleted file mode 100644
index 35f16d24f340..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-@@ -74,6 +74,10 @@
- #include <sys/utsname.h>
- #endif
- 
-+#if SANITIZER_LINUX && defined(__powerpc__)
-+#include <asm/ptrace.h>
-+#endif
-+
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- #include <sys/personality.h>
- #endif
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-@@ -92,7 +92,7 @@
- # include <utime.h>
- # include <sys/ptrace.h>
- #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
--    SANITIZER_RISCV64
-+    defined(__powerpc__) || SANITIZER_RISCV64
- #  include <asm/ptrace.h>
- #  ifdef __arm__
- typedef struct user_fpregs elf_fpregset_t;
---- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
-@@ -31,7 +31,7 @@
- #include <sys/types.h> // for pid_t
- #include <sys/uio.h> // for iovec
- #include <elf.h> // for NT_PRSTATUS
--#if (defined(__aarch64__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
-+#if (defined(__aarch64__) || defined(__powerpc__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
- // GLIBC 2.20+ sys/user does not include asm/ptrace.h
- # include <asm/ptrace.h>
- #endif
diff --git a/srcpkgs/llvm12/patches/compiler-rt-size_t.patch b/srcpkgs/llvm12/patches/compiler-rt-size_t.patch
deleted file mode 100644
index 2c63063a5e9e..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-size_t.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp.orig
-+++ b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp
-@@ -25,6 +25,7 @@
-   }
- 
- #include <cassert>
-+#include <cstddef>
- #include <cstdint>
- #include <dlfcn.h> // for dlsym()
- 
diff --git a/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
deleted file mode 100644
index d0b61c80c897..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/compiler-rt/lib/xray/xray_powerpc64.inc
-+++ b/compiler-rt/lib/xray/xray_powerpc64.inc
-@@ -12,7 +12,13 @@
- 
- #include <cstdint>
- #include <mutex>
-+#ifdef __GLIBC__
- #include <sys/platform/ppc.h>
-+#else
-+#include <cctype>
-+#include <cstring>
-+#include <cstdlib>
-+#endif
- 
- #include "xray_defs.h"
- 
-@@ -20,13 +26,45 @@ namespace __xray {
- 
- ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
-   CPU = 0;
-+#ifdef __GLIBC__
-   return __ppc_get_timebase();
-+#else
-+  return __builtin_ppc_get_timebase();
-+#endif
- }
- 
- inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
-   static std::mutex M;
-   std::lock_guard<std::mutex> Guard(M);
-+#ifdef __GLIBC__
-   return __ppc_get_timebase_freq();
-+#else
-+  /* FIXME: a less dirty implementation? */
-+  static uint64_t base;
-+  if (!base) {
-+    FILE *f = fopen("/proc/cpuinfo", "rb");
-+    if (f) {
-+      ssize_t nr;
-+      /* virtually always big enough to hold the line */
-+      char buf[512];
-+      while (fgets(buf, sizeof(buf), f)) {
-+        char *ret = strstr(buf, "timebase");
-+        if (!ret) {
-+          continue;
-+        }
-+        ret += sizeof("timebase") - 1;
-+        ret = strchr(ret, ':');
-+        if (!ret) {
-+          continue;
-+        }
-+        base = strtoul(ret + 1, nullptr, 10);
-+        break;
-+      }
-+      fclose(f);
-+    }
-+  }
-+  return base;
-+#endif
- }
- 
- inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {
diff --git a/srcpkgs/llvm12/patches/libcxx-musl.patch b/srcpkgs/llvm12/patches/libcxx-musl.patch
deleted file mode 100644
index bbd31ffc2cb1..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-musl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/libcxx/include/locale
-+++ b/libcxx/include/locale
-@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
-         typename remove_reference<decltype(errno)>::type __save_errno = errno;
-         errno = 0;
-         char *__p2;
-+#if defined(__linux__) && !defined(__GLIBC__)
-+        long long __ll = strtoll(__a, &__p2, __base);
-+#else
-         long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
-+#endif
-         typename remove_reference<decltype(errno)>::type __current_errno = errno;
-         if (__current_errno == 0)
-             errno = __save_errno;
-@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
-         typename remove_reference<decltype(errno)>::type __save_errno = errno;
-         errno = 0;
-         char *__p2;
-+#if defined(__linux__) && !defined(__GLIBC__)
-+        unsigned long long __ll = strtoull(__a, &__p2, __base);
-+#else
-         unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
-+#endif
-         typename remove_reference<decltype(errno)>::type __current_errno = errno;
-         if (__current_errno == 0)
-             errno = __save_errno;
diff --git a/srcpkgs/llvm12/patches/libcxx-ppc.patch b/srcpkgs/llvm12/patches/libcxx-ppc.patch
deleted file mode 100644
index 7a92f8004e1c..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-ppc.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This ensures `is_iec559` is defined correctly under all long double ABIs,
-including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__`
-is not defined on gcc.
-
---- a/libcxx/include/limits
-+++ b/libcxx/include/limits
-@@ -426,8 +426,14 @@ protected:
-     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
-     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
- 
--#if (defined(__ppc__) || defined(__ppc64__))
-+#if defined(__powerpc__) || defined(__powerpc64__)
-+#if (__LDBL_MAX_EXP__ > __DBL_MAX_EXP__) || (__LDBL_MANT_DIG__ == __DBL_MANT_DIG__)
-+    /* IEEE 754 quadruple or double precision */
-+    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
-+#else
-+    /* 128-bit IBM double-double */
-     static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
-+#endif
- #else
-     static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
- #endif
diff --git a/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch b/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
deleted file mode 100644
index 70292beb2fcd..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libcxx/CMakeLists.txt
-+++ b/libcxx/CMakeLists.txt
-@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
-     target_link_libraries(${target} PRIVATE atomic)
-   endif()
- 
-+#ssp  target_link_libraries(${target} PRIVATE ssp_nonshared)
-+
-   if (MINGW)
-     target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
-   endif()
diff --git a/srcpkgs/llvm12/patches/libcxxabi-dl.patch b/srcpkgs/llvm12/patches/libcxxabi-dl.patch
deleted file mode 100644
index 3a15f9db8c98..000000000000
--- a/srcpkgs/llvm12/patches/libcxxabi-dl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Also link to -ldl to prevent undefined references.
-
---- a/libcxxabi/src/CMakeLists.txt
-+++ b/libcxxabi/src/CMakeLists.txt
-@@ -73,6 +73,7 @@
-   endif()
- 
-   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
-+  add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
- endif()
- 
- if (LIBCXXABI_USE_LLVM_UNWINDER)
---- a/libcxx/CMakeLists.txt
-+++ b/libcxx/CMakeLists.txt
-@@ -745,6 +745,10 @@
-     target_link_libraries(${target} PRIVATE m)
-   endif()
- 
-+  if (LIBCXX_HAS_C_LIB)
-+    target_link_libraries(${target} PRIVATE dl)
-+  endif()
-+
-   if (LIBCXX_HAS_RT_LIB)
-     target_link_libraries(${target} PRIVATE rt)
-   endif()
diff --git a/srcpkgs/llvm12/patches/libunwind-ppc32.patch b/srcpkgs/llvm12/patches/libunwind-ppc32.patch
deleted file mode 100644
index 74aa7576ecf9..000000000000
--- a/srcpkgs/llvm12/patches/libunwind-ppc32.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-This fixes build at least with gcc9 which does not define `__ppc__`.
-
---- a/libunwind/include/__libunwind_config.h
-+++ b/libunwind/include/__libunwind_config.h
-@@ -49,7 +49,7 @@
- #  define _LIBUNWIND_CONTEXT_SIZE 167
- #  define _LIBUNWIND_CURSOR_SIZE 179
- #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
--# elif defined(__ppc__)
-+# elif defined(__powerpc__)
- #  define _LIBUNWIND_TARGET_PPC 1
- #  define _LIBUNWIND_CONTEXT_SIZE 117
- #  define _LIBUNWIND_CURSOR_SIZE 124
---- a/libunwind/src/UnwindRegistersRestore.S
-+++ b/libunwind/src/UnwindRegistersRestore.S
-@@ -392,7 +392,7 @@ Lnovec:
-   PPC64_LR(3)
-   bctr
- 
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- 
- DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
- //
---- a/libunwind/src/UnwindRegistersSave.S
-+++ b/libunwind/src/UnwindRegistersSave.S
-@@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
-   blr
- 
- 
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- 
- //
- // extern int unw_getcontext(unw_context_t* thread_state)
---- a/libunwind/src/config.h
-+++ b/libunwind/src/config.h
-@@ -95,12 +95,12 @@
- #define _LIBUNWIND_BUILD_SJLJ_APIS
- #endif
- 
--#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__)
-+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__powerpc64__)
- #define _LIBUNWIND_SUPPORT_FRAME_APIS
- #endif
- 
- #if defined(__i386__) || defined(__x86_64__) ||                                \
--    defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) ||        \
-+    defined(__powerpc__) || defined(__powerpc64__) ||                          \
-     (!defined(__APPLE__) && defined(__arm__)) ||                               \
-     (defined(__arm64__) || defined(__aarch64__)) ||                            \
-     defined(__mips__)
---- a/libunwind/src/libunwind.cpp
-+++ b/libunwind/src/libunwind.cpp
-@@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor,
- # define REGISTER_KIND Registers_x86_64
- #elif defined(__powerpc64__)
- # define REGISTER_KIND Registers_ppc64
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- # define REGISTER_KIND Registers_ppc
- #elif defined(__aarch64__)
- # define REGISTER_KIND Registers_arm64
diff --git a/srcpkgs/llvm12/patches/lldb-musl.patch b/srcpkgs/llvm12/patches/lldb-musl.patch
deleted file mode 100644
index 601c0d138523..000000000000
--- a/srcpkgs/llvm12/patches/lldb-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/lldb/source/Plugins/Process/Linux/Procfs.h
-+++ b/lldb/source/Plugins/Process/Linux/Procfs.h
-@@ -10,21 +10,12 @@
- // sys/procfs.h on Android/Linux for all supported architectures.
- 
- #include <sys/ptrace.h>
-+#include <asm/ptrace.h>
- 
--#ifdef __ANDROID__
--#if defined(__arm64__) || defined(__aarch64__)
--typedef unsigned long elf_greg_t;
--typedef elf_greg_t
--    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
--typedef struct user_fpsimd_state elf_fpregset_t;
--#ifndef NT_FPREGSET
--#define NT_FPREGSET NT_PRFPREG
--#endif // NT_FPREGSET
--#elif defined(__mips__)
--#ifndef NT_FPREGSET
--#define NT_FPREGSET NT_PRFPREG
--#endif // NT_FPREGSET
--#endif
--#else // __ANDROID__
-+#if !defined(__GLIBC__) && defined(__powerpc__)
-+#define pt_regs musl_pt_regs
-+#include <sys/procfs.h>
-+#undef pt_regs
-+#else
- #include <sys/procfs.h>
--#endif // __ANDROID__
-+#endif
diff --git a/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch b/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch
deleted file mode 100644
index 8e0a9a779d1b..000000000000
--- a/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit ba4ede595ff9599232f5dd2b4384c243137b53fc
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Jun 22 23:40:54 2021 +0200
-
-    enable compiler-rt support for ppc32
-
-diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
-index 1edab43..5c0c8a2 100644
---- a/compiler-rt/cmake/base-config-ix.cmake
-+++ b/compiler-rt/cmake/base-config-ix.cmake
-@@ -182,9 +182,7 @@ macro(test_targets)
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le")
-       test_target_arch(powerpc64le "" "-m64")
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
--      if(CMAKE_SYSTEM_NAME MATCHES "AIX")
--        test_target_arch(powerpc "" "-m32")
--      endif()
-+      test_target_arch(powerpc "" "-m32")
-       test_target_arch(powerpc64 "" "-m64")
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x")
-       test_target_arch(s390x "" "")
diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template
index 7ce18028e4a3..7b361bbbf5bc 100644
--- a/srcpkgs/llvm12/template
+++ b/srcpkgs/llvm12/template
@@ -1,25 +1,17 @@
 # Template file for 'llvm12'
 pkgname=llvm12
 version=12.0.1
-revision=2
+revision=3
 wrksrc="llvm-project-${version}.src"
 build_wrksrc=llvm
 build_style=cmake
 configure_args="
  -DCMAKE_BUILD_TYPE=Release -Wno-dev
  -DENABLE_LINKER_BUILD_ID=YES
- -DLLDB_USE_SYSTEM_SIX=YES
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES
- -DLIBCXXABI_USE_LLVM_UNWINDER=YES
- -DLIBCXXABI_ENABLE_STATIC_UNWINDER=YES
- -DLIBOMP_ENABLE_SHARED=YES
- -DLIBOMP_INSTALL_ALIASES=NO
  -DLLVM_INCLUDE_DOCS=YES
  -DLLVM_BUILD_DOCS=YES
  -DLLVM_ENABLE_SPHINX=YES
  -DSPHINX_WARNINGS_AS_ERRORS=NO
- -DLLVM_INSTALL_UTILS=YES
  -DLLVM_BUILD_LLVM_DYLIB=YES
  -DLLVM_LINK_LLVM_DYLIB=YES
  -DLLVM_ENABLE_RTTI=YES
@@ -51,87 +43,10 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
 esac
 
-_enabled_projects="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;libunwind;lld"
-
-_lldb_enable=yes
-_libomp_enable=no
-
-case "$XBPS_TARGET_MACHINE" in
-	ppc64le*) ;;
-	ppc*|i686*) _lldb_enable=no ;;
-esac
-
-case "$XBPS_TARGET_MACHINE" in
-	x86_64*|aarch64*|ppc64*) _libomp_enable=yes;;
-esac
-
-subpackages="clang-tools-extra"
-
-# must go before clang
-if [ "$_libomp_enable" = "yes" ]; then
-	_enabled_projects+=";openmp"
-	subpackages+=" libomp libomp-devel"
-	# because of cmake nonsense referencing libomptarget.so.*
-	depends+=" libomp>=${version}_${revision}"
-fi
-
-subpackages+=" clang clang-analyzer libclang libclang-cpp
- llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel
- libcxxabi libcxxabi-devel libllvm12"
-
-if [ "$_lldb_enable" = "yes" ]; then
-	# XXX fails to cross compile due to python
-	_enabled_projects+=";lldb"
-	subpackages+=" lldb lldb-devel"
-fi
-
-subpackages+=" lld lld-devel"
-
-configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
-
 post_patch() {
-	if [ "$_lldb_enable" = "yes" ]; then
-		if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-			vsed -i 's|__ptrace_request|int|g' \
-				${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
-		fi
-		# disable docs for lldb as they fail to generate
-		vsed -i '/add_subdirectory(docs)/d' \
-			${wrksrc}/lldb/CMakeLists.txt
-	fi
-
 	# update config.guess for better platform detection
 	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
 		${wrksrc}/llvm/cmake
-
-	# fix linker failures on some archs
-	vsed -i 's,check_library_exists(gcc_s .*,set(LIBCXXABI_HAS_GCC_S_LIB ON),' \
-		${wrksrc}/libcxxabi/cmake/config-ix.cmake
-	vsed -i 's,check_library_exists(gcc .*,set(LIBCXXABI_HAS_GCC_LIB ON),' \
-		${wrksrc}/libcxxabi/cmake/config-ix.cmake
-
-	# need libssp_nonshared on some musl platforms (because of nodefaultlibs)
-	case "$XBPS_TARGET_MACHINE" in
-		ppc64*) ;;
-		ppc*-musl|i686-musl|mips*-musl)
-			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
-				${wrksrc}/libunwind/src/CMakeLists.txt
-			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
-				${wrksrc}/libcxxabi/src/CMakeLists.txt
-			vsed -i 's,#ssp,,' ${wrksrc}/libcxx/CMakeLists.txt
-			;;
-	esac
-
-	case "$XBPS_TARGET_MACHINE" in
-		x86_64-musl) # some sanitizer currently only on x86_64 stuff needs backtrace
-			vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \
-				${wrksrc}/compiler-rt/CMakeLists.txt
-			;;
-		arm*-musl|i686-musl) # sanitizer code is broken since it duplicates some libc bits
-			vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \
-				${wrksrc}/compiler-rt/cmake/config-ix.cmake
-			;;
-	esac
 }
 
 pre_configure() {
@@ -158,10 +73,8 @@ pre_configure() {
 			cmake ../.. -DCMAKE_BUILD_TYPE=Release \
 			-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
 		make ${makejobs} -C utils/TableGen
-		make ${makejobs} -C tools/clang/utils/TableGen
 		[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
 		configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
-		configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/clang-tblgen"
 		[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
 		cd ../..
 	fi
@@ -202,218 +115,6 @@ do_install() {
 	if [ "$CROSS_BUILD" ]; then
 		rm -f ${DESTDIR}/usr/bin/llvm-config-host
 	fi
-
-	# Install libcxxabi headers
-	vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
-	vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
-
-	# Install libunwind headers
-	vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/unwind.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
-		644 usr/include/mach-o
-}
-
-clang-analyzer_package() {
-	pycompile_dirs="usr/share/scan-view"
-	depends="clang-${version}_${revision} python3 perl"
-	short_desc+=" - A source code analysis framework"
-	homepage="https://clang-analyzer.llvm.org/"
-	pkg_install() {
-		vmove usr/share/man/man1/scan-build.1
-		vmove "/usr/bin/scan-*"
-		vmove "/usr/share/scan-*"
-		vmove "/usr/libexec/*analyzer"
-	}
-}
-
-clang-tools-extra_package() {
-	lib32disabled=yes
-	depends="clang-${version}_${revision} python3"
-	short_desc+=" - Extra Clang tools"
-	homepage="https://clang.llvm.org/extra/"
-	pkg_install() {
-		vmove usr/include/clang-tidy
-		vmove usr/bin/clang-apply-replacements
-		vmove usr/bin/clang-query
-		vmove usr/bin/clang-rename
-		vmove usr/bin/clang-tidy
-		vmove usr/bin/diagtool
-		vmove usr/bin/find-all-symbols
-		vmove usr/bin/hmaptool
-		vmove usr/bin/modularize
-		vmove usr/bin/pp-trace
-		vmove usr/bin/sancov
-		vmove "usr/lib/libclangApplyReplacements*"
-		vmove "usr/lib/libclangQuery*"
-		vmove "usr/lib/libclangTidy*"
-		vmove "usr/share/clang/*tidy*"
-		vmove usr/share/doc/clang-tools
-		vmove usr/share/man/man1/extraclangtools.1
-		vmove usr/share/man/man1/diagtool.1
-	}
-}
-
-clang_package() {
-	lib32disabled=yes
-	depends="libstdc++-devel libgcc-devel  binutils ${XBPS_TARGET_LIBC}-devel
-	 libclang-${version}_${revision}"
-	short_desc+=" - C language family frontend"
-	homepage="https://clang.llvm.org/"
-	pkg_install() {
-		vmove usr/include/clang
-		vmove usr/include/clang-c
-		vmove "usr/bin/*clang*"
-		vmove usr/bin/c-index-test
-		vmove usr/lib/clang
-		vmove usr/lib/cmake/clang
-		vmove "usr/lib/libclang*.a"
-		vmove "usr/lib/libclang*.so"
-		vmove usr/share/clang
-		vmove usr/share/doc/clang
-		vmove usr/share/man/man1/clang.1
-	}
-}
-
-libclang_package() {
-	short_desc+=" - C frontend runtime library"
-	pkg_install() {
-		vmove "usr/lib/libclang.so.*"
-	}
-}
-
-libclang-cpp_package() {
-	short_desc+=" - C frontend runtime library (C++ interface)"
-	pkg_install() {
-		vmove "usr/lib/libclang-cpp.so.*"
-	}
-}
-
-lld_package() {
-	lib32disabled=yes
-	short_desc+=" - linker"
-	homepage="https://lld.llvm.org"
-	pkg_install() {
-		vmove usr/bin/lld*
-		vmove usr/bin/wasm-ld
-		vmove usr/bin/ld.lld*
-		vmove usr/bin/ld64.lld*
-		vmove usr/share/doc/lld
-	}
-}
-
-lld-devel_package() {
-	lib32disabled=yes
-	short_desc+=" - linker - development files"
-	homepage="https://lld.llvm.org"
-	depends="lld>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include/lld
-		vmove usr/lib/cmake/lld
-		vmove "usr/lib/liblld*a"
-	}
-}
-
-lldb_package() {
-	lib32disabled=yes
-	depends+=" python3-six"
-	short_desc+=" - LLDB debugger"
-	homepage="https://lldb.llvm.org/"
-	pkg_install() {
-		vmove usr/bin/*lldb*
-		vmove usr/lib/liblldb*so.*
-		vmove /usr/lib/python*
-	}
-}
-
-lldb-devel_package() {
-	lib32disabled=yes
-	depends="lldb>=${version}_${revision}"
-	short_desc+=" - LLDB debugger - development files"
-	pkg_install() {
-		vmove usr/include/lldb
-		vmove "usr/lib/liblldb*.so"
-	}
-}
-
-llvm-libunwind_package() {
-	short_desc+=" - libunwind"
-	pkg_install() {
-		vmove "usr/lib/libunwind.so.*"
-	}
-}
-
-llvm-libunwind-devel_package() {
-	short_desc+=" - libunwind - development files"
-	depends="llvm-libunwind>=${version}_${revision}"
-	conflicts="libunwind-devel>=0"
-	pkg_install() {
-		vmove usr/lib/libunwind.so
-		vmove usr/lib/libunwind.a
-		vmove "usr/include/*unwind*"
-		vmove usr/include/mach-o
-		vmove usr/share/doc/libunwind
-	}
-}
-
-libcxxabi_package() {
-	short_desc+=" - low level support for libc++"
-	pkg_install() {
-		vmove "usr/lib/libc++abi.so.*"
-	}
-}
-
-libcxxabi-devel_package() {
-	short_desc+=" - low level support for libc++ - development files"
-	depends="libcxxabi>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/lib/libc++abi.so
-		vmove usr/lib/libc++abi.a
-		vmove "usr/include/*cxxabi*"
-	}
-}
-
-libcxx_package() {
-	short_desc+=" - C++ standard library"
-	pkg_install() {
-		vmove "usr/lib/libc++.so.*"
-	}
-}
-
-libcxx-devel_package() {
-	short_desc+=" - C++ standard library - development files"
-	depends="libcxx>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/lib/libc++.so
-		vmove usr/lib/libc++.a
-		vmove usr/lib/libc++experimental.a
-		vmove usr/include/c++
-		vmove usr/share/doc/libcxx
-	}
-}
-
-libomp_package() {
-	short_desc+=" - Clang OpenMP support library"
-	pkg_install() {
-		vmove usr/lib/libomp.so
-		vmove "usr/lib/libomptarget.rtl.*.so"
-		vmove usr/lib/libarcher.so
-		vmove "usr/lib/libomp*.so.*"
-	}
-}
-
-libomp-devel_package() {
-	short_desc+=" - Clang OpenMP support library - development files"
-	depends="libomp>=${version}_${revision}"
-	pkg_install() {
-		vmove "usr/lib/libomp*.so"
-		vmove "usr/lib/libarcher*"
-		vmove "usr/include/omp*.h"
-		vmove "usr/lib/clang/${version}/include/omp*.h"
-		vmove usr/share/man/man1/llvmopenmp.1
-		vmove usr/share/doc/openmp
-	}
 }
 
 libllvm12_package() {

From aba0265ef3c72490126e0c293d36cdbbe3814b03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:02 +0200
Subject: [PATCH 04/18] bcc: rebuild for llvm13

---
 srcpkgs/bcc/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/bcc/template b/srcpkgs/bcc/template
index 3671a774b822..8b3941dbd7e3 100644
--- a/srcpkgs/bcc/template
+++ b/srcpkgs/bcc/template
@@ -1,7 +1,7 @@
 # Template file for 'bcc'
 pkgname=bcc
 version=0.23.0
-revision=1
+revision=2
 wrksrc="bcc"
 build_style=cmake
 configure_args="-DREVISION=${version} -DENABLE_LLVM_SHARED=1"

From 834d77fba1604eecd6b3964957838f46499be1f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:25 +0200
Subject: [PATCH 05/18] gnome-builder: rebuild for llvm13

---
 srcpkgs/gnome-builder/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnome-builder/template b/srcpkgs/gnome-builder/template
index 26cf768c391a..17b79d0ccaa1 100644
--- a/srcpkgs/gnome-builder/template
+++ b/srcpkgs/gnome-builder/template
@@ -1,7 +1,7 @@
 # Template file for 'gnome-builder'
 pkgname=gnome-builder
 version=3.40.2
-revision=3
+revision=4
 build_style=meson
 build_helper=qemu
 configure_args="-Dhelp=true -Dnetwork_tests=false"

From 3d4c6a297206797b07c59d17e16683cfc40f4a07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:45 +0200
Subject: [PATCH 06/18] shiboken2: rebuild for llvm13

---
 srcpkgs/shiboken2/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template
index cbddf90093a0..8fc8a13742bd 100644
--- a/srcpkgs/shiboken2/template
+++ b/srcpkgs/shiboken2/template
@@ -1,7 +1,7 @@
 # Template file for 'shiboken2'
 pkgname=shiboken2
 version=5.15.2
-revision=3
+revision=4
 _pkgname="pyside-setup-opensource-src-${version}"
 wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
 build_wrksrc="sources/shiboken2"

From e7555f15afc505bb1ddcaf1ffe3af57b218e4f44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:59 +0200
Subject: [PATCH 07/18] rtags: rebuild for llvm13

---
 srcpkgs/rtags/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/rtags/template b/srcpkgs/rtags/template
index b496a1b0e721..9b161e690d76 100644
--- a/srcpkgs/rtags/template
+++ b/srcpkgs/rtags/template
@@ -1,7 +1,7 @@
 # Template file for 'rtags'
 pkgname=rtags
 version=2.38
-revision=5
+revision=6
 build_style=cmake
 # Don't run tests in do_install, please.
 configure_args="-DSKIP_CTEST=TRUE"

From 1f0e7e02b4a93b4437f8d5f433eb7a05b672448c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:17 +0200
Subject: [PATCH 08/18] qt5: rebuild for llvm13

---
 srcpkgs/qt5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index c1d822ef021d..8bae9e94287a 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -3,7 +3,7 @@ pkgname=qt5
 version=5.15.3+20211001
 # commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=1
+revision=2
 build_style=meta
 hostmakedepends="cmake clang flex perl glib-devel pkg-config
  python re2c ruby which"

From 50b1ff473a751ea983dc5222c8d08816a8625efa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:27 +0200
Subject: [PATCH 09/18] bpftrace: rebuild for llvm13

---
 srcpkgs/bpftrace/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/bpftrace/template b/srcpkgs/bpftrace/template
index 7e9f9598d7c0..355b500cc9da 100644
--- a/srcpkgs/bpftrace/template
+++ b/srcpkgs/bpftrace/template
@@ -1,7 +1,7 @@
 # Template file for 'bpftrace'
 pkgname=bpftrace
 version=0.14.0
-revision=1
+revision=2
 archs="x86_64* aarch64* ppc64*"
 build_style=cmake
 configure_args="-DBUILD_TESTING=OFF"  # needs root to run

From b9480a39f10dd65784da715fe3f24f820bdbf2dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:38 +0200
Subject: [PATCH 10/18] clazy: rebuild for llvm13

---
 srcpkgs/clazy/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/clazy/template b/srcpkgs/clazy/template
index 606384470e98..859923e395eb 100644
--- a/srcpkgs/clazy/template
+++ b/srcpkgs/clazy/template
@@ -1,7 +1,7 @@
 # Template file for 'clazy'
 pkgname=clazy
 version=1.10
-revision=1
+revision=2
 build_style=cmake
 build_helper=qemu
 hostmakedepends="llvm"

From 601c981894fc267d2967a77950fb9419835c7d21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:49 +0200
Subject: [PATCH 11/18] ccls: rebuild for llvm13

---
 srcpkgs/ccls/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ccls/template b/srcpkgs/ccls/template
index fbb7c6847bc1..40aba3b55bfe 100644
--- a/srcpkgs/ccls/template
+++ b/srcpkgs/ccls/template
@@ -1,7 +1,7 @@
 # Template file for 'ccls'
 pkgname=ccls
 version=0.20210330
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="clang-tools-extra"
 makedepends="llvm ncurses-devel rapidjson zlib-devel clang-tools-extra"

From a456a5a77d21622625b6ff38ce7f4506fb1d9515 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:59:35 +0200
Subject: [PATCH 12/18] include-what-you-use: rebuild for llvm13

---
 srcpkgs/include-what-you-use/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/include-what-you-use/template b/srcpkgs/include-what-you-use/template
index b13bb7ee56af..b4b167401ebe 100644
--- a/srcpkgs/include-what-you-use/template
+++ b/srcpkgs/include-what-you-use/template
@@ -1,6 +1,6 @@
 # Template file for 'include-what-you-use'
 pkgname=include-what-you-use
-version=0.16
+version=0.17
 revision=1
 wrksrc="${pkgname}"
 build_style=cmake
@@ -12,7 +12,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="NCSA"
 homepage="https://include-what-you-use.org/"
 distfiles="https://include-what-you-use.org/downloads/${pkgname}-${version}.src.tar.gz"
-checksum=8d6fc9b255343bc1e5ec459e39512df1d51c60e03562985e0076036119ff5a1c
+checksum=eca7c04f8b416b6385ed00e33669a7fa4693cd26cb72b522cde558828eb0c665
 python_version=3
 
 post_install() {

From 9fcbd5b4a3ca50bd0069f7685c3c9064e804c41c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:59:55 +0200
Subject: [PATCH 13/18] mesa: rebuild for llvm13

---
 srcpkgs/mesa/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index 42bc12fbf877..b87239aca43f 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -1,7 +1,7 @@
 # Template file for 'mesa'
 pkgname=mesa
 version=21.3.2
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
  -Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled

From f9be9010851b13fadb2b25ac061cc0215ef16f52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:01:21 +0200
Subject: [PATCH 14/18] codelite: rebuild for llvm13

---
 srcpkgs/codelite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/codelite/template b/srcpkgs/codelite/template
index 3a993a2c0cfb..24e2c879dd45 100644
--- a/srcpkgs/codelite/template
+++ b/srcpkgs/codelite/template
@@ -1,7 +1,7 @@
 # Template file for 'codelite'
 pkgname=codelite
 version=15.0.6
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DWITH_PCH=0 -DWITH_WX_CONFIG=wx-config-gtk3

From 1aa336a8b1904c812042430020681c16d0db0944 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:22:48 +0200
Subject: [PATCH 15/18] kdevelop: rebuild for llvm13

---
 srcpkgs/kdevelop/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdevelop/template b/srcpkgs/kdevelop/template
index 3adc84273607..1660b3ce72ca 100644
--- a/srcpkgs/kdevelop/template
+++ b/srcpkgs/kdevelop/template
@@ -1,7 +1,7 @@
 # Template file for 'kdevelop'
 pkgname=kdevelop
 version=5.6.2
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools qt5-tools

From 0236ea90491af1a4deb546422436cfca3023346f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:23:07 +0200
Subject: [PATCH 16/18] juCi++: rebuild for llvm13

---
 srcpkgs/juCi++/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/juCi++/template b/srcpkgs/juCi++/template
index 1a7604b44a00..5103324dec20 100644
--- a/srcpkgs/juCi++/template
+++ b/srcpkgs/juCi++/template
@@ -1,7 +1,7 @@
 # Template file for 'juCi++'
 pkgname=juCi++
 version=1.6.2
-revision=2
+revision=3
 _libclangmm_commit="b342f4dd6de4fe509a692a4b4fcfc7e24aae9590"
 _tiny_commit="c9c8bf810ddad8cd17882b9a9ee628a690e779f5"
 wrksrc="jucipp-v${version}"

From 98e87296fa72cae94d47fae25b63add80b4e0d04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 17:47:49 +0200
Subject: [PATCH 17/18] common/shlibs: add libLTO.so and libRemarks.so for
 llvm12

---
 common/shlibs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index 56e7ab0a88aa..2b1666e30abb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4105,5 +4105,7 @@ libomptarget.rtl.x86_64.so libomp-13.0.0_1
 libarcher.so libomp-13.0.0_1
 libomptarget.so libomp-13.0.0_1
 liblldbIntelFeatures.so.13 lldb-13.0.0_1
+libLTO.so.12 llvm12-12.0.0_1
+libRemarks.so.12 llvm12-12.0.0_1
 libLTO.so.13 llvm13-13.0.0_1
 libRemarks.so.13 llvm13-13.0.0_1

From aaeeb3f809e7c28bf125cb107f552d4ad12a7bcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 18:30:01 +0200
Subject: [PATCH 18/18] llvm13: fix libomp* packages

---
 srcpkgs/llvm13/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/llvm13/template b/srcpkgs/llvm13/template
index 08d847472525..bfc91056d277 100644
--- a/srcpkgs/llvm13/template
+++ b/srcpkgs/llvm13/template
@@ -1,7 +1,7 @@
 # Template file for 'llvm13'
 pkgname=llvm13
 version=13.0.0
-revision=1
+revision=2
 wrksrc="llvm-project-${version}.src"
 build_wrksrc=llvm
 build_style=cmake
@@ -397,6 +397,7 @@ libomp_package() {
 	short_desc+=" - Clang OpenMP support library"
 	pkg_install() {
 		vmove usr/lib/libomp.so
+		vmove usr/lib/libomptarget.so
 		vmove "usr/lib/libomptarget.rtl.*.so"
 		vmove usr/lib/libarcher.so
 	}
@@ -406,7 +407,6 @@ libomp-devel_package() {
 	short_desc+=" - Clang OpenMP support library - development files"
 	depends="libomp>=${version}_${revision}"
 	pkg_install() {
-		vmove "usr/lib/libomp*.so"
 		vmove "usr/lib/libarcher*"
 		vmove "usr/include/omp*.h"
 		vmove "usr/lib/clang/${version}/include/omp*.h"

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
@ 2022-01-01 19:36 ` TeddyDD
  2022-01-16 12:52 ` [PR PATCH] [Updated] " DBLouis
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: TeddyDD @ 2022-01-01 19:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New comment by TeddyDD on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1003606937

Comment:
Related: #34649

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PR PATCH] [Updated] LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
  2022-01-01 19:36 ` TeddyDD
@ 2022-01-16 12:52 ` DBLouis
  2022-01-16 12:52 ` DBLouis
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: DBLouis @ 2022-01-16 12:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

There is an updated pull request by DBLouis against master on the void-packages repository

https://github.com/DBLouis/void-packages master
https://github.com/void-linux/void-packages/pull/34800

LLVM 13
This adds LLVM 13 and updates from LLVM 12.

*Work-in-progress*

The following packages need to be updated or patched:

- `beignet`
- `ispc`
- `qtcreator`

Rebuilt packages:

- `juCi++`
- `kdevelop`
- `codelite`
- `mesa`
- `include-what-you-use`
- `ccls`
- `clazy`
- `bpftrace`
- `qt5`
- `rtags`
- `shiboken2`
- `gnome-builder`
- `bcc`

A patch file from https://github.com/void-linux/void-packages/pull/34800.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-34800.patch --]
[-- Type: text/x-diff, Size: 120665 bytes --]

From db8bdd501ea6ea07d5efc8ca2cc2f1c02a7ce68b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:21:30 +0200
Subject: [PATCH 01/16] New package: llvm13-13.0.0

---
 common/shlibs                                 |  16 +-
 srcpkgs/clang                                 |   2 +-
 srcpkgs/clang-analyzer                        |   2 +-
 srcpkgs/clang-tools-extra                     |   2 +-
 srcpkgs/libclang                              |   2 +-
 srcpkgs/libclang-cpp                          |   2 +-
 srcpkgs/libcxx                                |   2 +-
 srcpkgs/libcxx-devel                          |   2 +-
 srcpkgs/libcxxabi                             |   2 +-
 srcpkgs/libcxxabi-devel                       |   2 +-
 srcpkgs/libllvm13                             |   1 +
 srcpkgs/libomp                                |   2 +-
 srcpkgs/libomp-devel                          |   2 +-
 srcpkgs/lld                                   |   2 +-
 srcpkgs/lld-devel                             |   2 +-
 srcpkgs/lldb                                  |   2 +-
 srcpkgs/lldb-devel                            |   2 +-
 srcpkgs/llvm-libunwind                        |   2 +-
 srcpkgs/llvm-libunwind-devel                  |   2 +-
 .../llvm13/files/llvm-Config-llvm-config.h    |   9 +
 ...clang-001-fix-unwind-chain-inclusion.patch |  44 ++
 .../patches/clang-002-add-musl-triples.patch  | 110 +++++
 .../clang-003-ppc64-dynamic-linker-path.patch |  13 +
 .../patches/clang-004-ppc64-musl-elfv2.patch  |  48 ++
 .../compiler-rt-aarch64-ucontext.patch        |  11 +
 .../compiler-rt-sanitizer-ppc64-musl.patch    |  35 ++
 .../patches/compiler-rt-xray-ppc64-musl.patch |  62 +++
 srcpkgs/llvm13/patches/libcxx-musl.patch      |  26 ++
 srcpkgs/llvm13/patches/libcxx-ppc.patch       |  22 +
 .../llvm13/patches/libcxx-ssp-nonshared.patch |  11 +
 srcpkgs/llvm13/patches/libcxxabi-dl.patch     |  25 ++
 srcpkgs/llvm13/patches/libunwind-ppc32.patch  |  63 +++
 srcpkgs/llvm13/patches/lldb-musl.patch        |  31 ++
 srcpkgs/llvm13/patches/llvm-001-musl.patch    |  57 +++
 .../patches/llvm-002-musl-ppc64-elfv2.patch   |  30 ++
 .../patches/llvm-003-ppc-secureplt.patch      |  11 +
 .../patches/llvm-004-override-opt.patch       |  18 +
 .../llvm13/patches/llvm-005-ppc-bigpic.patch  |  36 ++
 .../patches/llvm-006-aarch64-mf_exec.patch    |  25 ++
 .../llvm13/patches/ppc32-compiler-rt.patch    |  21 +
 srcpkgs/llvm13/template                       | 423 ++++++++++++++++++
 srcpkgs/llvm13/update                         |   3 +
 42 files changed, 1165 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libllvm13
 create mode 100644 srcpkgs/llvm13/files/llvm-Config-llvm-config.h
 create mode 100644 srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
 create mode 100644 srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-ppc.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
 create mode 100644 srcpkgs/llvm13/patches/libcxxabi-dl.patch
 create mode 100644 srcpkgs/llvm13/patches/libunwind-ppc32.patch
 create mode 100644 srcpkgs/llvm13/patches/lldb-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-001-musl.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-004-override-opt.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
 create mode 100644 srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
 create mode 100644 srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
 create mode 100644 srcpkgs/llvm13/template
 create mode 100644 srcpkgs/llvm13/update

diff --git a/common/shlibs b/common/shlibs
index d35944228287..2caea4173b52 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -970,11 +970,12 @@ libuchardet.so.0 uchardet-0.0.6_1
 libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
 libyajl.so.2 yajl-2.0.1_1
 libconfuse.so.2 confuse-3.2.1_1
-liblldb.so.12 lldb-12.0.0_1
-libclang.so.12 libclang-12.0.0_1
-libclang-cpp.so.12 libclang-cpp-12.0.0_1
+liblldb.so.13 lldb-13.0.0_1
+libclang.so.13 libclang-13.0.0_1
+libclang-cpp.so.13 libclang-cpp-13.0.0_1
 libLLVM-11.so libllvm11-11.0.0_1
 libLLVM-12.so libllvm12-12.0.0_1
+libLLVM-13.so libllvm13-13.0.0_1
 libisofs.so.6 libisofs-0.6.24_1
 libmpack.so.0 libmpack-1.0.5_1
 libGeoIP.so.1 libgeoip-1.4.8_1
@@ -4098,3 +4099,12 @@ libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
+libomp.so libomp-13.0.0_1
+libomptarget.rtl.amdgpu.so libomp-13.0.0_1
+libomptarget.rtl.cuda.so libomp-13.0.0_1
+libomptarget.rtl.x86_64.so libomp-13.0.0_1
+libarcher.so libomp-13.0.0_1
+libomptarget.so libomp-13.0.0_1
+liblldbIntelFeatures.so.13 lldb-13.0.0_1
+libLTO.so.13 llvm13-13.0.0_1
+libRemarks.so.13 llvm13-13.0.0_1
diff --git a/srcpkgs/clang b/srcpkgs/clang
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang
+++ b/srcpkgs/clang
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/clang-analyzer b/srcpkgs/clang-analyzer
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang-analyzer
+++ b/srcpkgs/clang-analyzer
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/clang-tools-extra b/srcpkgs/clang-tools-extra
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/clang-tools-extra
+++ b/srcpkgs/clang-tools-extra
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libclang b/srcpkgs/libclang
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libclang
+++ b/srcpkgs/libclang
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libclang-cpp b/srcpkgs/libclang-cpp
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libclang-cpp
+++ b/srcpkgs/libclang-cpp
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxx b/srcpkgs/libcxx
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxx
+++ b/srcpkgs/libcxx
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxx-devel b/srcpkgs/libcxx-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxx-devel
+++ b/srcpkgs/libcxx-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxxabi b/srcpkgs/libcxxabi
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxxabi
+++ b/srcpkgs/libcxxabi
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libcxxabi-devel b/srcpkgs/libcxxabi-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libcxxabi-devel
+++ b/srcpkgs/libcxxabi-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libllvm13 b/srcpkgs/libllvm13
new file mode 120000
index 000000000000..d6366d7d3b95
--- /dev/null
+++ b/srcpkgs/libllvm13
@@ -0,0 +1 @@
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libomp b/srcpkgs/libomp
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libomp
+++ b/srcpkgs/libomp
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/libomp-devel b/srcpkgs/libomp-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/libomp-devel
+++ b/srcpkgs/libomp-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lld b/srcpkgs/lld
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lld
+++ b/srcpkgs/lld
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lld-devel b/srcpkgs/lld-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lld-devel
+++ b/srcpkgs/lld-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lldb b/srcpkgs/lldb
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lldb
+++ b/srcpkgs/lldb
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/lldb-devel b/srcpkgs/lldb-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/lldb-devel
+++ b/srcpkgs/lldb-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm-libunwind b/srcpkgs/llvm-libunwind
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/llvm-libunwind
+++ b/srcpkgs/llvm-libunwind
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm-libunwind-devel b/srcpkgs/llvm-libunwind-devel
index cd60fd7a981b..d6366d7d3b95 120000
--- a/srcpkgs/llvm-libunwind-devel
+++ b/srcpkgs/llvm-libunwind-devel
@@ -1 +1 @@
-llvm12
\ No newline at end of file
+llvm13
\ No newline at end of file
diff --git a/srcpkgs/llvm13/files/llvm-Config-llvm-config.h b/srcpkgs/llvm13/files/llvm-Config-llvm-config.h
new file mode 100644
index 000000000000..2fa08c9be696
--- /dev/null
+++ b/srcpkgs/llvm13/files/llvm-Config-llvm-config.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
new file mode 100644
index 000000000000..e4eaa7783e7a
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-001-fix-unwind-chain-inclusion.patch
@@ -0,0 +1,44 @@
+From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
+From: Andrea Brancaleoni <miwaxe@gmail.com>
+Date: Tue, 8 Sep 2015 22:14:57 +0200
+Subject: [PATCH 2/7] fix unwind chain inclusion
+
+---
+ lib/Headers/unwind.h | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
+index 303d792..44e10cc 100644
+--- a/clang/lib/Headers/unwind.h
++++ b/clang/lib/Headers/unwind.h
+@@ -9,9 +9,6 @@
+ 
+ /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
+ 
+-#ifndef __CLANG_UNWIND_H
+-#define __CLANG_UNWIND_H
+-
+ #if defined(__APPLE__) && __has_include_next(<unwind.h>)
+ /* Darwin (from 11.x on) provide an unwind.h. If that's available,
+  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
+@@ -39,6 +36,9 @@
+ # endif
+ #else
+ 
++#ifndef __CLANG_UNWIND_H
++#define __CLANG_UNWIND_H
++
+ #include <stdint.h>
+ 
+ #ifdef __cplusplus
+@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
+ }
+ #endif
+ 
++#endif /* __CLANG_UNWIND_H */
++
+ #endif
+ 
+-#endif /* __CLANG_UNWIND_H */
+-- 
+2.5.1
diff --git a/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch b/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
new file mode 100644
index 000000000000..25688d40dbc2
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-002-add-musl-triples.patch
@@ -0,0 +1,110 @@
+--- a/clang/lib/Driver/ToolChains/Gnu.cpp
++++ b/clang/lib/Driver/ToolChains/Gnu.cpp
+@@ -2086,7 +2086,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+   static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
+                                              "armv7hl-redhat-linux-gnueabi",
+                                              "armv6hl-suse-linux-gnueabi",
+-                                             "armv7hl-suse-linux-gnueabi"};
++                                             "armv7hl-suse-linux-gnueabi",
++                                             "armv7l-linux-gnueabihf"};
+   static const char *const ARMebLibDirs[] = {"/lib"};
+   static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
+                                              "armeb-linux-androideabi"};
+@@ -2153,8 +2154,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+       "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
+   static const char *const PPCLELibDirs[] = {"/lib32", "/lib"};
+   static const char *const PPCLETriples[] = {"powerpcle-linux-gnu",
+-                                             "powerpcle-unknown-linux-gnu",
+-                                             "powerpcle-linux-musl"};
++                                             "powerpcle-unknown-linux-gnu"};
+ 
+   static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
+   static const char *const PPC64Triples[] = {
+@@ -2235,6 +2235,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+     return;
+   }
+ 
++  if (TargetTriple.isMusl()) {
++    static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"};
++    static const char *const ARMHFMuslTriples[] = {
++        "arm-linux-musleabihf", "armv7l-linux-musleabihf"
++    };
++    static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"};
++    static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"};
++    static const char *const X86MuslTriples[] = {"i686-linux-musl"};
++    static const char *const MIPSMuslTriples[] = {
++        "mips-linux-musl", "mipsel-linux-musl",
++        "mipsel-linux-muslhf", "mips-linux-muslhf"
++    };
++    static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"};
++    static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"};
++    static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"};
++    static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"};
++
++    switch (TargetTriple.getArch()) {
++    case llvm::Triple::aarch64:
++      LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
++      TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
++      BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
++      BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
++      break;
++    case llvm::Triple::arm:
++      LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
++      if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
++        TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
++      } else {
++        TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples));
++      }
++      break;
++    case llvm::Triple::x86_64:
++      LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
++      TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
++      BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs));
++      BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
++      break;
++    case llvm::Triple::x86:
++      LibDirs.append(begin(X86LibDirs), end(X86LibDirs));
++      TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
++      BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
++      BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
++      break;
++    case llvm::Triple::mips:
++      LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs));
++      TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples));
++      break;
++    case llvm::Triple::ppc:
++      LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
++      TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
++      BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
++      BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
++      break;
++    case llvm::Triple::ppcle:
++      LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
++      TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
++      BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
++      BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
++      break;
++    case llvm::Triple::ppc64:
++      LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
++      TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
++      BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
++      BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
++      break;
++    case llvm::Triple::ppc64le:
++      LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
++      TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
++      BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
++      BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
++      break;
++    default:
++      break;
++    }
++    TripleAliases.push_back(TargetTriple.str());
++    if (TargetTriple.str() != BiarchTriple.str())
++      BiarchTripleAliases.push_back(BiarchTriple.str());
++    return;
++  }
++
+   // Android targets should not use GNU/Linux tools or libraries.
+   if (TargetTriple.isAndroid()) {
+     static const char *const AArch64AndroidTriples[] = {
diff --git a/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
new file mode 100644
index 000000000000..4ad6412d1e6c
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-003-ppc64-dynamic-linker-path.patch
@@ -0,0 +1,13 @@
+--- a/clang/lib/Driver/ToolChains/Linux.cpp
++++ b/clang/lib/Driver/ToolChains/Linux.cpp
+@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+     Loader = "ld.so.1";
+     break;
+   case llvm::Triple::ppc64:
+-    LibDir = "lib64";
+-    Loader =
+-        (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
+-    break;
+   case llvm::Triple::ppc64le:
+     LibDir = "lib64";
+     Loader =
diff --git a/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
new file mode 100644
index 000000000000..21fc8003c5f1
--- /dev/null
+++ b/srcpkgs/llvm13/patches/clang-004-ppc64-musl-elfv2.patch
@@ -0,0 +1,48 @@
+--- a/clang/lib/Basic/Targets/PPC.h
++++ b/clang/lib/Basic/Targets/PPC.h
+@@ -415,11 +415,10 @@ public:
+       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
+     } else if ((Triple.getArch() == llvm::Triple::ppc64le)) {
+       DataLayout = "e-m:e-i64:64-n32:64";
+-      ABI = "elfv2";
+     } else {
+       DataLayout = "E-m:e-i64:64-n32:64";
+-      ABI = "elfv1";
+     }
++    ABI = "elfv2";
+ 
+     if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
+       LongDoubleWidth = LongDoubleAlign = 64;
+--- a/clang/lib/CodeGen/TargetInfo.cpp
++++ b/clang/lib/CodeGen/TargetInfo.cpp
+@@ -10927,9 +10927,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
+       return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true));
+ 
+     if (Triple.isOSBinFormatELF()) {
+-      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;
+-      if (getTarget().getABI() == "elfv2")
+-        Kind = PPC64_SVR4_ABIInfo::ELFv2;
++      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2;
++      if (getTarget().getABI() == "elfv1")
++        Kind = PPC64_SVR4_ABIInfo::ELFv1;
+       bool IsSoftFloat = CodeGenOpts.FloatABI == "soft";
+ 
+       return SetCGInfo(
+--- a/clang/lib/Driver/ToolChains/Clang.cpp
++++ b/clang/lib/Driver/ToolChains/Clang.cpp
+@@ -1920,14 +1920,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
+   const llvm::Triple &T = getToolChain().getTriple();
+   if (T.isOSBinFormatELF()) {
+     switch (getToolChain().getArch()) {
+-    case llvm::Triple::ppc64: {
+-      if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
+-          T.isOSOpenBSD() || T.isMusl())
+-        ABIName = "elfv2";
+-      else
+-        ABIName = "elfv1";
+-      break;
+-    }
++    case llvm::Triple::ppc64:
+     case llvm::Triple::ppc64le:
+       ABIName = "elfv2";
+       break;
diff --git a/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch b/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
new file mode 100644
index 000000000000..893c059d7b8d
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-aarch64-ucontext.patch
@@ -0,0 +1,11 @@
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp.orig
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+@@ -1799,7 +1799,7 @@
+ 
+ static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) {
+   static const u32 kEsrMagic = 0x45535201;
+-  u8 *aux = ucontext->uc_mcontext.__reserved;
++  u8 *aux = reinterpret_cast<u8 *>(ucontext->uc_mcontext.__reserved);
+   while (true) {
+     _aarch64_ctx *ctx = (_aarch64_ctx *)aux;
+     if (ctx->size == 0) break;
diff --git a/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch b/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
new file mode 100644
index 000000000000..35f16d24f340
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-sanitizer-ppc64-musl.patch
@@ -0,0 +1,35 @@
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+@@ -74,6 +74,10 @@
+ #include <sys/utsname.h>
+ #endif
+ 
++#if SANITIZER_LINUX && defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <sys/personality.h>
+ #endif
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+@@ -92,7 +92,7 @@
+ # include <utime.h>
+ # include <sys/ptrace.h>
+ #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
+-    SANITIZER_RISCV64
++    defined(__powerpc__) || SANITIZER_RISCV64
+ #  include <asm/ptrace.h>
+ #  ifdef __arm__
+ typedef struct user_fpregs elf_fpregset_t;
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+@@ -31,7 +31,7 @@
+ #include <sys/types.h> // for pid_t
+ #include <sys/uio.h> // for iovec
+ #include <elf.h> // for NT_PRSTATUS
+-#if (defined(__aarch64__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
++#if (defined(__aarch64__) || defined(__powerpc__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
+ // GLIBC 2.20+ sys/user does not include asm/ptrace.h
+ # include <asm/ptrace.h>
+ #endif
diff --git a/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
new file mode 100644
index 000000000000..d0b61c80c897
--- /dev/null
+++ b/srcpkgs/llvm13/patches/compiler-rt-xray-ppc64-musl.patch
@@ -0,0 +1,62 @@
+--- a/compiler-rt/lib/xray/xray_powerpc64.inc
++++ b/compiler-rt/lib/xray/xray_powerpc64.inc
+@@ -12,7 +12,13 @@
+ 
+ #include <cstdint>
+ #include <mutex>
++#ifdef __GLIBC__
+ #include <sys/platform/ppc.h>
++#else
++#include <cctype>
++#include <cstring>
++#include <cstdlib>
++#endif
+ 
+ #include "xray_defs.h"
+ 
+@@ -20,13 +26,45 @@ namespace __xray {
+ 
+ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
+   CPU = 0;
++#ifdef __GLIBC__
+   return __ppc_get_timebase();
++#else
++  return __builtin_ppc_get_timebase();
++#endif
+ }
+ 
+ inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
+   static std::mutex M;
+   std::lock_guard<std::mutex> Guard(M);
++#ifdef __GLIBC__
+   return __ppc_get_timebase_freq();
++#else
++  /* FIXME: a less dirty implementation? */
++  static uint64_t base;
++  if (!base) {
++    FILE *f = fopen("/proc/cpuinfo", "rb");
++    if (f) {
++      ssize_t nr;
++      /* virtually always big enough to hold the line */
++      char buf[512];
++      while (fgets(buf, sizeof(buf), f)) {
++        char *ret = strstr(buf, "timebase");
++        if (!ret) {
++          continue;
++        }
++        ret += sizeof("timebase") - 1;
++        ret = strchr(ret, ':');
++        if (!ret) {
++          continue;
++        }
++        base = strtoul(ret + 1, nullptr, 10);
++        break;
++      }
++      fclose(f);
++    }
++  }
++  return base;
++#endif
+ }
+ 
+ inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {
diff --git a/srcpkgs/llvm13/patches/libcxx-musl.patch b/srcpkgs/llvm13/patches/libcxx-musl.patch
new file mode 100644
index 000000000000..bbd31ffc2cb1
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-musl.patch
@@ -0,0 +1,26 @@
+--- a/libcxx/include/locale
++++ b/libcxx/include/locale
+@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++        long long __ll = strtoll(__a, &__p2, __base);
++#else
+         long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
+@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++        unsigned long long __ll = strtoull(__a, &__p2, __base);
++#else
+         unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
diff --git a/srcpkgs/llvm13/patches/libcxx-ppc.patch b/srcpkgs/llvm13/patches/libcxx-ppc.patch
new file mode 100644
index 000000000000..7a92f8004e1c
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-ppc.patch
@@ -0,0 +1,22 @@
+This ensures `is_iec559` is defined correctly under all long double ABIs,
+including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__`
+is not defined on gcc.
+
+--- a/libcxx/include/limits
++++ b/libcxx/include/limits
+@@ -426,8 +426,14 @@ protected:
+     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
+     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
+ 
+-#if (defined(__ppc__) || defined(__ppc64__))
++#if defined(__powerpc__) || defined(__powerpc64__)
++#if (__LDBL_MAX_EXP__ > __DBL_MAX_EXP__) || (__LDBL_MANT_DIG__ == __DBL_MANT_DIG__)
++    /* IEEE 754 quadruple or double precision */
++    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
++#else
++    /* 128-bit IBM double-double */
+     static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
++#endif
+ #else
+     static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
+ #endif
diff --git a/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch b/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
new file mode 100644
index 000000000000..70292beb2fcd
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxx-ssp-nonshared.patch
@@ -0,0 +1,11 @@
+--- a/libcxx/CMakeLists.txt
++++ b/libcxx/CMakeLists.txt
+@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
+     target_link_libraries(${target} PRIVATE atomic)
+   endif()
+ 
++#ssp  target_link_libraries(${target} PRIVATE ssp_nonshared)
++
+   if (MINGW)
+     target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
+   endif()
diff --git a/srcpkgs/llvm13/patches/libcxxabi-dl.patch b/srcpkgs/llvm13/patches/libcxxabi-dl.patch
new file mode 100644
index 000000000000..3a15f9db8c98
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libcxxabi-dl.patch
@@ -0,0 +1,25 @@
+Also link to -ldl to prevent undefined references.
+
+--- a/libcxxabi/src/CMakeLists.txt
++++ b/libcxxabi/src/CMakeLists.txt
+@@ -73,6 +73,7 @@
+   endif()
+ 
+   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
++  add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
+ endif()
+ 
+ if (LIBCXXABI_USE_LLVM_UNWINDER)
+--- a/libcxx/CMakeLists.txt
++++ b/libcxx/CMakeLists.txt
+@@ -745,6 +745,10 @@
+     target_link_libraries(${target} PRIVATE m)
+   endif()
+ 
++  if (LIBCXX_HAS_C_LIB)
++    target_link_libraries(${target} PRIVATE dl)
++  endif()
++
+   if (LIBCXX_HAS_RT_LIB)
+     target_link_libraries(${target} PRIVATE rt)
+   endif()
diff --git a/srcpkgs/llvm13/patches/libunwind-ppc32.patch b/srcpkgs/llvm13/patches/libunwind-ppc32.patch
new file mode 100644
index 000000000000..74aa7576ecf9
--- /dev/null
+++ b/srcpkgs/llvm13/patches/libunwind-ppc32.patch
@@ -0,0 +1,63 @@
+This fixes build at least with gcc9 which does not define `__ppc__`.
+
+--- a/libunwind/include/__libunwind_config.h
++++ b/libunwind/include/__libunwind_config.h
+@@ -49,7 +49,7 @@
+ #  define _LIBUNWIND_CONTEXT_SIZE 167
+ #  define _LIBUNWIND_CURSOR_SIZE 179
+ #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
+-# elif defined(__ppc__)
++# elif defined(__powerpc__)
+ #  define _LIBUNWIND_TARGET_PPC 1
+ #  define _LIBUNWIND_CONTEXT_SIZE 117
+ #  define _LIBUNWIND_CURSOR_SIZE 124
+--- a/libunwind/src/UnwindRegistersRestore.S
++++ b/libunwind/src/UnwindRegistersRestore.S
+@@ -392,7 +392,7 @@ Lnovec:
+   PPC64_LR(3)
+   bctr
+ 
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ 
+ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
+ //
+--- a/libunwind/src/UnwindRegistersSave.S
++++ b/libunwind/src/UnwindRegistersSave.S
+@@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
+   blr
+ 
+ 
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ 
+ //
+ // extern int unw_getcontext(unw_context_t* thread_state)
+--- a/libunwind/src/config.h
++++ b/libunwind/src/config.h
+@@ -95,12 +95,12 @@
+ #define _LIBUNWIND_BUILD_SJLJ_APIS
+ #endif
+ 
+-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__)
++#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__powerpc64__)
+ #define _LIBUNWIND_SUPPORT_FRAME_APIS
+ #endif
+ 
+ #if defined(__i386__) || defined(__x86_64__) ||                                \
+-    defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) ||        \
++    defined(__powerpc__) || defined(__powerpc64__) ||                          \
+     (!defined(__APPLE__) && defined(__arm__)) ||                               \
+     (defined(__arm64__) || defined(__aarch64__)) ||                            \
+     defined(__mips__)
+--- a/libunwind/src/libunwind.cpp
++++ b/libunwind/src/libunwind.cpp
+@@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor,
+ # define REGISTER_KIND Registers_x86_64
+ #elif defined(__powerpc64__)
+ # define REGISTER_KIND Registers_ppc64
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+ # define REGISTER_KIND Registers_ppc
+ #elif defined(__aarch64__)
+ # define REGISTER_KIND Registers_arm64
diff --git a/srcpkgs/llvm13/patches/lldb-musl.patch b/srcpkgs/llvm13/patches/lldb-musl.patch
new file mode 100644
index 000000000000..601c0d138523
--- /dev/null
+++ b/srcpkgs/llvm13/patches/lldb-musl.patch
@@ -0,0 +1,31 @@
+--- a/lldb/source/Plugins/Process/Linux/Procfs.h
++++ b/lldb/source/Plugins/Process/Linux/Procfs.h
+@@ -10,21 +10,12 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
+ 
+-#ifdef __ANDROID__
+-#if defined(__arm64__) || defined(__aarch64__)
+-typedef unsigned long elf_greg_t;
+-typedef elf_greg_t
+-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
+-typedef struct user_fpsimd_state elf_fpregset_t;
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#elif defined(__mips__)
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#endif
+-#else // __ANDROID__
++#if !defined(__GLIBC__) && defined(__powerpc__)
++#define pt_regs musl_pt_regs
++#include <sys/procfs.h>
++#undef pt_regs
++#else
+ #include <sys/procfs.h>
+-#endif // __ANDROID__
++#endif
diff --git a/srcpkgs/llvm13/patches/llvm-001-musl.patch b/srcpkgs/llvm13/patches/llvm-001-musl.patch
new file mode 100644
index 000000000000..f2a3f8d62813
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-001-musl.patch
@@ -0,0 +1,57 @@
+From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
+From: Andrea Brancaleoni <miwaxe@gmail.com>
+Date: Tue, 8 Sep 2015 22:03:02 +0200
+Subject: [PATCH 3/3] musl
+
+---
+ include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
+ lib/Support/DynamicLibrary.cpp            | 2 +-
+ lib/Support/Unix/Signals.inc              | 6 +++---
+ utils/unittest/googletest/src/gtest.cc    | 1 +
+ 5 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
+index 34a8a1e3..1214ece5 100644
+--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+@@ -18,6 +18,15 @@
+ #include "llvm/IR/PassManager.h"
+ #include "llvm/Pass.h"
+ 
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++
+ namespace llvm {
+ template <typename T> class ArrayRef;
+ class Triple;
+diff --git a/lib/Support/Unix/DynamicLibrary.inc b/lib/Support/Unix/DynamicLibrary.inc
+index a2a37996..2f86c470 100644
+--- a/llvm/lib/Support/Unix/DynamicLibrary.inc
++++ b/llvm/lib/Support/Unix/DynamicLibrary.inc
+@@ -102,7 +102,7 @@ static void *DoSearch(const char* SymbolName) {
+ 
+ // This macro returns the address of a well-known, explicit symbol
+ #define EXPLICIT_SYMBOL(SYM) \
+-   if (!strcmp(SymbolName, #SYM)) return &SYM
++   if (!strcmp(SymbolName, #SYM)) return (void *)&SYM
+ 
+ // Under glibc we have a weird situation. The stderr/out/in symbols are both
+ // macros and global variables because of standards requirements. So, we
+diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
+index d882ab2e..f1fb12d0 100644
+--- a/llvm/utils/unittest/googletest/src/gtest.cc
++++ b/llvm/utils/unittest/googletest/src/gtest.cc
+@@ -128,6 +128,7 @@
+ 
+ #if GTEST_CAN_STREAM_RESULTS_
+ # include <arpa/inet.h>  // NOLINT
++# include <sys/socket.h>  // NOLINT
+ # include <netdb.h>  // NOLINT
+ # include <sys/socket.h>  // NOLINT
+ # include <sys/types.h>  // NOLINT
diff --git a/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch b/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
new file mode 100644
index 000000000000..0071d964bd37
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-002-musl-ppc64-elfv2.patch
@@ -0,0 +1,30 @@
+This patches LLVM to use ELFv2 on ppc64 unconditionally unless overridden. We
+need this because unlike most distros we use ELFv2 for both glibc and musl
+on big endian ppc64.
+
+diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
+index 0634833e..b7cbc2e7 100644
+--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -222,9 +222,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
+ 
+   switch (TT.getArch()) {
+   case Triple::ppc64le:
+-    return PPCTargetMachine::PPC_ABI_ELFv2;
+   case Triple::ppc64:
+-    return PPCTargetMachine::PPC_ABI_ELFv1;
++    return PPCTargetMachine::PPC_ABI_ELFv2;
+   default:
+     return PPCTargetMachine::PPC_ABI_UNKNOWN;
+   }
+diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+index 8b1cf6b5..296a2afa 100644
+--- a/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
++++ b/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+@@ -1,4 +1,5 @@
+-; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
diff --git a/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch b/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
new file mode 100644
index 000000000000..b5d15974375d
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-003-ppc-secureplt.patch
@@ -0,0 +1,11 @@
+--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
++++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+@@ -165,7 +165,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
+ 
+   if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) ||
+       TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
+-      TargetTriple.isMusl())
++      isTargetLinux())
+     SecurePlt = true;
+ 
+   if (HasSPE && IsPPC64)
diff --git a/srcpkgs/llvm13/patches/llvm-004-override-opt.patch b/srcpkgs/llvm13/patches/llvm-004-override-opt.patch
new file mode 100644
index 000000000000..51d0e4b31b32
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-004-override-opt.patch
@@ -0,0 +1,18 @@
+This allows us to override the optimization level as not all platforms can
+deal with -O3.
+
+--- a/llvm/CMakeLists.txt
++++ b/llvm/CMakeLists.txt
+@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
+   llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
+ endif()
+ 
++set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
++
++if (NOT VOID_CXX_OPT_FLAGS STREQUAL "")
++    llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
++endif()
++
+ # Put this before tblgen. Else we have a circular dependence.
+ add_subdirectory(lib/Demangle)
+ add_subdirectory(lib/Support)
diff --git a/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch b/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
new file mode 100644
index 000000000000..d332687b9d92
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-005-ppc-bigpic.patch
@@ -0,0 +1,36 @@
+From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 10:57:27 -0600
+Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
+
+---
+ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp  | 2 +-
+ llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
+index cce21f32..87ca5f9b 100644
+--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
++++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+@@ -520,7 +520,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
+ 
+   // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
+   if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
+-      M->getPICLevel() == PICLevel::BigPIC)
++      M->getPICLevel() != PICLevel::SmallPIC)
+     TlsRef = MCBinaryExpr::createAdd(
+         TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
+   const MachineOperand &MO = MI->getOperand(2);
+diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp
+index 5cc180d7..a5b02565 100644
+--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
++++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+@@ -117,7 +117,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
+   const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
+   // If -msecure-plt -fPIC, add 32768 to symbol.
+   if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
+-      M->getPICLevel() == PICLevel::BigPIC &&
++      M->getPICLevel() != PICLevel::SmallPIC &&
+       MO.getTargetFlags() == PPCII::MO_PLT)
+     Expr =
+         MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
diff --git a/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch b/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
new file mode 100644
index 000000000000..a00abd216665
--- /dev/null
+++ b/srcpkgs/llvm13/patches/llvm-006-aarch64-mf_exec.patch
@@ -0,0 +1,25 @@
+Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
+
+    Failing Tests (8):
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
+        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
+
+Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
+
+--- a/llvm/lib/Support/Unix/Memory.inc
++++ b/llvm/lib/Support/Unix/Memory.inc
+@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) {
+     return PROT_READ | PROT_WRITE | PROT_EXEC;
+   case llvm::sys::Memory::MF_EXEC:
+ #if (defined(__FreeBSD__) || defined(__POWERPC__) || defined (__ppc__) || \
+-     defined(_POWER) || defined(_ARCH_PPC))
++     defined(_POWER) || defined(_ARCH_PPC) || (defined(__linux__) && defined(__aarch64__)))
+     // On PowerPC, having an executable page that has no read permission
+     // can have unintended consequences.  The function InvalidateInstruction-
+     // Cache uses instructions dcbf and icbi, both of which are treated by
diff --git a/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch b/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
new file mode 100644
index 000000000000..8e0a9a779d1b
--- /dev/null
+++ b/srcpkgs/llvm13/patches/ppc32-compiler-rt.patch
@@ -0,0 +1,21 @@
+commit ba4ede595ff9599232f5dd2b4384c243137b53fc
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Tue Jun 22 23:40:54 2021 +0200
+
+    enable compiler-rt support for ppc32
+
+diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
+index 1edab43..5c0c8a2 100644
+--- a/compiler-rt/cmake/base-config-ix.cmake
++++ b/compiler-rt/cmake/base-config-ix.cmake
+@@ -182,9 +182,7 @@ macro(test_targets)
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le")
+       test_target_arch(powerpc64le "" "-m64")
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
+-      if(CMAKE_SYSTEM_NAME MATCHES "AIX")
+-        test_target_arch(powerpc "" "-m32")
+-      endif()
++      test_target_arch(powerpc "" "-m32")
+       test_target_arch(powerpc64 "" "-m64")
+     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x")
+       test_target_arch(s390x "" "")
diff --git a/srcpkgs/llvm13/template b/srcpkgs/llvm13/template
new file mode 100644
index 000000000000..08d847472525
--- /dev/null
+++ b/srcpkgs/llvm13/template
@@ -0,0 +1,423 @@
+# Template file for 'llvm13'
+pkgname=llvm13
+version=13.0.0
+revision=1
+wrksrc="llvm-project-${version}.src"
+build_wrksrc=llvm
+build_style=cmake
+configure_args="
+ -DCMAKE_BUILD_TYPE=Release -Wno-dev
+ -DENABLE_LINKER_BUILD_ID=YES
+ -DLLDB_USE_SYSTEM_SIX=YES
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES
+ -DLIBCXXABI_USE_LLVM_UNWINDER=YES
+ -DLIBCXXABI_ENABLE_STATIC_UNWINDER=YES
+ -DLIBOMP_ENABLE_SHARED=YES
+ -DLIBOMP_INSTALL_ALIASES=NO
+ -DLLVM_INCLUDE_DOCS=YES
+ -DLLVM_BUILD_DOCS=YES
+ -DLLVM_ENABLE_SPHINX=YES
+ -DSPHINX_WARNINGS_AS_ERRORS=NO
+ -DLLVM_INSTALL_UTILS=YES
+ -DLLVM_BUILD_LLVM_DYLIB=YES
+ -DLLVM_LINK_LLVM_DYLIB=YES
+ -DLLVM_ENABLE_RTTI=YES
+ -DLLVM_ENABLE_FFI=YES
+ -DLLVM_BINUTILS_INCDIR=/usr/include"
+hostmakedepends="perl python3 zlib-devel libffi-devel swig python3-Sphinx
+ python3-recommonmark python3-sphinx-automodapi"
+makedepends="python3-devel zlib-devel elfutils-devel libffi-devel libedit-devel
+ libxml2-devel binutils-devel libatomic-devel"
+depends="libllvm13>=${version}_${revision}"
+short_desc="Low Level Virtual Machine"
+maintainer="q66 <daniel@octaforge.org>"
+license="Apache-2.0"
+homepage="https://www.llvm.org"
+distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-project-${version}.src.tar.xz"
+checksum=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3
+lib32disabled=yes
+python_version=3
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
+	makedepends+=" libexecinfo-devel"
+	depends+=" libexecinfo-devel"
+fi
+
+# "operand out of range" assembler failures
+case "$XBPS_TARGET_MACHINE" in
+	ppc64*) ;;
+	ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
+esac
+
+_enabled_projects="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;libunwind;lld"
+
+_lldb_enable=yes
+_libomp_enable=no
+
+case "$XBPS_TARGET_MACHINE" in
+	ppc64le*) ;;
+	ppc*|i686*) _lldb_enable=no ;;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|ppc64*) _libomp_enable=yes;;
+esac
+
+subpackages="clang-tools-extra"
+
+# must go before clang
+if [ "$_libomp_enable" = "yes" ]; then
+	_enabled_projects+=";openmp"
+	subpackages+=" libomp libomp-devel"
+	# because of cmake nonsense referencing libomptarget.so.*
+	depends+=" libomp>=${version}_${revision}"
+fi
+
+subpackages+=" clang clang-analyzer libclang libclang-cpp
+ llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel
+ libcxxabi libcxxabi-devel libllvm13"
+
+if [ "$_lldb_enable" = "yes" ]; then
+	# XXX fails to cross compile due to python
+	_enabled_projects+=";lldb"
+	subpackages+=" lldb lldb-devel"
+fi
+
+subpackages+=" lld lld-devel"
+
+configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
+
+post_patch() {
+	if [ "$_lldb_enable" = "yes" ]; then
+		if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+			vsed -i 's|__ptrace_request|int|g' \
+				${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+		fi
+		# disable docs for lldb as they fail to generate
+		vsed -i '/add_subdirectory(docs)/d' \
+			${wrksrc}/lldb/CMakeLists.txt
+	fi
+
+	# update config.guess for better platform detection
+	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
+		${wrksrc}/llvm/cmake
+
+	# fix linker failures on some archs
+	vsed -i 's,check_library_exists(gcc_s .*,set(LIBCXXABI_HAS_GCC_S_LIB ON),' \
+		${wrksrc}/libcxxabi/cmake/config-ix.cmake
+	vsed -i 's,check_library_exists(gcc .*,set(LIBCXXABI_HAS_GCC_LIB ON),' \
+		${wrksrc}/libcxxabi/cmake/config-ix.cmake
+
+	# need libssp_nonshared on some musl platforms (because of nodefaultlibs)
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*) ;;
+		ppc*-musl|i686-musl|mips*-musl)
+			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
+				${wrksrc}/libunwind/src/CMakeLists.txt
+			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
+				${wrksrc}/libcxxabi/src/CMakeLists.txt
+			vsed -i 's,#ssp,,' ${wrksrc}/libcxx/CMakeLists.txt
+			;;
+	esac
+
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64-musl) # some sanitizer currently only on x86_64 stuff needs backtrace
+			vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \
+				${wrksrc}/compiler-rt/CMakeLists.txt
+			;;
+		arm*-musl|i686-musl) # sanitizer code is broken since it duplicates some libc bits
+			vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \
+				${wrksrc}/compiler-rt/cmake/config-ix.cmake
+			;;
+	esac
+}
+
+pre_configure() {
+	local triplet
+
+	# Vastly reduce size of debugging symbols:
+	CFLAGS=${CFLAGS/ -g/ -g1}
+	CXXFLAGS=${CXXFLAGS/ -g/ -g1}
+
+	# since gcc9, the build likes to blow up for ppc32 apparently because
+	# of clang being too large for a 24-bit relative call to the PLT, so
+	# optimize for size instead
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*) ;;
+		mips*-musl|ppc*) configure_args+=" -DVOID_CXX_OPT_FLAGS=-Os" ;;
+	esac
+
+	if [ "$CROSS_BUILD" ]; then
+		msg_normal "Building host tblgen\n"
+		mkdir -p build/HOST
+		cd build/HOST
+		CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
+			CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
+			cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+			-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
+		make ${makejobs} -C utils/TableGen
+		make ${makejobs} -C tools/clang/utils/TableGen
+		[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
+		configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
+		configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/clang-tblgen"
+		[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
+		cd ../..
+	fi
+
+	case "$XBPS_TARGET_MACHINE" in
+		i686*) _arch="X86";;
+		x86_64*) _arch="X86";;
+		armv5*) _arch="Armv5te";;
+		armv6*) _arch="Armv6";;
+		armv7*) _arch="Armv7";;
+		aarch64*) _arch="AArch64";;
+		mips*) _arch="Mips";;
+		ppc*) _arch="PowerPC";;
+		riscv64*) _arch="RISCV64";;
+	esac
+
+	triplet=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}
+
+	configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
+	configure_args+=" -DLLVM_HOST_TRIPLE=${triplet}"
+	configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${triplet}"
+}
+
+do_install() {
+	cd build
+	cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
+
+	# Required for multilib.
+	if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+		for _header in llvm-config; do
+			mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
+			vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
+				usr/include/llvm/Config ${_header}.h
+		done
+	fi
+
+	# Remove llvm-config-host in cross builds.
+	if [ "$CROSS_BUILD" ]; then
+		rm -f ${DESTDIR}/usr/bin/llvm-config-host
+	fi
+
+	# Install libcxxabi headers
+	vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
+	vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
+
+	# Install libunwind headers
+	vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/unwind.h 644 usr/include
+	vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
+		644 usr/include/mach-o
+}
+
+clang-analyzer_package() {
+	pycompile_dirs="usr/share/scan-view"
+	depends="clang-${version}_${revision} python3 perl"
+	short_desc+=" - A source code analysis framework"
+	homepage="https://clang-analyzer.llvm.org/"
+	pkg_install() {
+		vmove usr/share/man/man1/scan-build.1
+		vmove "/usr/bin/scan-*"
+		vmove "/usr/share/scan-*"
+		vmove "/usr/libexec/*analyzer"
+	}
+}
+
+clang-tools-extra_package() {
+	lib32disabled=yes
+	depends="clang-${version}_${revision} python3"
+	short_desc+=" - Extra Clang tools"
+	homepage="https://clang.llvm.org/extra/"
+	pkg_install() {
+		vmove usr/include/clang-tidy
+		vmove usr/bin/clang-apply-replacements
+		vmove usr/bin/clang-query
+		vmove usr/bin/clang-rename
+		vmove usr/bin/clang-tidy
+		vmove usr/bin/diagtool
+		vmove usr/bin/find-all-symbols
+		vmove usr/bin/hmaptool
+		vmove usr/bin/modularize
+		vmove usr/bin/pp-trace
+		vmove usr/bin/sancov
+		vmove "usr/lib/libclangApplyReplacements*"
+		vmove "usr/lib/libclangQuery*"
+		vmove "usr/lib/libclangTidy*"
+		vmove "usr/share/clang/*tidy*"
+		vmove usr/share/doc/clang-tools
+		vmove usr/share/man/man1/extraclangtools.1
+		vmove usr/share/man/man1/diagtool.1
+	}
+}
+
+clang_package() {
+	lib32disabled=yes
+	depends="libstdc++-devel libgcc-devel  binutils ${XBPS_TARGET_LIBC}-devel
+	 libclang-${version}_${revision}"
+	short_desc+=" - C language family frontend"
+	homepage="https://clang.llvm.org/"
+	pkg_install() {
+		vmove usr/include/clang
+		vmove usr/include/clang-c
+		vmove "usr/bin/*clang*"
+		vmove usr/bin/c-index-test
+		vmove usr/lib/clang
+		vmove usr/lib/cmake/clang
+		vmove "usr/lib/libclang*.a"
+		vmove "usr/lib/libclang*.so"
+		vmove usr/share/clang
+		vmove usr/share/doc/clang
+		vmove usr/share/man/man1/clang.1
+	}
+}
+
+libclang_package() {
+	short_desc+=" - C frontend runtime library"
+	pkg_install() {
+		vmove "usr/lib/libclang.so.*"
+	}
+}
+
+libclang-cpp_package() {
+	short_desc+=" - C frontend runtime library (C++ interface)"
+	pkg_install() {
+		vmove "usr/lib/libclang-cpp.so.*"
+	}
+}
+
+lld_package() {
+	lib32disabled=yes
+	short_desc+=" - linker"
+	homepage="https://lld.llvm.org"
+	pkg_install() {
+		vmove usr/bin/lld*
+		vmove usr/bin/wasm-ld
+		vmove usr/bin/ld.lld*
+		vmove usr/bin/ld64.lld*
+		vmove usr/share/doc/lld
+	}
+}
+
+lld-devel_package() {
+	lib32disabled=yes
+	short_desc+=" - linker - development files"
+	homepage="https://lld.llvm.org"
+	depends="lld>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/lld
+		vmove usr/lib/cmake/lld
+		vmove "usr/lib/liblld*a"
+	}
+}
+
+lldb_package() {
+	lib32disabled=yes
+	depends+=" python3-six"
+	short_desc+=" - LLDB debugger"
+	homepage="https://lldb.llvm.org/"
+	pkg_install() {
+		vmove usr/bin/*lldb*
+		vmove usr/lib/liblldb*so.*
+		vmove /usr/lib/python*
+	}
+}
+
+lldb-devel_package() {
+	lib32disabled=yes
+	depends="lldb>=${version}_${revision}"
+	short_desc+=" - LLDB debugger - development files"
+	pkg_install() {
+		vmove usr/include/lldb
+		vmove "usr/lib/liblldb*.so"
+	}
+}
+
+llvm-libunwind_package() {
+	short_desc+=" - libunwind"
+	pkg_install() {
+		vmove "usr/lib/libunwind.so.*"
+	}
+}
+
+llvm-libunwind-devel_package() {
+	short_desc+=" - libunwind - development files"
+	depends="llvm-libunwind>=${version}_${revision}"
+	conflicts="libunwind-devel>=0"
+	pkg_install() {
+		vmove usr/lib/libunwind.so
+		vmove usr/lib/libunwind.a
+		vmove "usr/include/*unwind*"
+		vmove usr/include/mach-o
+		vmove usr/share/doc/libunwind
+	}
+}
+
+libcxxabi_package() {
+	short_desc+=" - low level support for libc++"
+	pkg_install() {
+		vmove "usr/lib/libc++abi.so.*"
+	}
+}
+
+libcxxabi-devel_package() {
+	short_desc+=" - low level support for libc++ - development files"
+	depends="libcxxabi>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libc++abi.so
+		vmove usr/lib/libc++abi.a
+		vmove "usr/include/*cxxabi*"
+	}
+}
+
+libcxx_package() {
+	short_desc+=" - C++ standard library"
+	pkg_install() {
+		vmove "usr/lib/libc++.so.*"
+	}
+}
+
+libcxx-devel_package() {
+	short_desc+=" - C++ standard library - development files"
+	depends="libcxx>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libc++.so
+		vmove usr/lib/libc++.a
+		vmove usr/lib/libc++experimental.a
+		vmove usr/include/c++
+		vmove usr/share/doc/libcxx
+	}
+}
+
+libomp_package() {
+	short_desc+=" - Clang OpenMP support library"
+	pkg_install() {
+		vmove usr/lib/libomp.so
+		vmove "usr/lib/libomptarget.rtl.*.so"
+		vmove usr/lib/libarcher.so
+	}
+}
+
+libomp-devel_package() {
+	short_desc+=" - Clang OpenMP support library - development files"
+	depends="libomp>=${version}_${revision}"
+	pkg_install() {
+		vmove "usr/lib/libomp*.so"
+		vmove "usr/lib/libarcher*"
+		vmove "usr/include/omp*.h"
+		vmove "usr/lib/clang/${version}/include/omp*.h"
+		vmove usr/share/man/man1/llvmopenmp.1
+		vmove usr/share/doc/openmp
+	}
+}
+
+libllvm13_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/libLLVM-*.so*"
+	}
+}
diff --git a/srcpkgs/llvm13/update b/srcpkgs/llvm13/update
new file mode 100644
index 000000000000..e95cf26b3586
--- /dev/null
+++ b/srcpkgs/llvm13/update
@@ -0,0 +1,3 @@
+site="https://github.com/llvm/llvm-project/releases"
+pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
+ignore="*-rc*"

From 3fbd1c4d361468895ed8dd675d8eaf5d1248c803 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:23:17 +0200
Subject: [PATCH 02/16] llvm: update to 13.0.0

---
 srcpkgs/llvm/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template
index a92db6f94f9f..bcfee82098ff 100644
--- a/srcpkgs/llvm/template
+++ b/srcpkgs/llvm/template
@@ -1,10 +1,10 @@
 # Template file for 'llvm'
 pkgname=llvm
-version=12.0.0
+version=13.0.0
 revision=1
 build_style=meta
-depends="llvm12"
-replaces="llvm11>=0 llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0"
+depends="llvm13"
+replaces="llvm12>=0 llvm11>=0 llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0"
 short_desc="LLVM meta package"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="Public Domain"

From 47d7ba52b7b7411d152d5438764d88f01bf6d244 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Fri, 31 Dec 2021 16:43:56 +0200
Subject: [PATCH 03/16] llvm12: remove clang parts

---
 ...clang-001-fix-unwind-chain-inclusion.patch |  44 ---
 .../patches/clang-002-add-musl-triples.patch  | 110 -------
 .../clang-003-ppc64-dynamic-linker-path.patch |  13 -
 .../patches/clang-004-ppc64-musl-elfv2.patch  |  48 ---
 .../compiler-rt-aarch64-ucontext.patch        |  11 -
 .../compiler-rt-sanitizer-ppc64-musl.patch    |  35 --
 .../llvm12/patches/compiler-rt-size_t.patch   |  10 -
 .../patches/compiler-rt-xray-ppc64-musl.patch |  62 ----
 srcpkgs/llvm12/patches/libcxx-musl.patch      |  26 --
 srcpkgs/llvm12/patches/libcxx-ppc.patch       |  22 --
 .../llvm12/patches/libcxx-ssp-nonshared.patch |  11 -
 srcpkgs/llvm12/patches/libcxxabi-dl.patch     |  25 --
 srcpkgs/llvm12/patches/libunwind-ppc32.patch  |  63 ----
 srcpkgs/llvm12/patches/lldb-musl.patch        |  31 --
 .../llvm12/patches/ppc32-compiler-rt.patch    |  21 --
 srcpkgs/llvm12/template                       | 301 +-----------------
 16 files changed, 1 insertion(+), 832 deletions(-)
 delete mode 100644 srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
 delete mode 100644 srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-size_t.patch
 delete mode 100644 srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-ppc.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
 delete mode 100644 srcpkgs/llvm12/patches/libcxxabi-dl.patch
 delete mode 100644 srcpkgs/llvm12/patches/libunwind-ppc32.patch
 delete mode 100644 srcpkgs/llvm12/patches/lldb-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/ppc32-compiler-rt.patch

diff --git a/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
deleted file mode 100644
index e4eaa7783e7a..000000000000
--- a/srcpkgs/llvm12/patches/clang-001-fix-unwind-chain-inclusion.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
-From: Andrea Brancaleoni <miwaxe@gmail.com>
-Date: Tue, 8 Sep 2015 22:14:57 +0200
-Subject: [PATCH 2/7] fix unwind chain inclusion
-
----
- lib/Headers/unwind.h | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
-index 303d792..44e10cc 100644
---- a/clang/lib/Headers/unwind.h
-+++ b/clang/lib/Headers/unwind.h
-@@ -9,9 +9,6 @@
- 
- /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
- 
--#ifndef __CLANG_UNWIND_H
--#define __CLANG_UNWIND_H
--
- #if defined(__APPLE__) && __has_include_next(<unwind.h>)
- /* Darwin (from 11.x on) provide an unwind.h. If that's available,
-  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
-@@ -39,6 +36,9 @@
- # endif
- #else
- 
-+#ifndef __CLANG_UNWIND_H
-+#define __CLANG_UNWIND_H
-+
- #include <stdint.h>
- 
- #ifdef __cplusplus
-@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
- }
- #endif
- 
-+#endif /* __CLANG_UNWIND_H */
-+
- #endif
- 
--#endif /* __CLANG_UNWIND_H */
--- 
-2.5.1
diff --git a/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch b/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
deleted file mode 100644
index 25688d40dbc2..000000000000
--- a/srcpkgs/llvm12/patches/clang-002-add-musl-triples.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- a/clang/lib/Driver/ToolChains/Gnu.cpp
-+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
-@@ -2086,7 +2086,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-   static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
-                                              "armv7hl-redhat-linux-gnueabi",
-                                              "armv6hl-suse-linux-gnueabi",
--                                             "armv7hl-suse-linux-gnueabi"};
-+                                             "armv7hl-suse-linux-gnueabi",
-+                                             "armv7l-linux-gnueabihf"};
-   static const char *const ARMebLibDirs[] = {"/lib"};
-   static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
-                                              "armeb-linux-androideabi"};
-@@ -2153,8 +2154,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-       "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
-   static const char *const PPCLELibDirs[] = {"/lib32", "/lib"};
-   static const char *const PPCLETriples[] = {"powerpcle-linux-gnu",
--                                             "powerpcle-unknown-linux-gnu",
--                                             "powerpcle-linux-musl"};
-+                                             "powerpcle-unknown-linux-gnu"};
- 
-   static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
-   static const char *const PPC64Triples[] = {
-@@ -2235,6 +2235,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
-     return;
-   }
- 
-+  if (TargetTriple.isMusl()) {
-+    static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"};
-+    static const char *const ARMHFMuslTriples[] = {
-+        "arm-linux-musleabihf", "armv7l-linux-musleabihf"
-+    };
-+    static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"};
-+    static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"};
-+    static const char *const X86MuslTriples[] = {"i686-linux-musl"};
-+    static const char *const MIPSMuslTriples[] = {
-+        "mips-linux-musl", "mipsel-linux-musl",
-+        "mipsel-linux-muslhf", "mips-linux-muslhf"
-+    };
-+    static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"};
-+    static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"};
-+    static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"};
-+    static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"};
-+
-+    switch (TargetTriple.getArch()) {
-+    case llvm::Triple::aarch64:
-+      LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
-+      TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
-+      BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs));
-+      BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples));
-+      break;
-+    case llvm::Triple::arm:
-+      LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
-+      if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
-+        TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
-+      } else {
-+        TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples));
-+      }
-+      break;
-+    case llvm::Triple::x86_64:
-+      LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
-+      TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
-+      BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs));
-+      BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
-+      break;
-+    case llvm::Triple::x86:
-+      LibDirs.append(begin(X86LibDirs), end(X86LibDirs));
-+      TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples));
-+      BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs));
-+      BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples));
-+      break;
-+    case llvm::Triple::mips:
-+      LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs));
-+      TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples));
-+      break;
-+    case llvm::Triple::ppc:
-+      LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
-+      TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
-+      BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
-+      BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
-+      break;
-+    case llvm::Triple::ppcle:
-+      LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
-+      TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
-+      BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
-+      BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
-+      break;
-+    case llvm::Triple::ppc64:
-+      LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs));
-+      TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples));
-+      BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs));
-+      BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples));
-+      break;
-+    case llvm::Triple::ppc64le:
-+      LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs));
-+      TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples));
-+      BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs));
-+      BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples));
-+      break;
-+    default:
-+      break;
-+    }
-+    TripleAliases.push_back(TargetTriple.str());
-+    if (TargetTriple.str() != BiarchTriple.str())
-+      BiarchTripleAliases.push_back(BiarchTriple.str());
-+    return;
-+  }
-+
-   // Android targets should not use GNU/Linux tools or libraries.
-   if (TargetTriple.isAndroid()) {
-     static const char *const AArch64AndroidTriples[] = {
diff --git a/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
deleted file mode 100644
index 4ad6412d1e6c..000000000000
--- a/srcpkgs/llvm12/patches/clang-003-ppc64-dynamic-linker-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/clang/lib/Driver/ToolChains/Linux.cpp
-+++ b/clang/lib/Driver/ToolChains/Linux.cpp
-@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
-     Loader = "ld.so.1";
-     break;
-   case llvm::Triple::ppc64:
--    LibDir = "lib64";
--    Loader =
--        (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
--    break;
-   case llvm::Triple::ppc64le:
-     LibDir = "lib64";
-     Loader =
diff --git a/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
deleted file mode 100644
index 21fc8003c5f1..000000000000
--- a/srcpkgs/llvm12/patches/clang-004-ppc64-musl-elfv2.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/clang/lib/Basic/Targets/PPC.h
-+++ b/clang/lib/Basic/Targets/PPC.h
-@@ -415,11 +415,10 @@ public:
-       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
-     } else if ((Triple.getArch() == llvm::Triple::ppc64le)) {
-       DataLayout = "e-m:e-i64:64-n32:64";
--      ABI = "elfv2";
-     } else {
-       DataLayout = "E-m:e-i64:64-n32:64";
--      ABI = "elfv1";
-     }
-+    ABI = "elfv2";
- 
-     if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
-       LongDoubleWidth = LongDoubleAlign = 64;
---- a/clang/lib/CodeGen/TargetInfo.cpp
-+++ b/clang/lib/CodeGen/TargetInfo.cpp
-@@ -10927,9 +10927,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
-       return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true));
- 
-     if (Triple.isOSBinFormatELF()) {
--      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;
--      if (getTarget().getABI() == "elfv2")
--        Kind = PPC64_SVR4_ABIInfo::ELFv2;
-+      PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2;
-+      if (getTarget().getABI() == "elfv1")
-+        Kind = PPC64_SVR4_ABIInfo::ELFv1;
-       bool IsSoftFloat = CodeGenOpts.FloatABI == "soft";
- 
-       return SetCGInfo(
---- a/clang/lib/Driver/ToolChains/Clang.cpp
-+++ b/clang/lib/Driver/ToolChains/Clang.cpp
-@@ -1920,14 +1920,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
-   const llvm::Triple &T = getToolChain().getTriple();
-   if (T.isOSBinFormatELF()) {
-     switch (getToolChain().getArch()) {
--    case llvm::Triple::ppc64: {
--      if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
--          T.isOSOpenBSD() || T.isMusl())
--        ABIName = "elfv2";
--      else
--        ABIName = "elfv1";
--      break;
--    }
-+    case llvm::Triple::ppc64:
-     case llvm::Triple::ppc64le:
-       ABIName = "elfv2";
-       break;
diff --git a/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch b/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
deleted file mode 100644
index 893c059d7b8d..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-aarch64-ucontext.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp.orig
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-@@ -1799,7 +1799,7 @@
- 
- static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) {
-   static const u32 kEsrMagic = 0x45535201;
--  u8 *aux = ucontext->uc_mcontext.__reserved;
-+  u8 *aux = reinterpret_cast<u8 *>(ucontext->uc_mcontext.__reserved);
-   while (true) {
-     _aarch64_ctx *ctx = (_aarch64_ctx *)aux;
-     if (ctx->size == 0) break;
diff --git a/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch b/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
deleted file mode 100644
index 35f16d24f340..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-sanitizer-ppc64-musl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
-@@ -74,6 +74,10 @@
- #include <sys/utsname.h>
- #endif
- 
-+#if SANITIZER_LINUX && defined(__powerpc__)
-+#include <asm/ptrace.h>
-+#endif
-+
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- #include <sys/personality.h>
- #endif
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-@@ -92,7 +92,7 @@
- # include <utime.h>
- # include <sys/ptrace.h>
- #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
--    SANITIZER_RISCV64
-+    defined(__powerpc__) || SANITIZER_RISCV64
- #  include <asm/ptrace.h>
- #  ifdef __arm__
- typedef struct user_fpregs elf_fpregset_t;
---- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
-@@ -31,7 +31,7 @@
- #include <sys/types.h> // for pid_t
- #include <sys/uio.h> // for iovec
- #include <elf.h> // for NT_PRSTATUS
--#if (defined(__aarch64__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
-+#if (defined(__aarch64__) || defined(__powerpc__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID
- // GLIBC 2.20+ sys/user does not include asm/ptrace.h
- # include <asm/ptrace.h>
- #endif
diff --git a/srcpkgs/llvm12/patches/compiler-rt-size_t.patch b/srcpkgs/llvm12/patches/compiler-rt-size_t.patch
deleted file mode 100644
index 2c63063a5e9e..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-size_t.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp.orig
-+++ b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp
-@@ -25,6 +25,7 @@
-   }
- 
- #include <cassert>
-+#include <cstddef>
- #include <cstdint>
- #include <dlfcn.h> // for dlsym()
- 
diff --git a/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
deleted file mode 100644
index d0b61c80c897..000000000000
--- a/srcpkgs/llvm12/patches/compiler-rt-xray-ppc64-musl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/compiler-rt/lib/xray/xray_powerpc64.inc
-+++ b/compiler-rt/lib/xray/xray_powerpc64.inc
-@@ -12,7 +12,13 @@
- 
- #include <cstdint>
- #include <mutex>
-+#ifdef __GLIBC__
- #include <sys/platform/ppc.h>
-+#else
-+#include <cctype>
-+#include <cstring>
-+#include <cstdlib>
-+#endif
- 
- #include "xray_defs.h"
- 
-@@ -20,13 +26,45 @@ namespace __xray {
- 
- ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
-   CPU = 0;
-+#ifdef __GLIBC__
-   return __ppc_get_timebase();
-+#else
-+  return __builtin_ppc_get_timebase();
-+#endif
- }
- 
- inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
-   static std::mutex M;
-   std::lock_guard<std::mutex> Guard(M);
-+#ifdef __GLIBC__
-   return __ppc_get_timebase_freq();
-+#else
-+  /* FIXME: a less dirty implementation? */
-+  static uint64_t base;
-+  if (!base) {
-+    FILE *f = fopen("/proc/cpuinfo", "rb");
-+    if (f) {
-+      ssize_t nr;
-+      /* virtually always big enough to hold the line */
-+      char buf[512];
-+      while (fgets(buf, sizeof(buf), f)) {
-+        char *ret = strstr(buf, "timebase");
-+        if (!ret) {
-+          continue;
-+        }
-+        ret += sizeof("timebase") - 1;
-+        ret = strchr(ret, ':');
-+        if (!ret) {
-+          continue;
-+        }
-+        base = strtoul(ret + 1, nullptr, 10);
-+        break;
-+      }
-+      fclose(f);
-+    }
-+  }
-+  return base;
-+#endif
- }
- 
- inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {
diff --git a/srcpkgs/llvm12/patches/libcxx-musl.patch b/srcpkgs/llvm12/patches/libcxx-musl.patch
deleted file mode 100644
index bbd31ffc2cb1..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-musl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/libcxx/include/locale
-+++ b/libcxx/include/locale
-@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
-         typename remove_reference<decltype(errno)>::type __save_errno = errno;
-         errno = 0;
-         char *__p2;
-+#if defined(__linux__) && !defined(__GLIBC__)
-+        long long __ll = strtoll(__a, &__p2, __base);
-+#else
-         long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
-+#endif
-         typename remove_reference<decltype(errno)>::type __current_errno = errno;
-         if (__current_errno == 0)
-             errno = __save_errno;
-@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
-         typename remove_reference<decltype(errno)>::type __save_errno = errno;
-         errno = 0;
-         char *__p2;
-+#if defined(__linux__) && !defined(__GLIBC__)
-+        unsigned long long __ll = strtoull(__a, &__p2, __base);
-+#else
-         unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
-+#endif
-         typename remove_reference<decltype(errno)>::type __current_errno = errno;
-         if (__current_errno == 0)
-             errno = __save_errno;
diff --git a/srcpkgs/llvm12/patches/libcxx-ppc.patch b/srcpkgs/llvm12/patches/libcxx-ppc.patch
deleted file mode 100644
index 7a92f8004e1c..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-ppc.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This ensures `is_iec559` is defined correctly under all long double ABIs,
-including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__`
-is not defined on gcc.
-
---- a/libcxx/include/limits
-+++ b/libcxx/include/limits
-@@ -426,8 +426,14 @@ protected:
-     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
-     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
- 
--#if (defined(__ppc__) || defined(__ppc64__))
-+#if defined(__powerpc__) || defined(__powerpc64__)
-+#if (__LDBL_MAX_EXP__ > __DBL_MAX_EXP__) || (__LDBL_MANT_DIG__ == __DBL_MANT_DIG__)
-+    /* IEEE 754 quadruple or double precision */
-+    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
-+#else
-+    /* 128-bit IBM double-double */
-     static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
-+#endif
- #else
-     static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
- #endif
diff --git a/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch b/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
deleted file mode 100644
index 70292beb2fcd..000000000000
--- a/srcpkgs/llvm12/patches/libcxx-ssp-nonshared.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libcxx/CMakeLists.txt
-+++ b/libcxx/CMakeLists.txt
-@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
-     target_link_libraries(${target} PRIVATE atomic)
-   endif()
- 
-+#ssp  target_link_libraries(${target} PRIVATE ssp_nonshared)
-+
-   if (MINGW)
-     target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
-   endif()
diff --git a/srcpkgs/llvm12/patches/libcxxabi-dl.patch b/srcpkgs/llvm12/patches/libcxxabi-dl.patch
deleted file mode 100644
index 3a15f9db8c98..000000000000
--- a/srcpkgs/llvm12/patches/libcxxabi-dl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Also link to -ldl to prevent undefined references.
-
---- a/libcxxabi/src/CMakeLists.txt
-+++ b/libcxxabi/src/CMakeLists.txt
-@@ -73,6 +73,7 @@
-   endif()
- 
-   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
-+  add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
- endif()
- 
- if (LIBCXXABI_USE_LLVM_UNWINDER)
---- a/libcxx/CMakeLists.txt
-+++ b/libcxx/CMakeLists.txt
-@@ -745,6 +745,10 @@
-     target_link_libraries(${target} PRIVATE m)
-   endif()
- 
-+  if (LIBCXX_HAS_C_LIB)
-+    target_link_libraries(${target} PRIVATE dl)
-+  endif()
-+
-   if (LIBCXX_HAS_RT_LIB)
-     target_link_libraries(${target} PRIVATE rt)
-   endif()
diff --git a/srcpkgs/llvm12/patches/libunwind-ppc32.patch b/srcpkgs/llvm12/patches/libunwind-ppc32.patch
deleted file mode 100644
index 74aa7576ecf9..000000000000
--- a/srcpkgs/llvm12/patches/libunwind-ppc32.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-This fixes build at least with gcc9 which does not define `__ppc__`.
-
---- a/libunwind/include/__libunwind_config.h
-+++ b/libunwind/include/__libunwind_config.h
-@@ -49,7 +49,7 @@
- #  define _LIBUNWIND_CONTEXT_SIZE 167
- #  define _LIBUNWIND_CURSOR_SIZE 179
- #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
--# elif defined(__ppc__)
-+# elif defined(__powerpc__)
- #  define _LIBUNWIND_TARGET_PPC 1
- #  define _LIBUNWIND_CONTEXT_SIZE 117
- #  define _LIBUNWIND_CURSOR_SIZE 124
---- a/libunwind/src/UnwindRegistersRestore.S
-+++ b/libunwind/src/UnwindRegistersRestore.S
-@@ -392,7 +392,7 @@ Lnovec:
-   PPC64_LR(3)
-   bctr
- 
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- 
- DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
- //
---- a/libunwind/src/UnwindRegistersSave.S
-+++ b/libunwind/src/UnwindRegistersSave.S
-@@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
-   blr
- 
- 
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- 
- //
- // extern int unw_getcontext(unw_context_t* thread_state)
---- a/libunwind/src/config.h
-+++ b/libunwind/src/config.h
-@@ -95,12 +95,12 @@
- #define _LIBUNWIND_BUILD_SJLJ_APIS
- #endif
- 
--#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__)
-+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__powerpc64__)
- #define _LIBUNWIND_SUPPORT_FRAME_APIS
- #endif
- 
- #if defined(__i386__) || defined(__x86_64__) ||                                \
--    defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) ||        \
-+    defined(__powerpc__) || defined(__powerpc64__) ||                          \
-     (!defined(__APPLE__) && defined(__arm__)) ||                               \
-     (defined(__arm64__) || defined(__aarch64__)) ||                            \
-     defined(__mips__)
---- a/libunwind/src/libunwind.cpp
-+++ b/libunwind/src/libunwind.cpp
-@@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor,
- # define REGISTER_KIND Registers_x86_64
- #elif defined(__powerpc64__)
- # define REGISTER_KIND Registers_ppc64
--#elif defined(__ppc__)
-+#elif defined(__powerpc__)
- # define REGISTER_KIND Registers_ppc
- #elif defined(__aarch64__)
- # define REGISTER_KIND Registers_arm64
diff --git a/srcpkgs/llvm12/patches/lldb-musl.patch b/srcpkgs/llvm12/patches/lldb-musl.patch
deleted file mode 100644
index 601c0d138523..000000000000
--- a/srcpkgs/llvm12/patches/lldb-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/lldb/source/Plugins/Process/Linux/Procfs.h
-+++ b/lldb/source/Plugins/Process/Linux/Procfs.h
-@@ -10,21 +10,12 @@
- // sys/procfs.h on Android/Linux for all supported architectures.
- 
- #include <sys/ptrace.h>
-+#include <asm/ptrace.h>
- 
--#ifdef __ANDROID__
--#if defined(__arm64__) || defined(__aarch64__)
--typedef unsigned long elf_greg_t;
--typedef elf_greg_t
--    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
--typedef struct user_fpsimd_state elf_fpregset_t;
--#ifndef NT_FPREGSET
--#define NT_FPREGSET NT_PRFPREG
--#endif // NT_FPREGSET
--#elif defined(__mips__)
--#ifndef NT_FPREGSET
--#define NT_FPREGSET NT_PRFPREG
--#endif // NT_FPREGSET
--#endif
--#else // __ANDROID__
-+#if !defined(__GLIBC__) && defined(__powerpc__)
-+#define pt_regs musl_pt_regs
-+#include <sys/procfs.h>
-+#undef pt_regs
-+#else
- #include <sys/procfs.h>
--#endif // __ANDROID__
-+#endif
diff --git a/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch b/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch
deleted file mode 100644
index 8e0a9a779d1b..000000000000
--- a/srcpkgs/llvm12/patches/ppc32-compiler-rt.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit ba4ede595ff9599232f5dd2b4384c243137b53fc
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Jun 22 23:40:54 2021 +0200
-
-    enable compiler-rt support for ppc32
-
-diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
-index 1edab43..5c0c8a2 100644
---- a/compiler-rt/cmake/base-config-ix.cmake
-+++ b/compiler-rt/cmake/base-config-ix.cmake
-@@ -182,9 +182,7 @@ macro(test_targets)
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le")
-       test_target_arch(powerpc64le "" "-m64")
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
--      if(CMAKE_SYSTEM_NAME MATCHES "AIX")
--        test_target_arch(powerpc "" "-m32")
--      endif()
-+      test_target_arch(powerpc "" "-m32")
-       test_target_arch(powerpc64 "" "-m64")
-     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x")
-       test_target_arch(s390x "" "")
diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template
index 7ce18028e4a3..7b361bbbf5bc 100644
--- a/srcpkgs/llvm12/template
+++ b/srcpkgs/llvm12/template
@@ -1,25 +1,17 @@
 # Template file for 'llvm12'
 pkgname=llvm12
 version=12.0.1
-revision=2
+revision=3
 wrksrc="llvm-project-${version}.src"
 build_wrksrc=llvm
 build_style=cmake
 configure_args="
  -DCMAKE_BUILD_TYPE=Release -Wno-dev
  -DENABLE_LINKER_BUILD_ID=YES
- -DLLDB_USE_SYSTEM_SIX=YES
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=YES
- -DLIBCXXABI_USE_LLVM_UNWINDER=YES
- -DLIBCXXABI_ENABLE_STATIC_UNWINDER=YES
- -DLIBOMP_ENABLE_SHARED=YES
- -DLIBOMP_INSTALL_ALIASES=NO
  -DLLVM_INCLUDE_DOCS=YES
  -DLLVM_BUILD_DOCS=YES
  -DLLVM_ENABLE_SPHINX=YES
  -DSPHINX_WARNINGS_AS_ERRORS=NO
- -DLLVM_INSTALL_UTILS=YES
  -DLLVM_BUILD_LLVM_DYLIB=YES
  -DLLVM_LINK_LLVM_DYLIB=YES
  -DLLVM_ENABLE_RTTI=YES
@@ -51,87 +43,10 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
 esac
 
-_enabled_projects="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;libunwind;lld"
-
-_lldb_enable=yes
-_libomp_enable=no
-
-case "$XBPS_TARGET_MACHINE" in
-	ppc64le*) ;;
-	ppc*|i686*) _lldb_enable=no ;;
-esac
-
-case "$XBPS_TARGET_MACHINE" in
-	x86_64*|aarch64*|ppc64*) _libomp_enable=yes;;
-esac
-
-subpackages="clang-tools-extra"
-
-# must go before clang
-if [ "$_libomp_enable" = "yes" ]; then
-	_enabled_projects+=";openmp"
-	subpackages+=" libomp libomp-devel"
-	# because of cmake nonsense referencing libomptarget.so.*
-	depends+=" libomp>=${version}_${revision}"
-fi
-
-subpackages+=" clang clang-analyzer libclang libclang-cpp
- llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel
- libcxxabi libcxxabi-devel libllvm12"
-
-if [ "$_lldb_enable" = "yes" ]; then
-	# XXX fails to cross compile due to python
-	_enabled_projects+=";lldb"
-	subpackages+=" lldb lldb-devel"
-fi
-
-subpackages+=" lld lld-devel"
-
-configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
-
 post_patch() {
-	if [ "$_lldb_enable" = "yes" ]; then
-		if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-			vsed -i 's|__ptrace_request|int|g' \
-				${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
-		fi
-		# disable docs for lldb as they fail to generate
-		vsed -i '/add_subdirectory(docs)/d' \
-			${wrksrc}/lldb/CMakeLists.txt
-	fi
-
 	# update config.guess for better platform detection
 	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
 		${wrksrc}/llvm/cmake
-
-	# fix linker failures on some archs
-	vsed -i 's,check_library_exists(gcc_s .*,set(LIBCXXABI_HAS_GCC_S_LIB ON),' \
-		${wrksrc}/libcxxabi/cmake/config-ix.cmake
-	vsed -i 's,check_library_exists(gcc .*,set(LIBCXXABI_HAS_GCC_LIB ON),' \
-		${wrksrc}/libcxxabi/cmake/config-ix.cmake
-
-	# need libssp_nonshared on some musl platforms (because of nodefaultlibs)
-	case "$XBPS_TARGET_MACHINE" in
-		ppc64*) ;;
-		ppc*-musl|i686-musl|mips*-musl)
-			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
-				${wrksrc}/libunwind/src/CMakeLists.txt
-			vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
-				${wrksrc}/libcxxabi/src/CMakeLists.txt
-			vsed -i 's,#ssp,,' ${wrksrc}/libcxx/CMakeLists.txt
-			;;
-	esac
-
-	case "$XBPS_TARGET_MACHINE" in
-		x86_64-musl) # some sanitizer currently only on x86_64 stuff needs backtrace
-			vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \
-				${wrksrc}/compiler-rt/CMakeLists.txt
-			;;
-		arm*-musl|i686-musl) # sanitizer code is broken since it duplicates some libc bits
-			vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \
-				${wrksrc}/compiler-rt/cmake/config-ix.cmake
-			;;
-	esac
 }
 
 pre_configure() {
@@ -158,10 +73,8 @@ pre_configure() {
 			cmake ../.. -DCMAKE_BUILD_TYPE=Release \
 			-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
 		make ${makejobs} -C utils/TableGen
-		make ${makejobs} -C tools/clang/utils/TableGen
 		[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
 		configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
-		configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/clang-tblgen"
 		[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
 		cd ../..
 	fi
@@ -202,218 +115,6 @@ do_install() {
 	if [ "$CROSS_BUILD" ]; then
 		rm -f ${DESTDIR}/usr/bin/llvm-config-host
 	fi
-
-	# Install libcxxabi headers
-	vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
-	vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
-
-	# Install libunwind headers
-	vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/unwind.h 644 usr/include
-	vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
-		644 usr/include/mach-o
-}
-
-clang-analyzer_package() {
-	pycompile_dirs="usr/share/scan-view"
-	depends="clang-${version}_${revision} python3 perl"
-	short_desc+=" - A source code analysis framework"
-	homepage="https://clang-analyzer.llvm.org/"
-	pkg_install() {
-		vmove usr/share/man/man1/scan-build.1
-		vmove "/usr/bin/scan-*"
-		vmove "/usr/share/scan-*"
-		vmove "/usr/libexec/*analyzer"
-	}
-}
-
-clang-tools-extra_package() {
-	lib32disabled=yes
-	depends="clang-${version}_${revision} python3"
-	short_desc+=" - Extra Clang tools"
-	homepage="https://clang.llvm.org/extra/"
-	pkg_install() {
-		vmove usr/include/clang-tidy
-		vmove usr/bin/clang-apply-replacements
-		vmove usr/bin/clang-query
-		vmove usr/bin/clang-rename
-		vmove usr/bin/clang-tidy
-		vmove usr/bin/diagtool
-		vmove usr/bin/find-all-symbols
-		vmove usr/bin/hmaptool
-		vmove usr/bin/modularize
-		vmove usr/bin/pp-trace
-		vmove usr/bin/sancov
-		vmove "usr/lib/libclangApplyReplacements*"
-		vmove "usr/lib/libclangQuery*"
-		vmove "usr/lib/libclangTidy*"
-		vmove "usr/share/clang/*tidy*"
-		vmove usr/share/doc/clang-tools
-		vmove usr/share/man/man1/extraclangtools.1
-		vmove usr/share/man/man1/diagtool.1
-	}
-}
-
-clang_package() {
-	lib32disabled=yes
-	depends="libstdc++-devel libgcc-devel  binutils ${XBPS_TARGET_LIBC}-devel
-	 libclang-${version}_${revision}"
-	short_desc+=" - C language family frontend"
-	homepage="https://clang.llvm.org/"
-	pkg_install() {
-		vmove usr/include/clang
-		vmove usr/include/clang-c
-		vmove "usr/bin/*clang*"
-		vmove usr/bin/c-index-test
-		vmove usr/lib/clang
-		vmove usr/lib/cmake/clang
-		vmove "usr/lib/libclang*.a"
-		vmove "usr/lib/libclang*.so"
-		vmove usr/share/clang
-		vmove usr/share/doc/clang
-		vmove usr/share/man/man1/clang.1
-	}
-}
-
-libclang_package() {
-	short_desc+=" - C frontend runtime library"
-	pkg_install() {
-		vmove "usr/lib/libclang.so.*"
-	}
-}
-
-libclang-cpp_package() {
-	short_desc+=" - C frontend runtime library (C++ interface)"
-	pkg_install() {
-		vmove "usr/lib/libclang-cpp.so.*"
-	}
-}
-
-lld_package() {
-	lib32disabled=yes
-	short_desc+=" - linker"
-	homepage="https://lld.llvm.org"
-	pkg_install() {
-		vmove usr/bin/lld*
-		vmove usr/bin/wasm-ld
-		vmove usr/bin/ld.lld*
-		vmove usr/bin/ld64.lld*
-		vmove usr/share/doc/lld
-	}
-}
-
-lld-devel_package() {
-	lib32disabled=yes
-	short_desc+=" - linker - development files"
-	homepage="https://lld.llvm.org"
-	depends="lld>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include/lld
-		vmove usr/lib/cmake/lld
-		vmove "usr/lib/liblld*a"
-	}
-}
-
-lldb_package() {
-	lib32disabled=yes
-	depends+=" python3-six"
-	short_desc+=" - LLDB debugger"
-	homepage="https://lldb.llvm.org/"
-	pkg_install() {
-		vmove usr/bin/*lldb*
-		vmove usr/lib/liblldb*so.*
-		vmove /usr/lib/python*
-	}
-}
-
-lldb-devel_package() {
-	lib32disabled=yes
-	depends="lldb>=${version}_${revision}"
-	short_desc+=" - LLDB debugger - development files"
-	pkg_install() {
-		vmove usr/include/lldb
-		vmove "usr/lib/liblldb*.so"
-	}
-}
-
-llvm-libunwind_package() {
-	short_desc+=" - libunwind"
-	pkg_install() {
-		vmove "usr/lib/libunwind.so.*"
-	}
-}
-
-llvm-libunwind-devel_package() {
-	short_desc+=" - libunwind - development files"
-	depends="llvm-libunwind>=${version}_${revision}"
-	conflicts="libunwind-devel>=0"
-	pkg_install() {
-		vmove usr/lib/libunwind.so
-		vmove usr/lib/libunwind.a
-		vmove "usr/include/*unwind*"
-		vmove usr/include/mach-o
-		vmove usr/share/doc/libunwind
-	}
-}
-
-libcxxabi_package() {
-	short_desc+=" - low level support for libc++"
-	pkg_install() {
-		vmove "usr/lib/libc++abi.so.*"
-	}
-}
-
-libcxxabi-devel_package() {
-	short_desc+=" - low level support for libc++ - development files"
-	depends="libcxxabi>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/lib/libc++abi.so
-		vmove usr/lib/libc++abi.a
-		vmove "usr/include/*cxxabi*"
-	}
-}
-
-libcxx_package() {
-	short_desc+=" - C++ standard library"
-	pkg_install() {
-		vmove "usr/lib/libc++.so.*"
-	}
-}
-
-libcxx-devel_package() {
-	short_desc+=" - C++ standard library - development files"
-	depends="libcxx>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/lib/libc++.so
-		vmove usr/lib/libc++.a
-		vmove usr/lib/libc++experimental.a
-		vmove usr/include/c++
-		vmove usr/share/doc/libcxx
-	}
-}
-
-libomp_package() {
-	short_desc+=" - Clang OpenMP support library"
-	pkg_install() {
-		vmove usr/lib/libomp.so
-		vmove "usr/lib/libomptarget.rtl.*.so"
-		vmove usr/lib/libarcher.so
-		vmove "usr/lib/libomp*.so.*"
-	}
-}
-
-libomp-devel_package() {
-	short_desc+=" - Clang OpenMP support library - development files"
-	depends="libomp>=${version}_${revision}"
-	pkg_install() {
-		vmove "usr/lib/libomp*.so"
-		vmove "usr/lib/libarcher*"
-		vmove "usr/include/omp*.h"
-		vmove "usr/lib/clang/${version}/include/omp*.h"
-		vmove usr/share/man/man1/llvmopenmp.1
-		vmove usr/share/doc/openmp
-	}
 }
 
 libllvm12_package() {

From 65598f52e9009967fba1171887c9557d5a77f5a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:25 +0200
Subject: [PATCH 04/16] gnome-builder: rebuild for llvm13

---
 srcpkgs/gnome-builder/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnome-builder/template b/srcpkgs/gnome-builder/template
index 26cf768c391a..17b79d0ccaa1 100644
--- a/srcpkgs/gnome-builder/template
+++ b/srcpkgs/gnome-builder/template
@@ -1,7 +1,7 @@
 # Template file for 'gnome-builder'
 pkgname=gnome-builder
 version=3.40.2
-revision=3
+revision=4
 build_style=meson
 build_helper=qemu
 configure_args="-Dhelp=true -Dnetwork_tests=false"

From ff73a984408563114880d921c0dac5ee20c79421 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:57:59 +0200
Subject: [PATCH 05/16] rtags: rebuild for llvm13

---
 srcpkgs/rtags/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/rtags/template b/srcpkgs/rtags/template
index b496a1b0e721..9b161e690d76 100644
--- a/srcpkgs/rtags/template
+++ b/srcpkgs/rtags/template
@@ -1,7 +1,7 @@
 # Template file for 'rtags'
 pkgname=rtags
 version=2.38
-revision=5
+revision=6
 build_style=cmake
 # Don't run tests in do_install, please.
 configure_args="-DSKIP_CTEST=TRUE"

From e37535a6b89809149cba6160d2a2221481df1d48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:17 +0200
Subject: [PATCH 06/16] qt5: rebuild for llvm13

---
 srcpkgs/qt5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index c1d822ef021d..8bae9e94287a 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -3,7 +3,7 @@ pkgname=qt5
 version=5.15.3+20211001
 # commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=1
+revision=2
 build_style=meta
 hostmakedepends="cmake clang flex perl glib-devel pkg-config
  python re2c ruby which"

From 7a383dfc9569dbad57d5496ab57e8db60961039c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:27 +0200
Subject: [PATCH 07/16] bpftrace: rebuild for llvm13

---
 srcpkgs/bpftrace/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/bpftrace/template b/srcpkgs/bpftrace/template
index 28ab3c626399..eb2480d2230e 100644
--- a/srcpkgs/bpftrace/template
+++ b/srcpkgs/bpftrace/template
@@ -1,7 +1,7 @@
 # Template file for 'bpftrace'
 pkgname=bpftrace
 version=0.14.1
-revision=1
+revision=2
 archs="x86_64* aarch64* ppc64*"
 build_style=cmake
 configure_args="-DBUILD_TESTING=OFF"  # needs root to run

From 87c14584b79b483b9193440fb1249e9a80443ad8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:38 +0200
Subject: [PATCH 08/16] clazy: rebuild for llvm13

---
 srcpkgs/clazy/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/clazy/template b/srcpkgs/clazy/template
index 606384470e98..859923e395eb 100644
--- a/srcpkgs/clazy/template
+++ b/srcpkgs/clazy/template
@@ -1,7 +1,7 @@
 # Template file for 'clazy'
 pkgname=clazy
 version=1.10
-revision=1
+revision=2
 build_style=cmake
 build_helper=qemu
 hostmakedepends="llvm"

From 9816a3383795e8510456072fd196db0a3d53a880 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:58:49 +0200
Subject: [PATCH 09/16] ccls: rebuild for llvm13

---
 srcpkgs/ccls/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ccls/template b/srcpkgs/ccls/template
index fbb7c6847bc1..40aba3b55bfe 100644
--- a/srcpkgs/ccls/template
+++ b/srcpkgs/ccls/template
@@ -1,7 +1,7 @@
 # Template file for 'ccls'
 pkgname=ccls
 version=0.20210330
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="clang-tools-extra"
 makedepends="llvm ncurses-devel rapidjson zlib-devel clang-tools-extra"

From 1848b947e5e4047a15e0b76ba1d5f52489f33b2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 15:59:35 +0200
Subject: [PATCH 10/16] include-what-you-use: rebuild for llvm13

---
 srcpkgs/include-what-you-use/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/include-what-you-use/template b/srcpkgs/include-what-you-use/template
index b13bb7ee56af..b4b167401ebe 100644
--- a/srcpkgs/include-what-you-use/template
+++ b/srcpkgs/include-what-you-use/template
@@ -1,6 +1,6 @@
 # Template file for 'include-what-you-use'
 pkgname=include-what-you-use
-version=0.16
+version=0.17
 revision=1
 wrksrc="${pkgname}"
 build_style=cmake
@@ -12,7 +12,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="NCSA"
 homepage="https://include-what-you-use.org/"
 distfiles="https://include-what-you-use.org/downloads/${pkgname}-${version}.src.tar.gz"
-checksum=8d6fc9b255343bc1e5ec459e39512df1d51c60e03562985e0076036119ff5a1c
+checksum=eca7c04f8b416b6385ed00e33669a7fa4693cd26cb72b522cde558828eb0c665
 python_version=3
 
 post_install() {

From b75d304e1f808d92f72aa77ea12257ce51c53647 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:01:21 +0200
Subject: [PATCH 11/16] codelite: rebuild for llvm13

---
 srcpkgs/codelite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/codelite/template b/srcpkgs/codelite/template
index 3a993a2c0cfb..24e2c879dd45 100644
--- a/srcpkgs/codelite/template
+++ b/srcpkgs/codelite/template
@@ -1,7 +1,7 @@
 # Template file for 'codelite'
 pkgname=codelite
 version=15.0.6
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DWITH_PCH=0 -DWITH_WX_CONFIG=wx-config-gtk3

From 8830f49123cb467019670bc4a24b9d674c2395ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:22:48 +0200
Subject: [PATCH 12/16] kdevelop: rebuild for llvm13

---
 srcpkgs/kdevelop/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdevelop/template b/srcpkgs/kdevelop/template
index 3adc84273607..1660b3ce72ca 100644
--- a/srcpkgs/kdevelop/template
+++ b/srcpkgs/kdevelop/template
@@ -1,7 +1,7 @@
 # Template file for 'kdevelop'
 pkgname=kdevelop
 version=5.6.2
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools qt5-tools

From da067b564463e7c5fc7721e52a6afab91bc4c3ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 16:23:07 +0200
Subject: [PATCH 13/16] juCi++: rebuild for llvm13

---
 srcpkgs/juCi++/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/juCi++/template b/srcpkgs/juCi++/template
index 1a7604b44a00..5103324dec20 100644
--- a/srcpkgs/juCi++/template
+++ b/srcpkgs/juCi++/template
@@ -1,7 +1,7 @@
 # Template file for 'juCi++'
 pkgname=juCi++
 version=1.6.2
-revision=2
+revision=3
 _libclangmm_commit="b342f4dd6de4fe509a692a4b4fcfc7e24aae9590"
 _tiny_commit="c9c8bf810ddad8cd17882b9a9ee628a690e779f5"
 wrksrc="jucipp-v${version}"

From 81e63083d92a27b0ed8c197b4d1021fa3d5ab791 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sat, 1 Jan 2022 18:30:01 +0200
Subject: [PATCH 14/16] llvm13: fix libomp* packages

---
 srcpkgs/llvm13/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/llvm13/template b/srcpkgs/llvm13/template
index 08d847472525..bfc91056d277 100644
--- a/srcpkgs/llvm13/template
+++ b/srcpkgs/llvm13/template
@@ -1,7 +1,7 @@
 # Template file for 'llvm13'
 pkgname=llvm13
 version=13.0.0
-revision=1
+revision=2
 wrksrc="llvm-project-${version}.src"
 build_wrksrc=llvm
 build_style=cmake
@@ -397,6 +397,7 @@ libomp_package() {
 	short_desc+=" - Clang OpenMP support library"
 	pkg_install() {
 		vmove usr/lib/libomp.so
+		vmove usr/lib/libomptarget.so
 		vmove "usr/lib/libomptarget.rtl.*.so"
 		vmove usr/lib/libarcher.so
 	}
@@ -406,7 +407,6 @@ libomp-devel_package() {
 	short_desc+=" - Clang OpenMP support library - development files"
 	depends="libomp>=${version}_${revision}"
 	pkg_install() {
-		vmove "usr/lib/libomp*.so"
 		vmove "usr/lib/libarcher*"
 		vmove "usr/include/omp*.h"
 		vmove "usr/lib/clang/${version}/include/omp*.h"

From ac0f6f1b666604e258bbfb4e511259fafa59ac9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sun, 16 Jan 2022 14:33:56 +0200
Subject: [PATCH 15/16] chromium: rebuild for llvm13

---
 srcpkgs/chromium/template | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index 576947ba44fd..ebd2093350a1 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -20,7 +20,7 @@ desc_option_debug="Build with debug symbols"
 desc_option_js_optimize="Optimize the JS used for Chromium's UI"
 desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire"
 
-hostmakedepends="$(vopt_if clang "clang lld llvm12") python python3 pkgconf perl gperf bison ninja nodejs hwids
+hostmakedepends="$(vopt_if clang "clang lld llvm13") python python3 pkgconf perl gperf bison ninja nodejs hwids
  libatomic-devel libevent-devel libglib-devel $(vopt_if js_optimize openjdk) wayland-devel libepoxy-devel"
 makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
  libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
@@ -267,12 +267,6 @@ do_configure() {
 		'disable_fieldtrial_testing_config=true'
 
 		'is_official_build=true'
-
-		# segfaults with llvm-12.0.1
-		'is_cfi=false'
-		'use_thin_lto=false'
-		'use_cfi_icall=false'
-		'chrome_pgo_phase=0'
 	)
 
 	if [ "$CROSS_BUILD" ]; then

From caae29e81122e94ab9efd6690b5e50313a04c0fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20Dupr=C3=A9=20Bertoni?=
 <louisdb@lespetitspedestres.org>
Date: Sun, 16 Jan 2022 14:39:04 +0200
Subject: [PATCH 16/16] llvm12: remove

---
 srcpkgs/llvm12/INSTALL.msg                    |   1 +
 .../llvm12/files/llvm-Config-llvm-config.h    |   9 --
 srcpkgs/llvm12/patches/llvm-001-musl.patch    |  57 ---------
 .../patches/llvm-002-musl-ppc64-elfv2.patch   |  30 -----
 .../patches/llvm-003-ppc-secureplt.patch      |  11 --
 .../patches/llvm-004-override-opt.patch       |  18 ---
 .../llvm12/patches/llvm-005-ppc-bigpic.patch  |  36 ------
 .../patches/llvm-006-aarch64-mf_exec.patch    |  25 ----
 srcpkgs/llvm12/template                       | 120 +-----------------
 srcpkgs/llvm12/update                         |   3 -
 10 files changed, 5 insertions(+), 305 deletions(-)
 create mode 100644 srcpkgs/llvm12/INSTALL.msg
 delete mode 100644 srcpkgs/llvm12/files/llvm-Config-llvm-config.h
 delete mode 100644 srcpkgs/llvm12/patches/llvm-001-musl.patch
 delete mode 100644 srcpkgs/llvm12/patches/llvm-002-musl-ppc64-elfv2.patch
 delete mode 100644 srcpkgs/llvm12/patches/llvm-003-ppc-secureplt.patch
 delete mode 100644 srcpkgs/llvm12/patches/llvm-004-override-opt.patch
 delete mode 100644 srcpkgs/llvm12/patches/llvm-005-ppc-bigpic.patch
 delete mode 100644 srcpkgs/llvm12/patches/llvm-006-aarch64-mf_exec.patch
 delete mode 100644 srcpkgs/llvm12/update

diff --git a/srcpkgs/llvm12/INSTALL.msg b/srcpkgs/llvm12/INSTALL.msg
new file mode 100644
index 000000000000..004acf7b530c
--- /dev/null
+++ b/srcpkgs/llvm12/INSTALL.msg
@@ -0,0 +1 @@
+llvm12 is no longer provided by Void Linux
diff --git a/srcpkgs/llvm12/files/llvm-Config-llvm-config.h b/srcpkgs/llvm12/files/llvm-Config-llvm-config.h
deleted file mode 100644
index 2fa08c9be696..000000000000
--- a/srcpkgs/llvm12/files/llvm-Config-llvm-config.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 32
-#include "llvm-config-32.h"
-#elif __WORDSIZE == 64
-#include "llvm-config-64.h"
-#else
-#error "Unknown word size"
-#endif
diff --git a/srcpkgs/llvm12/patches/llvm-001-musl.patch b/srcpkgs/llvm12/patches/llvm-001-musl.patch
deleted file mode 100644
index f2a3f8d62813..000000000000
--- a/srcpkgs/llvm12/patches/llvm-001-musl.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
-From: Andrea Brancaleoni <miwaxe@gmail.com>
-Date: Tue, 8 Sep 2015 22:03:02 +0200
-Subject: [PATCH 3/3] musl
-
----
- include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
- lib/Support/DynamicLibrary.cpp            | 2 +-
- lib/Support/Unix/Signals.inc              | 6 +++---
- utils/unittest/googletest/src/gtest.cc    | 1 +
- 5 files changed, 17 insertions(+), 6 deletions(-)
-
-diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
-index 34a8a1e3..1214ece5 100644
---- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
-+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
-@@ -18,6 +18,15 @@
- #include "llvm/IR/PassManager.h"
- #include "llvm/Pass.h"
- 
-+#undef fopen64
-+#undef fseeko64
-+#undef fstat64
-+#undef fstatvfs64
-+#undef ftello64
-+#undef lstat64
-+#undef stat64
-+#undef tmpfile64
-+
- namespace llvm {
- template <typename T> class ArrayRef;
- class Triple;
-diff --git a/lib/Support/Unix/DynamicLibrary.inc b/lib/Support/Unix/DynamicLibrary.inc
-index a2a37996..2f86c470 100644
---- a/llvm/lib/Support/Unix/DynamicLibrary.inc
-+++ b/llvm/lib/Support/Unix/DynamicLibrary.inc
-@@ -102,7 +102,7 @@ static void *DoSearch(const char* SymbolName) {
- 
- // This macro returns the address of a well-known, explicit symbol
- #define EXPLICIT_SYMBOL(SYM) \
--   if (!strcmp(SymbolName, #SYM)) return &SYM
-+   if (!strcmp(SymbolName, #SYM)) return (void *)&SYM
- 
- // Under glibc we have a weird situation. The stderr/out/in symbols are both
- // macros and global variables because of standards requirements. So, we
-diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
-index d882ab2e..f1fb12d0 100644
---- a/llvm/utils/unittest/googletest/src/gtest.cc
-+++ b/llvm/utils/unittest/googletest/src/gtest.cc
-@@ -128,6 +128,7 @@
- 
- #if GTEST_CAN_STREAM_RESULTS_
- # include <arpa/inet.h>  // NOLINT
-+# include <sys/socket.h>  // NOLINT
- # include <netdb.h>  // NOLINT
- # include <sys/socket.h>  // NOLINT
- # include <sys/types.h>  // NOLINT
diff --git a/srcpkgs/llvm12/patches/llvm-002-musl-ppc64-elfv2.patch b/srcpkgs/llvm12/patches/llvm-002-musl-ppc64-elfv2.patch
deleted file mode 100644
index 0071d964bd37..000000000000
--- a/srcpkgs/llvm12/patches/llvm-002-musl-ppc64-elfv2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-This patches LLVM to use ELFv2 on ppc64 unconditionally unless overridden. We
-need this because unlike most distros we use ELFv2 for both glibc and musl
-on big endian ppc64.
-
-diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
-index 0634833e..b7cbc2e7 100644
---- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -222,9 +222,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
- 
-   switch (TT.getArch()) {
-   case Triple::ppc64le:
--    return PPCTargetMachine::PPC_ABI_ELFv2;
-   case Triple::ppc64:
--    return PPCTargetMachine::PPC_ABI_ELFv1;
-+    return PPCTargetMachine::PPC_ABI_ELFv2;
-   default:
-     return PPCTargetMachine::PPC_ABI_UNKNOWN;
-   }
-diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
-index 8b1cf6b5..296a2afa 100644
---- a/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
-+++ b/llvm/test/CodeGen/PowerPC/ppc64-elf-abi.ll
-@@ -1,4 +1,5 @@
--; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
-+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
-+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
- ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
- ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
- ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
diff --git a/srcpkgs/llvm12/patches/llvm-003-ppc-secureplt.patch b/srcpkgs/llvm12/patches/llvm-003-ppc-secureplt.patch
deleted file mode 100644
index b5d15974375d..000000000000
--- a/srcpkgs/llvm12/patches/llvm-003-ppc-secureplt.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-@@ -165,7 +165,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
- 
-   if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) ||
-       TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
--      TargetTriple.isMusl())
-+      isTargetLinux())
-     SecurePlt = true;
- 
-   if (HasSPE && IsPPC64)
diff --git a/srcpkgs/llvm12/patches/llvm-004-override-opt.patch b/srcpkgs/llvm12/patches/llvm-004-override-opt.patch
deleted file mode 100644
index 51d0e4b31b32..000000000000
--- a/srcpkgs/llvm12/patches/llvm-004-override-opt.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This allows us to override the optimization level as not all platforms can
-deal with -O3.
-
---- a/llvm/CMakeLists.txt
-+++ b/llvm/CMakeLists.txt
-@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
-   llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
- endif()
- 
-+set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
-+
-+if (NOT VOID_CXX_OPT_FLAGS STREQUAL "")
-+    llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
-+endif()
-+
- # Put this before tblgen. Else we have a circular dependence.
- add_subdirectory(lib/Demangle)
- add_subdirectory(lib/Support)
diff --git a/srcpkgs/llvm12/patches/llvm-005-ppc-bigpic.patch b/srcpkgs/llvm12/patches/llvm-005-ppc-bigpic.patch
deleted file mode 100644
index d332687b9d92..000000000000
--- a/srcpkgs/llvm12/patches/llvm-005-ppc-bigpic.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 3 Nov 2019 10:57:27 -0600
-Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
-
----
- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp  | 2 +-
- llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
-index cce21f32..87ca5f9b 100644
---- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-@@ -520,7 +520,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
- 
-   // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
-   if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
--      M->getPICLevel() == PICLevel::BigPIC)
-+      M->getPICLevel() != PICLevel::SmallPIC)
-     TlsRef = MCBinaryExpr::createAdd(
-         TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
-   const MachineOperand &MO = MI->getOperand(2);
-diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp
-index 5cc180d7..a5b02565 100644
---- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
-+++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
-@@ -117,7 +117,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
-   const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
-   // If -msecure-plt -fPIC, add 32768 to symbol.
-   if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
--      M->getPICLevel() == PICLevel::BigPIC &&
-+      M->getPICLevel() != PICLevel::SmallPIC &&
-       MO.getTargetFlags() == PPCII::MO_PLT)
-     Expr =
-         MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
diff --git a/srcpkgs/llvm12/patches/llvm-006-aarch64-mf_exec.patch b/srcpkgs/llvm12/patches/llvm-006-aarch64-mf_exec.patch
deleted file mode 100644
index a00abd216665..000000000000
--- a/srcpkgs/llvm12/patches/llvm-006-aarch64-mf_exec.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
-
-    Failing Tests (8):
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
-        LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
-
-Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
-
---- a/llvm/lib/Support/Unix/Memory.inc
-+++ b/llvm/lib/Support/Unix/Memory.inc
-@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) {
-     return PROT_READ | PROT_WRITE | PROT_EXEC;
-   case llvm::sys::Memory::MF_EXEC:
- #if (defined(__FreeBSD__) || defined(__POWERPC__) || defined (__ppc__) || \
--     defined(_POWER) || defined(_ARCH_PPC))
-+     defined(_POWER) || defined(_ARCH_PPC) || (defined(__linux__) && defined(__aarch64__)))
-     // On PowerPC, having an executable page that has no read permission
-     // can have unintended consequences.  The function InvalidateInstruction-
-     // Cache uses instructions dcbf and icbi, both of which are treated by
diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template
index 7b361bbbf5bc..e7e40cae413e 100644
--- a/srcpkgs/llvm12/template
+++ b/srcpkgs/llvm12/template
@@ -1,125 +1,13 @@
 # Template file for 'llvm12'
 pkgname=llvm12
 version=12.0.1
-revision=3
-wrksrc="llvm-project-${version}.src"
-build_wrksrc=llvm
-build_style=cmake
-configure_args="
- -DCMAKE_BUILD_TYPE=Release -Wno-dev
- -DENABLE_LINKER_BUILD_ID=YES
- -DLLVM_INCLUDE_DOCS=YES
- -DLLVM_BUILD_DOCS=YES
- -DLLVM_ENABLE_SPHINX=YES
- -DSPHINX_WARNINGS_AS_ERRORS=NO
- -DLLVM_BUILD_LLVM_DYLIB=YES
- -DLLVM_LINK_LLVM_DYLIB=YES
- -DLLVM_ENABLE_RTTI=YES
- -DLLVM_ENABLE_FFI=YES
- -DLLVM_BINUTILS_INCDIR=/usr/include"
-hostmakedepends="perl python3 zlib-devel libffi-devel swig python3-Sphinx
- python3-recommonmark python3-sphinx-automodapi"
-makedepends="python3-devel zlib-devel elfutils-devel libffi-devel libedit-devel
- libxml2-devel binutils-devel libatomic-devel"
-depends="libllvm12>=${version}_${revision}"
-short_desc="Low Level Virtual Machine"
+revision=4
+build_style=meta
+short_desc="Low Level Virtual Machine (removed package)"
 maintainer="q66 <daniel@octaforge.org>"
-license="Apache-2.0"
+license="metapackage"
 homepage="https://www.llvm.org"
-distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-project-${version}.src.tar.xz"
-checksum=129cb25cd13677aad951ce5c2deb0fe4afc1e9d98950f53b51bdcfb5a73afa0e
-lib32disabled=yes
-python_version=3
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
-	makedepends+=" libexecinfo-devel"
-	depends+=" libexecinfo-devel"
-fi
-
-# "operand out of range" assembler failures
-case "$XBPS_TARGET_MACHINE" in
-	ppc64*) ;;
-	ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
-esac
-
-post_patch() {
-	# update config.guess for better platform detection
-	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
-		${wrksrc}/llvm/cmake
-}
-
-pre_configure() {
-	local triplet
-
-	# Vastly reduce size of debugging symbols:
-	CFLAGS=${CFLAGS/ -g/ -g1}
-	CXXFLAGS=${CXXFLAGS/ -g/ -g1}
-
-	# since gcc9, the build likes to blow up for ppc32 apparently because
-	# of clang being too large for a 24-bit relative call to the PLT, so
-	# optimize for size instead
-	case "$XBPS_TARGET_MACHINE" in
-		ppc64*) ;;
-		mips*-musl|ppc*) configure_args+=" -DVOID_CXX_OPT_FLAGS=-Os" ;;
-	esac
-
-	if [ "$CROSS_BUILD" ]; then
-		msg_normal "Building host tblgen\n"
-		mkdir -p build/HOST
-		cd build/HOST
-		CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
-			CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
-			cmake ../.. -DCMAKE_BUILD_TYPE=Release \
-			-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
-		make ${makejobs} -C utils/TableGen
-		[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
-		configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
-		[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
-		cd ../..
-	fi
-
-	case "$XBPS_TARGET_MACHINE" in
-		i686*) _arch="X86";;
-		x86_64*) _arch="X86";;
-		armv5*) _arch="Armv5te";;
-		armv6*) _arch="Armv6";;
-		armv7*) _arch="Armv7";;
-		aarch64*) _arch="AArch64";;
-		mips*) _arch="Mips";;
-		ppc*) _arch="PowerPC";;
-		riscv64*) _arch="RISCV64";;
-	esac
-
-	triplet=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}
-
-	configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
-	configure_args+=" -DLLVM_HOST_TRIPLE=${triplet}"
-	configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${triplet}"
-}
-
-do_install() {
-	cd build
-	cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
-
-	# Required for multilib.
-	if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
-		for _header in llvm-config; do
-			mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
-			vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
-				usr/include/llvm/Config ${_header}.h
-		done
-	fi
-
-	# Remove llvm-config-host in cross builds.
-	if [ "$CROSS_BUILD" ]; then
-		rm -f ${DESTDIR}/usr/bin/llvm-config-host
-	fi
-}
 
 libllvm12_package() {
 	short_desc+=" - runtime library"
-	pkg_install() {
-		vmove "usr/lib/libLLVM-*.so*"
-	}
 }
diff --git a/srcpkgs/llvm12/update b/srcpkgs/llvm12/update
deleted file mode 100644
index e95cf26b3586..000000000000
--- a/srcpkgs/llvm12/update
+++ /dev/null
@@ -1,3 +0,0 @@
-site="https://github.com/llvm/llvm-project/releases"
-pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
-ignore="*-rc*"

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
  2022-01-01 19:36 ` TeddyDD
  2022-01-16 12:52 ` [PR PATCH] [Updated] " DBLouis
@ 2022-01-16 12:52 ` DBLouis
  2022-01-16 12:53 ` DBLouis
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: DBLouis @ 2022-01-16 12:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

New comment by DBLouis on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1013870572

Comment:
Should I bump revision for all packages listed by `./xbps-src show-hostmakedepends` and `./xbps-src show-makedepends` for clang and llvm/llvm13?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (2 preceding siblings ...)
  2022-01-16 12:52 ` DBLouis
@ 2022-01-16 12:53 ` DBLouis
  2022-01-16 17:19 ` q66
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: DBLouis @ 2022-01-16 12:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

New comment by DBLouis on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1013870572

Comment:
I removed llvm12. Should I bump revision for all packages listed by `./xbps-src show-hostmakedepends` and `./xbps-src show-makedepends` for `clang` and `llvm/llvm13`?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (3 preceding siblings ...)
  2022-01-16 12:53 ` DBLouis
@ 2022-01-16 17:19 ` q66
  2022-01-30 20:23 ` wael444
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: q66 @ 2022-01-16 17:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1013916385

Comment:
you should revbump packages that have a direct dependency on either newer libclang or libLLVM, so that the older llvm should be safely removed; things that have llvm or clang simply as a host dependency and don't depend on it at runtime should be build-tested (to ensure they still build) but not revbumped

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (4 preceding siblings ...)
  2022-01-16 17:19 ` q66
@ 2022-01-30 20:23 ` wael444
  2022-01-31  5:58 ` DBLouis
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: wael444 @ 2022-01-30 20:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

New comment by wael444 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1025223171

Comment:
Anything new about this?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (5 preceding siblings ...)
  2022-01-30 20:23 ` wael444
@ 2022-01-31  5:58 ` DBLouis
  2022-01-31 17:00 ` q66
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: DBLouis @ 2022-01-31  5:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

New comment by DBLouis on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1025404807

Comment:
It's mostly done. I need help with patches. Is there an easy way of updating patches when the base file changes? This is always very tedious for me. I would like suggestions

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (6 preceding siblings ...)
  2022-01-31  5:58 ` DBLouis
@ 2022-01-31 17:00 ` q66
  2022-01-31 17:01 ` q66
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: q66 @ 2022-01-31 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1025998312

Comment:
which patches are you updating?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (7 preceding siblings ...)
  2022-01-31 17:00 ` q66
@ 2022-01-31 17:01 ` q66
  2022-01-31 17:46 ` DBLouis
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: q66 @ 2022-01-31 17:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1025998312

Comment:
which patches are you updating? (there is no way to just update a patch without doing it manually, though; i usually use git, commit the modified files, then generate a patch)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (8 preceding siblings ...)
  2022-01-31 17:01 ` q66
@ 2022-01-31 17:46 ` DBLouis
  2022-02-01  3:06 ` q66
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: DBLouis @ 2022-01-31 17:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

New comment by DBLouis on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1026042774

Comment:
beignet, ispc and qtcreator patches need update

Ok that's how I do it, it's a pain but I guess there is no other way 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (9 preceding siblings ...)
  2022-01-31 17:46 ` DBLouis
@ 2022-02-01  3:06 ` q66
  2022-02-25 11:40 ` motorto
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: q66 @ 2022-02-01  3:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1026435213

Comment:
maybe we should just finally drop beignet if it's non-trivial to patch, it's been dead for years and it's not really the distro's responsibility to keep it working 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (10 preceding siblings ...)
  2022-02-01  3:06 ` q66
@ 2022-02-25 11:40 ` motorto
  2022-02-25 20:57 ` motorto
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: motorto @ 2022-02-25 11:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3856 bytes --]

New comment by motorto on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1050780877

Comment:
Trying to help so I updated qtcreator to use llvm13.  Honestly I don't use the app but it compiles on my x86_64 glibc 
 (will create a vm so that I can force install and see if it at least runs, but compiling takes a lot of time on my dual core pc )

MesaRevbump.diff: https://paste.rs/4aN
qt5: update to 5.15.3+20210429: https://paste.rs/lj3
qtcreator: update to 6.0.2: https://paste.rs/hy9

And I will post it here as well:

<details>
    <summary><u>All diffs</u> (<i>click to expand</i>)</summary>
    <!-- have to be followed by an empty line! -->

```diff
diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index eb81cbb345..d0499ba9fb 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -1,7 +1,7 @@
 # Template file for 'mesa'
 pkgname=mesa
 version=21.3.5
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
  -Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled
```

```diff
diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index c3cb8018f7..9391058428 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -1,9 +1,9 @@
 # Template file for 'qt5'
 pkgname=qt5
-version=5.15.3+20211001
-# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad
+version=5.15.3+20210429
+# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad NEED TO CHANGE THIS !!!
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=2
+revision=1
 build_style=meta
 hostmakedepends="cmake clang flex perl glib-devel pkg-config
  python re2c ruby which"
@@ -28,7 +28,7 @@ homepage="https://qt.io/"
 # to keep the size smaller qtwebengine, qtwebview, qtdocgallery, qtactiveqt and qtpim
 # can be marked with the export-ignore attribute
 distfiles="https://void.johnnynator.dev/distfiles/qt5-${version}.tar.gz"
-checksum=6bff56434b4c2413ec0c9e57ffdcfed1f0966754d1ccf34dafe31840f4006c5a
+checksum=6936ecf7c35162832bde5b5685f24c0924868745983f030e377924c1d80f68d1
 python_version=2 #unverified
 replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
  qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1 qt5-canvas3d<5.13.0"
```

```diff
diff --git a/srcpkgs/qtcreator/template b/srcpkgs/qtcreator/template
index 28e871b406..ac1152bcca 100644
--- a/srcpkgs/qtcreator/template
+++ b/srcpkgs/qtcreator/template
@@ -1,13 +1,13 @@
 # Template file for 'qtcreator'
 pkgname=qtcreator
-version=5.0.3
+version=6.0.2
 revision=1
 wrksrc="qt-creator-opensource-src-${version}"
 build_style=qmake
 make_install_args="INSTALL_ROOT=\${DESTDIR}/usr"
-hostmakedepends="clang llvm perl pkg-config python3 which qt5-qmake
+hostmakedepends="llvm13 perl pkg-config python3 which qt5-qmake
  qt5-host-tools"
-makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel
+makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel qt5-svg-devel
  qt5-quickcontrols clang llvm"
 depends="qt5-declarative-devel qt5-quickcontrols qt5-plugin-sqlite"
 short_desc="Cross-platform IDE for Qt developers"
@@ -16,7 +16,7 @@ license="LGPL-3.0-or-later, custom:QtCompany-GPL-Exception-1.0"
 homepage="https://wiki.qt.io/Category:Tools::QtCreator"
 changelog="https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-${version}.md"
 distfiles="https://download.qt.io/official_releases/qtcreator/${version%.*}/${version}/${wrksrc}.tar.xz"
-checksum=7fd3b14310bcecee6b134f8cb7f4c0ed2385d7f4cecd48d756c5c1fd650ce2eb
+checksum=3d173c1a02ce55137a23f294e1a840d7648656e97826067eb29d9df653351bfa
 replaces="qtcreator-data>=0"
 python_version=3
```

</details>

Feedback is welcome

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (11 preceding siblings ...)
  2022-02-25 11:40 ` motorto
@ 2022-02-25 20:57 ` motorto
  2022-02-25 21:00 ` motorto
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: motorto @ 2022-02-25 20:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 4046 bytes --]

New comment by motorto on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1050780877

Comment:
Trying to help so I updated qtcreator to use llvm13.  Honestly I don't use the app but it compiles on my x86_64 glibc 
 (will create a vm so that I can force install and see if it at least runs, but compiling takes a lot of time on my dual core pc )

MesaRevbump.diff: https://paste.rs/4aN
~qt5: update to 5.15.3+20210429: https://paste.rs/lj3~
qtcreator: update to 6.0.2: https://paste.rs/hy9

And I will post it here as well:

<details>
    <summary><u>All diffs</u> (<i>click to expand</i>)</summary>
    <!-- have to be followed by an empty line! -->

```diff
diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index eb81cbb345..d0499ba9fb 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -1,7 +1,7 @@
 # Template file for 'mesa'
 pkgname=mesa
 version=21.3.5
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
  -Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled
```

```diff
diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index c3cb8018f7..9391058428 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -1,9 +1,9 @@
 # Template file for 'qt5'
 pkgname=qt5
-version=5.15.3+20211001
-# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad
+version=5.15.3+20210429
+# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad NEED TO CHANGE THIS !!!
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=2
+revision=1
 build_style=meta
 hostmakedepends="cmake clang flex perl glib-devel pkg-config
  python re2c ruby which"
@@ -28,7 +28,7 @@ homepage="https://qt.io/"
 # to keep the size smaller qtwebengine, qtwebview, qtdocgallery, qtactiveqt and qtpim
 # can be marked with the export-ignore attribute
 distfiles="https://void.johnnynator.dev/distfiles/qt5-${version}.tar.gz"
-checksum=6bff56434b4c2413ec0c9e57ffdcfed1f0966754d1ccf34dafe31840f4006c5a
+checksum=6936ecf7c35162832bde5b5685f24c0924868745983f030e377924c1d80f68d1
 python_version=2 #unverified
 replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
  qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1 qt5-canvas3d<5.13.0"
```

```diff
diff --git a/srcpkgs/qtcreator/template b/srcpkgs/qtcreator/template
index 28e871b406..ac1152bcca 100644
--- a/srcpkgs/qtcreator/template
+++ b/srcpkgs/qtcreator/template
@@ -1,13 +1,13 @@
 # Template file for 'qtcreator'
 pkgname=qtcreator
-version=5.0.3
+version=6.0.2
 revision=1
 wrksrc="qt-creator-opensource-src-${version}"
 build_style=qmake
 make_install_args="INSTALL_ROOT=\${DESTDIR}/usr"
-hostmakedepends="clang llvm perl pkg-config python3 which qt5-qmake
+hostmakedepends="llvm13 perl pkg-config python3 which qt5-qmake
  qt5-host-tools"
-makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel
+makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel qt5-svg-devel
  qt5-quickcontrols clang llvm"
 depends="qt5-declarative-devel qt5-quickcontrols qt5-plugin-sqlite"
 short_desc="Cross-platform IDE for Qt developers"
@@ -16,7 +16,7 @@ license="LGPL-3.0-or-later, custom:QtCompany-GPL-Exception-1.0"
 homepage="https://wiki.qt.io/Category:Tools::QtCreator"
 changelog="https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-${version}.md"
 distfiles="https://download.qt.io/official_releases/qtcreator/${version%.*}/${version}/${wrksrc}.tar.xz"
-checksum=7fd3b14310bcecee6b134f8cb7f4c0ed2385d7f4cecd48d756c5c1fd650ce2eb
+checksum=3d173c1a02ce55137a23f294e1a840d7648656e97826067eb29d9df653351bfa
 replaces="qtcreator-data>=0"
 python_version=3
```

</details>

Feedback is welcome

Edit: Talked with @johnnynator and he provided again the tarball that is on the template so we could simply revbump the qt5 template, and in the future we can worry about updating qt5 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (12 preceding siblings ...)
  2022-02-25 20:57 ` motorto
@ 2022-02-25 21:00 ` motorto
  2022-02-25 21:26 ` Chocimier
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: motorto @ 2022-02-25 21:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 4151 bytes --]

New comment by motorto on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1050780877

Comment:
Trying to help so I updated qtcreator to use llvm13.  Honestly I don't use the app but it compiles on my x86_64 glibc 
 (will create a vm so that I can force install and see if it at least runs, but compiling takes a lot of time on my dual core pc )

MesaRevbump.diff: https://paste.rs/4aN
~qt5: update to 5.15.3+20210429: https://paste.rs/lj3~
qtcreator: update to 6.0.2: https://paste.rs/hy9

And I will post it here as well:

<details>
    <summary><u>All diffs</u> (<i>click to expand</i>)</summary>
    <!-- have to be followed by an empty line! -->

```diff
diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index eb81cbb345..d0499ba9fb 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -1,7 +1,7 @@
 # Template file for 'mesa'
 pkgname=mesa
 version=21.3.5
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
  -Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled
```

-------------------------------------
**Ignore this diff see Edit**
```diff
diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index c3cb8018f7..9391058428 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -1,9 +1,9 @@
 # Template file for 'qt5'
 pkgname=qt5
-version=5.15.3+20211001
-# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad
+version=5.15.3+20210429
+# commit fcca82ca40a5d8a02a4ddd90846d070f2c58cfad NEED TO CHANGE THIS !!!
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=2
+revision=1
 build_style=meta
 hostmakedepends="cmake clang flex perl glib-devel pkg-config
  python re2c ruby which"
@@ -28,7 +28,7 @@ homepage="https://qt.io/"
 # to keep the size smaller qtwebengine, qtwebview, qtdocgallery, qtactiveqt and qtpim
 # can be marked with the export-ignore attribute
 distfiles="https://void.johnnynator.dev/distfiles/qt5-${version}.tar.gz"
-checksum=6bff56434b4c2413ec0c9e57ffdcfed1f0966754d1ccf34dafe31840f4006c5a
+checksum=6936ecf7c35162832bde5b5685f24c0924868745983f030e377924c1d80f68d1
 python_version=2 #unverified
 replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
  qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1 qt5-canvas3d<5.13.0"
```
---------------------------------

```diff
diff --git a/srcpkgs/qtcreator/template b/srcpkgs/qtcreator/template
index 28e871b406..ac1152bcca 100644
--- a/srcpkgs/qtcreator/template
+++ b/srcpkgs/qtcreator/template
@@ -1,13 +1,13 @@
 # Template file for 'qtcreator'
 pkgname=qtcreator
-version=5.0.3
+version=6.0.2
 revision=1
 wrksrc="qt-creator-opensource-src-${version}"
 build_style=qmake
 make_install_args="INSTALL_ROOT=\${DESTDIR}/usr"
-hostmakedepends="clang llvm perl pkg-config python3 which qt5-qmake
+hostmakedepends="llvm13 perl pkg-config python3 which qt5-qmake
  qt5-host-tools"
-makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel
+makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel qt5-svg-devel
  qt5-quickcontrols clang llvm"
 depends="qt5-declarative-devel qt5-quickcontrols qt5-plugin-sqlite"
 short_desc="Cross-platform IDE for Qt developers"
@@ -16,7 +16,7 @@ license="LGPL-3.0-or-later, custom:QtCompany-GPL-Exception-1.0"
 homepage="https://wiki.qt.io/Category:Tools::QtCreator"
 changelog="https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-${version}.md"
 distfiles="https://download.qt.io/official_releases/qtcreator/${version%.*}/${version}/${wrksrc}.tar.xz"
-checksum=7fd3b14310bcecee6b134f8cb7f4c0ed2385d7f4cecd48d756c5c1fd650ce2eb
+checksum=3d173c1a02ce55137a23f294e1a840d7648656e97826067eb29d9df653351bfa
 replaces="qtcreator-data>=0"
 python_version=3
```

</details>

Feedback is welcome

Edit: Talked with @johnnynator and he provided again the tarball that is on the template so we could simply revbump the qt5 template, and in the future we can worry about updating qt5 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (13 preceding siblings ...)
  2022-02-25 21:00 ` motorto
@ 2022-02-25 21:26 ` Chocimier
  2022-02-26  0:54 ` ifreund
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Chocimier @ 2022-02-25 21:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1051282942

Comment:
Patched qtcreator in #35853, can wait few days for to llvm13 with merging.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (14 preceding siblings ...)
  2022-02-25 21:26 ` Chocimier
@ 2022-02-26  0:54 ` ifreund
  2022-02-26 10:55 ` motorto
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ifreund @ 2022-02-26  0:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

New comment by ifreund on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1051405654

Comment:
`zig` will also need to be updated to `0.9.1` in sync with this LLVM update, which in turn means updating `river` to `0.1.3`, which is blocked on <https://github.com/void-linux/void-packages/pull/35017>.

I'd be happy to do the zig and river updates, hopefully I can get the wlroots update merged soonish as well. Feel free to reach on on IRC, my nick is `ifreund` there too.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (15 preceding siblings ...)
  2022-02-26  0:54 ` ifreund
@ 2022-02-26 10:55 ` motorto
  2022-02-26 11:08 ` motorto
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: motorto @ 2022-02-26 10:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

New comment by motorto on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1052002594

Comment:
Here we go the ispc update, 

Once again I don't use the package so I can't guarantee that is working 100%, it compiles on my machine x86_64-glib.

here is the diff: http://ix.io/3QNh

(Can't copy and paste this time, because it's really big) @DBLouis, now it's just missing the beignet right ? 

@ifreund  I can update zig if you want I will send a diff today. 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (16 preceding siblings ...)
  2022-02-26 10:55 ` motorto
@ 2022-02-26 11:08 ` motorto
  2022-04-13 18:19 ` JamiKettunen
  2022-04-13 18:23 ` wael444
  19 siblings, 0 replies; 21+ messages in thread
From: motorto @ 2022-02-26 11:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

New comment by motorto on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1052002594

Comment:
Here we go the ispc update, 

Once again I don't use the package so I can't guarantee that is working 100%, it compiles on my machine x86_64-glib.

here is the diff: http://ix.io/3QNh

(Can't copy and paste this time, because it's really big) @DBLouis, now it's just missing the beignet right ? 

@ifreund  ~I can update zig if you want I will send a diff today.~ http://ix.io/3QNn (zig update v0.9.1 diff) 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (17 preceding siblings ...)
  2022-02-26 11:08 ` motorto
@ 2022-04-13 18:19 ` JamiKettunen
  2022-04-13 18:23 ` wael444
  19 siblings, 0 replies; 21+ messages in thread
From: JamiKettunen @ 2022-04-13 18:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

New comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1098348910

Comment:
Could this be bumped to LLVM 14.0.0 which released back in March 25th?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: LLVM 13
  2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
                   ` (18 preceding siblings ...)
  2022-04-13 18:19 ` JamiKettunen
@ 2022-04-13 18:23 ` wael444
  19 siblings, 0 replies; 21+ messages in thread
From: wael444 @ 2022-04-13 18:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

New comment by wael444 on void-packages repository

https://github.com/void-linux/void-packages/pull/34800#issuecomment-1098352560

Comment:
https://github.com/void-linux/void-packages/pull/36229#issuecomment-1079941567

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-04-13 18:23 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-01 17:49 [PR PATCH] LLVM 13 DBLouis
2022-01-01 19:36 ` TeddyDD
2022-01-16 12:52 ` [PR PATCH] [Updated] " DBLouis
2022-01-16 12:52 ` DBLouis
2022-01-16 12:53 ` DBLouis
2022-01-16 17:19 ` q66
2022-01-30 20:23 ` wael444
2022-01-31  5:58 ` DBLouis
2022-01-31 17:00 ` q66
2022-01-31 17:01 ` q66
2022-01-31 17:46 ` DBLouis
2022-02-01  3:06 ` q66
2022-02-25 11:40 ` motorto
2022-02-25 20:57 ` motorto
2022-02-25 21:00 ` motorto
2022-02-25 21:26 ` Chocimier
2022-02-26  0:54 ` ifreund
2022-02-26 10:55 ` motorto
2022-02-26 11:08 ` motorto
2022-04-13 18:19 ` JamiKettunen
2022-04-13 18:23 ` wael444

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).