From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] llvm9
Date: Wed, 25 Sep 2019 22:29:05 +0200 [thread overview]
Message-ID: <20190925202905.z9HW2pd8tSEZyXuT6K3pb-fmq0pPW9DEY275TycHBXw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-14656@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]
There is an updated pull request by q66 against master on the void-packages repository
https://github.com/void-ppc/void-packages llvm9
https://github.com/void-linux/void-packages/pull/14656
llvm9
This adds llvm9, strips down llvm8 to a minimum (and updates it to 8.0.1), and bumps a bunch of other packages that should be bumped.
Platform testing:
- [x] x86_64 **[need help]**
- [ ] x86_64-musl **[need help]**
- [ ] i686 **[need help]**
- [x] ppc64le
- [x] ppc64le-musl
- [x] ppc64
- [x] ppc64-musl
- [x] ppc
- [x] ppc-musl
- [ ] aarch64
- [ ] aarch64-musl
- [ ] armv7l **[need help]**
- [ ] armv6l **[need help]**
- [ ] armv7l-musl **[need help]**
To bump + test:
- [x] llvm
- [x] libcxxabi
- [x] libcxx
- [x] llvm-libunwind
- [x] libGL
- [ ] beignet **[need help, x86 only]**
- [x] libclc-git
- [x] juCi++
- [x] kdevelop
- [x] rtags
- [x] bcc
- [x] ccls
- [x] clazy
- [x] include-what-you-use
- [x] shiboken2
- [x] codelite
- [x] gnome-builder
- [x] bpftrace
- [x] qtcreator
- [x] qt5
rebuild but not bump (no target llvm/clang dependency):
- [x] ardour
- [x] afl **[need help, x86 only]**
- [x] blender
- [x] firefox
- [x] firefox-esr
- [x] icecat
- [x] thunderbird
- [x] chromium **[need help, won't build here]**
- [x] godot
- [x] ispc **[need help, x86 only]**
- [x] yosys
- [x] rdedup
- [x] pijul
Rust will need to be bumped but we'll do that as a part of the upcoming Rust update to avoid building twice.
A patch file from https://github.com/void-linux/void-packages/pull/14656.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-llvm9-14656.patch --]
[-- Type: text/x-diff, Size: 80440 bytes --]
From cd426ace995b5ad70ce290e5efc6a77b871bdc80 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:22:59 +0200
Subject: [PATCH 01/22] llvm8: update to 8.0.1, remove clang, lld etc., set up
conflicts
---
srcpkgs/clang | 1 -
srcpkgs/clang-analyzer | 1 -
| 1 -
srcpkgs/lld | 1 -
srcpkgs/lld-devel | 1 -
srcpkgs/lldb | 1 -
srcpkgs/lldb-devel | 1 -
srcpkgs/llvm8/template | 183 ++------------------------------------
8 files changed, 7 insertions(+), 183 deletions(-)
delete mode 120000 srcpkgs/clang
delete mode 120000 srcpkgs/clang-analyzer
delete mode 120000 srcpkgs/clang-tools-extra
delete mode 120000 srcpkgs/lld
delete mode 120000 srcpkgs/lld-devel
delete mode 120000 srcpkgs/lldb
delete mode 120000 srcpkgs/lldb-devel
diff --git a/srcpkgs/clang b/srcpkgs/clang
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/clang
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/clang-analyzer b/srcpkgs/clang-analyzer
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/clang-analyzer
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/clang-tools-extra b/srcpkgs/clang-tools-extra
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/clang-tools-extra
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/lld b/srcpkgs/lld
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/lld
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/lld-devel b/srcpkgs/lld-devel
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/lld-devel
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/lldb b/srcpkgs/lldb
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/lldb
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/lldb-devel b/srcpkgs/lldb-devel
deleted file mode 120000
index 8ec3476f9c1..00000000000
--- a/srcpkgs/lldb-devel
+++ /dev/null
@@ -1 +0,0 @@
-llvm8
\ No newline at end of file
diff --git a/srcpkgs/llvm8/template b/srcpkgs/llvm8/template
index f8377dacf93..563b109fdff 100644
--- a/srcpkgs/llvm8/template
+++ b/srcpkgs/llvm8/template
@@ -1,7 +1,7 @@
# Template file for 'llvm8'
pkgname=llvm8
-version=8.0.0
-revision=7
+version=8.0.1
+revision=1
wrksrc="llvm-${version}.src"
build_style=cmake
configure_args="
@@ -20,38 +20,15 @@ short_desc="Low Level Virtual Machine"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="NCSA"
homepage="https://www.llvm.org"
-distfiles="https://releases.llvm.org/${version}/llvm-${version}.src.tar.xz
-https://releases.llvm.org/${version}/lldb-${version}.src.tar.xz
-https://releases.llvm.org/${version}/lld-${version}.src.tar.xz
- https://releases.llvm.org/${version}/cfe-${version}.src.tar.xz
- https://releases.llvm.org/${version}/clang-tools-extra-${version}.src.tar.xz
- https://releases.llvm.org/${version}/compiler-rt-${version}.src.tar.xz"
-checksum="8872be1b12c61450cacc82b3d153eab02be2546ef34fa3580ed14137bb26224c
- 49918b9f09816554a20ac44c5f85a32dc0a7a00759b3259e78064d674eac0373
- 9caec8ec922e32ffa130f0fb08e4c5a242d7e68ce757631e425e9eba2e1a6e37
- 084c115aab0084e63b23eee8c233abb6739c399e29966eaeccfc6e088e0b736b
- 4f00122be408a7482f2004bcf215720d2b88cf8dc78b824abb225da8ad359d4b
- b435c7474f459e71b2831f1a4e3f1d21203cb9c0172e94e9d9b69f50354f21b1"
+distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz"
+checksum="44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7"
disable_parallel_builds=yes
lib32disabled=yes
-_lldb_enable=yes
+# all of these provide llvm-config
+conflicts="llvm>=0 llvm3.9>=0 llvm6.0>=0 llvm7>=0 llvm9>=0"
-if [ "$CROSS_BUILD" ]; then
- _lldb_enable=no
-fi
-
-case "$XBPS_TARGET_MACHINE" in
- ppc64le*) ;;
- ppc*) _lldb_enable=no ;;
-esac
-
-subpackages="clang-tools-extra clang clang-analyzer libllvm8"
-if [ "$_lldb_enable" = "yes" ]; then
- # XXX fails to cross compile due to python
- subpackages+=" lldb lldb-devel"
-fi
-subpackages+=" lld lld-devel"
+subpackages="libllvm8"
case "$XBPS_TARGET_MACHINE" in
armv5*) broken="Tries to assemble VFP instructions with armv5tel arch";;
@@ -64,51 +41,6 @@ post_patch() {
msg_normal "Applying $i to llvm\n"
patch -sNp1 -i ${i}
done
-
- cd ${XBPS_BUILDDIR}/cfe-${version}.src
- for i in ${FILESDIR}/patches/cfe/cfe-*.patch; do
- msg_normal "Applying $i to cfe\n"
- patch -sNp1 -i ${i}
- done
-
- if [ "$_lldb_enable" = "yes" ]; then
- cd ${XBPS_BUILDDIR}/lldb-${version}.src
- for i in ${FILESDIR}/patches/lldb/*.patch; do
- msg_normal "Applying $i to lldb\n"
- patch -sNp1 -i ${i}
- done
- case "$XBPS_TARGET_MACHINE" in
- *-musl) sed -i 's|__ptrace_request|int|g' source/Plugins/Process/Linux/NativeProcessLinux.cpp ;;
- esac
- fi
-
- # Move clang files into the llvm source.
- if [ -d ${XBPS_BUILDDIR}/cfe-${version}.src ]; then
- mv ${XBPS_BUILDDIR}/cfe-${version}.src ${wrksrc}/tools/clang
- fi
- # Move clang-tools-extra files into llvm source.
- if [ -d ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ]; then
- mv ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ${wrksrc}/tools/clang/tools/extra
- fi
- # Move lld files into the llvm source.
- if [ -d ${XBPS_BUILDDIR}/lld-${version}.src ]; then
- mv ${XBPS_BUILDDIR}/lld-${version}.src ${wrksrc}/tools/lld
- fi
- # Move lldb files into the llvm source.
- if [ "$_lldb_enable" = "yes" -a -d ${XBPS_BUILDDIR}/lldb-${version}.src ]; then
- mv ${XBPS_BUILDDIR}/lldb-${version}.src ${wrksrc}/tools/lldb
- fi
- # Move compiler-rt files into the llvm source.
- if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then
- mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src ${wrksrc}/projects/compiler-rt
- fi
- case "$XBPS_TARGET_MACHINE" in
- *-musl)
- # Disable sanitizers
- sed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' ${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake
- ;;
- esac
-
}
pre_configure() {
@@ -131,9 +63,7 @@ pre_configure() {
CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
cmake ../.. -DCMAKE_BUILD_TYPE=Release
make ${makejobs} -C utils/TableGen
- make ${makejobs} -C tools/clang/utils/TableGen
configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/build/HOST/bin/llvm-tblgen"
- configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/build/HOST/bin/clang-tblgen"
cd ../..
fi
@@ -175,105 +105,6 @@ do_install() {
fi
}
-clang-analyzer_package() {
- archs=noarch
- pycompile_dirs="usr/share/scan-view"
- depends="clang-${version}_${revision} python"
- 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() {
- depends="clang-${version}_${revision} python"
- short_desc+=" - Extra Clang tools"
- homepage="https://clang.llvm.org/extra/"
- pkg_install() {
- vmove usr/bin/clang-apply-replacements
- vmove usr/bin/clang-query
- vmove usr/bin/clang-rename
- vmove usr/bin/clang-tidy
- vmove usr/bin/modularize
- vmove "usr/lib/libclangApplyReplacements*"
- vmove "usr/lib/libclangQuery*"
- vmove "usr/lib/libclangTidy*"
- vmove "usr/share/clang/*tidy*"
- }
-}
-
-clang_package() {
- lib32disabled=yes
- depends="libstdc++-devel libgcc-devel binutils"
- case "$XBPS_TARGET_MACHINE" in
- *-musl) depends+=" musl-devel";;
- *) depends+=" glibc-devel";;
- esac
- short_desc+=" - C language family frontend"
- alternatives="cc:cc:/usr/bin/clang"
- 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*"
- vmove "usr/share/clang"
- }
-}
-
-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*
- }
-}
-
-lld-devel_package() {
- lib32disabled=yes
- short_desc+=" - linker - development files"
- homepage="https://lld.llvm.org"
- pkg_install() {
- vmove usr/include/lld
- vmove "usr/lib/liblld*a"
- }
-}
-
-lldb_package() {
- lib32disabled=yes
- depends+=" python-six"
- short_desc+=" - LLDB debugger"
- homepage="https://lldb.llvm.org/"
- pkg_install() {
- vmove usr/bin/*lldb*
- vmove usr/lib/liblldb*so.*
- vman tools/lldb/docs/lldb.1
- vmove /usr/lib/python*
- # Depend on python-six instead of conflicting
- rm "${PKGDESTDIR}/usr/lib/python2.7/site-packages/six.py"
- }
-}
-
-lldb-devel_package() {
- depends="lldb>=${version}_${revision}"
- short_desc+=" - LLDB debugger - development files"
- pkg_install() {
- vmove usr/include/lldb
- vmove "usr/lib/liblldb*.a"
- vmove "usr/lib/liblldb*.so"
- }
-}
-
libllvm8_package() {
short_desc+=" - runtime library"
pkg_install() {
From b9be3806876d26db07b2ed361a6825f6ab5108ba Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:25:26 +0200
Subject: [PATCH 02/22] New package: llvm9-9.0.0
---
common/shlibs | 8 +-
srcpkgs/clang | 1 +
srcpkgs/clang-analyzer | 1 +
srcpkgs/clang-tools-extra | 1 +
srcpkgs/libllvm9 | 1 +
srcpkgs/lld | 1 +
srcpkgs/lld-devel | 1 +
srcpkgs/lldb | 1 +
srcpkgs/lldb-devel | 1 +
srcpkgs/llvm9/files/llvm-Config-config.h | 9 +
srcpkgs/llvm9/files/llvm-Config-llvm-config.h | 9 +
.../cfe-001-fix-unwind-chain-inclusion.patch | 44 +++
.../cfe/cfe-002-add-musl-triples.patch | 91 ++++++
.../cfe-003-ppc64-dynamic-linker-path.patch | 18 ++
.../cfe/cfe-004-ppc64-musl-elfv2.patch | 27 ++
.../files/patches/cfe/cfe-005-gcc9.patch | 40 +++
srcpkgs/llvm9/files/patches/lldb/musl.patch | 31 ++
.../files/patches/llvm/llvm-001-musl.patch | 58 ++++
.../llvm/llvm-002-musl-ppc64-elfv2.patch | 31 ++
.../patches/llvm/llvm-003-secureplt.patch | 25 ++
.../patches/llvm/llvm-004-override-opt.patch | 18 ++
srcpkgs/llvm9/template | 283 ++++++++++++++++++
srcpkgs/llvm9/update | 2 +
23 files changed, 698 insertions(+), 4 deletions(-)
create mode 120000 srcpkgs/clang
create mode 120000 srcpkgs/clang-analyzer
create mode 120000 srcpkgs/clang-tools-extra
create mode 120000 srcpkgs/libllvm9
create mode 120000 srcpkgs/lld
create mode 120000 srcpkgs/lld-devel
create mode 120000 srcpkgs/lldb
create mode 120000 srcpkgs/lldb-devel
create mode 100644 srcpkgs/llvm9/files/llvm-Config-config.h
create mode 100644 srcpkgs/llvm9/files/llvm-Config-llvm-config.h
create mode 100644 srcpkgs/llvm9/files/patches/cfe/cfe-001-fix-unwind-chain-inclusion.patch
create mode 100644 srcpkgs/llvm9/files/patches/cfe/cfe-002-add-musl-triples.patch
create mode 100644 srcpkgs/llvm9/files/patches/cfe/cfe-003-ppc64-dynamic-linker-path.patch
create mode 100644 srcpkgs/llvm9/files/patches/cfe/cfe-004-ppc64-musl-elfv2.patch
create mode 100644 srcpkgs/llvm9/files/patches/cfe/cfe-005-gcc9.patch
create mode 100644 srcpkgs/llvm9/files/patches/lldb/musl.patch
create mode 100644 srcpkgs/llvm9/files/patches/llvm/llvm-001-musl.patch
create mode 100644 srcpkgs/llvm9/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch
create mode 100644 srcpkgs/llvm9/files/patches/llvm/llvm-003-secureplt.patch
create mode 100644 srcpkgs/llvm9/files/patches/llvm/llvm-004-override-opt.patch
create mode 100644 srcpkgs/llvm9/template
create mode 100644 srcpkgs/llvm9/update
diff --git a/common/shlibs b/common/shlibs
index bcbd4332cc7..2bddb207419 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1021,13 +1021,13 @@ 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.8 lldb-8.0.0_1
-libclang.so.8 clang-8.0.0_1
+liblldb.so.9 lldb-9.0.0_1
+libclang.so.9 clang-9.0.0_1
+libclang-cpp.so.9 clang-9.0.0_1
libLLVM-6.0.so libllvm6.0-6.0.0_1
libLLVM-7.so libllvm7-7.0.0_1
libLLVM-8.so libllvm8-8.0.0_1
-libOptRemarks.so.8 libllvm8-8.0.0_1
-libLTO.so.8 libllvm8-8.0.0_1
+libLLVM-9.so libllvm9-9.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
diff --git a/srcpkgs/clang b/srcpkgs/clang
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/clang
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/clang-analyzer b/srcpkgs/clang-analyzer
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/clang-analyzer
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
--git a/srcpkgs/clang-tools-extra b/srcpkgs/clang-tools-extra
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/clang-tools-extra
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/libllvm9 b/srcpkgs/libllvm9
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/libllvm9
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/lld b/srcpkgs/lld
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/lld
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/lld-devel b/srcpkgs/lld-devel
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/lld-devel
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/lldb b/srcpkgs/lldb
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/lldb
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/lldb-devel b/srcpkgs/lldb-devel
new file mode 120000
index 00000000000..14540d7bad2
--- /dev/null
+++ b/srcpkgs/lldb-devel
@@ -0,0 +1 @@
+llvm9
\ No newline at end of file
diff --git a/srcpkgs/llvm9/files/llvm-Config-config.h b/srcpkgs/llvm9/files/llvm-Config-config.h
new file mode 100644
index 00000000000..c369b4551f7
--- /dev/null
+++ b/srcpkgs/llvm9/files/llvm-Config-config.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "config-32.h"
+#elif __WORDSIZE == 64
+#include "config-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/srcpkgs/llvm9/files/llvm-Config-llvm-config.h b/srcpkgs/llvm9/files/llvm-Config-llvm-config.h
new file mode 100644
index 00000000000..2fa08c9be69
--- /dev/null
+++ b/srcpkgs/llvm9/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/llvm9/files/patches/cfe/cfe-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm9/files/patches/cfe/cfe-001-fix-unwind-chain-inclusion.patch
new file mode 100644
index 00000000000..04244bcc274
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/cfe/cfe-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/lib/Headers/unwind.h
++++ b/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/llvm9/files/patches/cfe/cfe-002-add-musl-triples.patch b/srcpkgs/llvm9/files/patches/cfe/cfe-002-add-musl-triples.patch
new file mode 100644
index 00000000000..aefc88d48f5
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/cfe/cfe-002-add-musl-triples.patch
@@ -0,0 +1,91 @@
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -1938,7 +1938,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"};
+@@ -2077,6 +2078,78 @@ 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 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::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));
++ 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/llvm9/files/patches/cfe/cfe-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm9/files/patches/cfe/cfe-003-ppc64-dynamic-linker-path.patch
new file mode 100644
index 00000000000..4b9b0b891d5
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/cfe/cfe-003-ppc64-dynamic-linker-path.patch
@@ -0,0 +1,18 @@
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -593,12 +593,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+ Loader = "ld.so.1";
+ break;
+ case llvm::Triple::ppc64:
+- LibDir = "lib64";
++ LibDir = "lib";
+ Loader =
+- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
++ (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
+ break;
+ case llvm::Triple::ppc64le:
+- LibDir = "lib64";
++ LibDir = "lib";
+ Loader =
+ (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
+ break;
diff --git a/srcpkgs/llvm9/files/patches/cfe/cfe-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm9/files/patches/cfe/cfe-004-ppc64-musl-elfv2.patch
new file mode 100644
index 00000000000..14dfc007ed3
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/cfe/cfe-004-ppc64-musl-elfv2.patch
@@ -0,0 +1,27 @@
+--- a/lib/Basic/Targets/PPC.h
++++ b/lib/Basic/Targets/PPC.h
+@@ -376,11 +376,11 @@ public:
+
+ if ((Triple.getArch() == llvm::Triple::ppc64le)) {
+ resetDataLayout("e-m:e-i64:64-n32:64");
+- ABI = "elfv2";
+ } else {
+ resetDataLayout("E-m:e-i64:64-n32:64");
+- ABI = Triple.getEnvironment() == llvm::Triple::ELFv2 ? "elfv2" : "elfv1";
+ }
++ /* default to elfv2 always, ignore llvm's elfv2 triples */
++ ABI = "elfv2";
+
+ if (Triple.getOS() == llvm::Triple::AIX)
+ SuitableAlign = 64;
+--- a/lib/Driver/ToolChains/Clang.cpp
++++ b/lib/Driver/ToolChains/Clang.cpp
+@@ -1804,7 +1804,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
+ break;
+ }
+
+- ABIName = "elfv1";
++ ABIName = "elfv2";
+ break;
+ }
+ case llvm::Triple::ppc64le:
diff --git a/srcpkgs/llvm9/files/patches/cfe/cfe-005-gcc9.patch b/srcpkgs/llvm9/files/patches/cfe/cfe-005-gcc9.patch
new file mode 100644
index 00000000000..f600a6657ef
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/cfe/cfe-005-gcc9.patch
@@ -0,0 +1,40 @@
+From a1445cd0340006d7635101c4c2b27ae51328642c Mon Sep 17 00:00:00 2001
+From: Serge Guelton <sguelton@redhat.com>
+Date: Thu, 19 Sep 2019 00:54:40 +0000
+Subject: [PATCH] Initialize all fields in ABIArgInfo.
+
+Due to usage of an uninitialized fields, we end up with
+a Conditional jump or move depends on uninitialised value
+
+Fixes https://bugs.llvm.org/show_bug.cgi?id=40547
+
+Commited on behalf of Martin Liska <mliska@suse.cz>
+
+git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372281 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ include/clang/CodeGen/CGFunctionInfo.h | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/include/clang/CodeGen/CGFunctionInfo.h b/include/clang/CodeGen/CGFunctionInfo.h
+index 1f81072e23d0..5069d9af42a3 100644
+--- a/include/clang/CodeGen/CGFunctionInfo.h
++++ b/include/clang/CodeGen/CGFunctionInfo.h
+@@ -109,14 +109,12 @@ class ABIArgInfo {
+ UnpaddedCoerceAndExpandType = T;
+ }
+
+- ABIArgInfo(Kind K)
+- : TheKind(K), PaddingInReg(false), InReg(false) {
+- }
+-
+ public:
+- ABIArgInfo()
++ ABIArgInfo(Kind K = Direct)
+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
+- TheKind(Direct), PaddingInReg(false), InReg(false) {}
++ TheKind(K), PaddingInReg(false), InAllocaSRet(false),
++ IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false),
++ InReg(false), CanBeFlattened(false), SignExt(false) {}
+
+ static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
+ llvm::Type *Padding = nullptr,
diff --git a/srcpkgs/llvm9/files/patches/lldb/musl.patch b/srcpkgs/llvm9/files/patches/lldb/musl.patch
new file mode 100644
index 00000000000..37416bb478d
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/lldb/musl.patch
@@ -0,0 +1,31 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/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/llvm9/files/patches/llvm/llvm-001-musl.patch b/srcpkgs/llvm9/files/patches/llvm/llvm-001-musl.patch
new file mode 100644
index 00000000000..a0eddbf58be
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/llvm/llvm-001-musl.patch
@@ -0,0 +1,58 @@
+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 e0a1ee3..465b65a 100644
+--- a/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/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;
+
+diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
+index 5780764..1d548c1 100644
+--- a/utils/unittest/googletest/src/gtest.cc
++++ b/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
+--
+2.5.1
+
+--- a/lib/Support/Unix/DynamicLibrary.inc
++++ b/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/srcpkgs/llvm9/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch b/srcpkgs/llvm9/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch
new file mode 100644
index 00000000000..955a9a94626
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch
@@ -0,0 +1,31 @@
+This patches LLVM to use ELFv2 on ppc64 uncoditionally unless overridden. We
+need this because unlike most distros we use ELFv2 for both glibc and musl
+on big endian ppc64.
+
+--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -211,11 +211,11 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
+
+ switch (TT.getArch()) {
+ case Triple::ppc64le:
+- return PPCTargetMachine::PPC_ABI_ELFv2;
+ case Triple::ppc64:
+- if (TT.getEnvironment() == llvm::Triple::ELFv2)
+- return PPCTargetMachine::PPC_ABI_ELFv2;
+- return PPCTargetMachine::PPC_ABI_ELFv1;
++ /* default to ELFv2 always, don't care about llvm's stupid broken suffix
++ * triples; people can override the default properly via -mabi like gcc
++ */
++ return PPCTargetMachine::PPC_ABI_ELFv2;
+ default:
+ return PPCTargetMachine::PPC_ABI_UNKNOWN;
+ }
+--- a/test/CodeGen/PowerPC/ppc64-elf-abi.ll
++++ b/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/llvm9/files/patches/llvm/llvm-003-secureplt.patch b/srcpkgs/llvm9/files/patches/llvm/llvm-003-secureplt.patch
new file mode 100644
index 00000000000..829196497b2
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/llvm/llvm-003-secureplt.patch
@@ -0,0 +1,25 @@
+--- a/lib/Target/PowerPC/PPCSubtarget.cpp
++++ b/lib/Target/PowerPC/PPCSubtarget.cpp
+@@ -145,8 +145,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
+ if (isDarwin())
+ HasLazyResolverStubs = true;
+
+- if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
+- TargetTriple.isMusl())
++ if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() || isTargetLinux())
+ SecurePlt = true;
+
+ if (HasSPE && IsPPC64)
+--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -234,6 +234,10 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
+ if (TT.getArch() == Triple::ppc64)
+ return Reloc::PIC_;
+
++ // We force SecurePlt on 32-bit ppc linux which requires PIC
++ if (TT.isOSLinux() && (TT.getArch() == Triple::ppc))
++ return Reloc::PIC_;
++
+ // Rest are static by default.
+ return Reloc::Static;
+ }
diff --git a/srcpkgs/llvm9/files/patches/llvm/llvm-004-override-opt.patch b/srcpkgs/llvm9/files/patches/llvm/llvm-004-override-opt.patch
new file mode 100644
index 00000000000..30d1e14e193
--- /dev/null
+++ b/srcpkgs/llvm9/files/patches/llvm/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/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -893,6 +893,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/llvm9/template b/srcpkgs/llvm9/template
new file mode 100644
index 00000000000..4d4954df6f7
--- /dev/null
+++ b/srcpkgs/llvm9/template
@@ -0,0 +1,283 @@
+# Template file for 'llvm9'
+pkgname=llvm9
+version=9.0.0
+revision=1
+wrksrc="llvm-${version}.src"
+build_style=cmake
+configure_args="
+ -DCMAKE_BUILD_TYPE=Release
+ -DLLVM_INSTALL_UTILS=ON
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_ENABLE_RTTI=ON
+ -DLLVM_ENABLE_FFI=ON
+ -DLLVM_BINUTILS_INCDIR=/usr/include"
+hostmakedepends="groff perl python3 zlib-devel libffi-devel swig"
+makedepends="python3-devel zlib-devel libffi-devel libedit-devel
+ libxml2-devel binutils-devel libatomic-devel"
+depends="libllvm9"
+short_desc="Low Level Virtual Machine"
+maintainer="q66 <daniel@octaforge.org>"
+license="NCSA"
+homepage="https://www.llvm.org"
+distfiles="https://releases.llvm.org/${version}/llvm-${version}.src.tar.xz
+ https://releases.llvm.org/${version}/lldb-${version}.src.tar.xz
+ https://releases.llvm.org/${version}/lld-${version}.src.tar.xz
+ https://releases.llvm.org/${version}/cfe-${version}.src.tar.xz
+ https://releases.llvm.org/${version}/clang-tools-extra-${version}.src.tar.xz
+ https://releases.llvm.org/${version}/compiler-rt-${version}.src.tar.xz"
+checksum="d6a0565cf21f22e9b4353b2eb92622e8365000a9e90a16b09b56f8157eabfe84
+ 1e4c2f6a1f153f4b8afa2470d2e99dab493034c1ba8b7ffbbd7600de016d0794
+ 31c6748b235d09723fb73fea0c816ed5a3fab0f96b66f8fbc546a0fcc8688f91
+ 7ba81eef7c22ca5da688fdf9d88c20934d2d6b40bfe150ffd338900890aa4610
+ ea1c86ce352992d7b6f6649bc622f6a2707b9f8b7153e9f9181a35c76aa3ac10
+ 56e4cd96dd1d8c346b07b4d6b255f976570c6f2389697347a6c3dcb9e820d10e"
+disable_parallel_builds=yes
+lib32disabled=yes
+# necessary to override auto default
+python_version=3
+
+_lldb_enable=yes
+
+if [ "$CROSS_BUILD" ]; then
+ _lldb_enable=no
+fi
+
+case "$XBPS_TARGET_MACHINE" in
+ ppc64le*) ;;
+ ppc*) _lldb_enable=no ;;
+esac
+
+subpackages="clang-tools-extra clang clang-analyzer libllvm9"
+if [ "$_lldb_enable" = "yes" ]; then
+ # XXX fails to cross compile due to python
+ subpackages+=" lldb lldb-devel"
+fi
+subpackages+=" lld lld-devel"
+
+case "$XBPS_TARGET_MACHINE" in
+ armv5*) broken="Tries to assemble VFP instructions with armv5tel arch";;
+esac
+
+post_patch() {
+ # patches
+ cd ${XBPS_BUILDDIR}/llvm-${version}.src
+ for i in ${FILESDIR}/patches/llvm/llvm-*.patch; do
+ msg_normal "Applying $i to llvm\n"
+ patch -sNp1 -i ${i}
+ done
+
+ cd ${XBPS_BUILDDIR}/cfe-${version}.src
+ for i in ${FILESDIR}/patches/cfe/cfe-*.patch; do
+ msg_normal "Applying $i to cfe\n"
+ patch -sNp1 -i ${i}
+ done
+
+ if [ "$_lldb_enable" = "yes" ]; then
+ cd ${XBPS_BUILDDIR}/lldb-${version}.src
+ for i in ${FILESDIR}/patches/lldb/*.patch; do
+ msg_normal "Applying $i to lldb\n"
+ patch -sNp1 -i ${i}
+ done
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) sed -i 's|__ptrace_request|int|g' source/Plugins/Process/Linux/NativeProcessLinux.cpp ;;
+ esac
+ fi
+
+ # Move clang files into the llvm source.
+ if [ -d ${XBPS_BUILDDIR}/cfe-${version}.src ]; then
+ mv ${XBPS_BUILDDIR}/cfe-${version}.src ${wrksrc}/tools/clang
+ fi
+ # Move clang-tools-extra files into llvm source.
+ if [ -d ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ]; then
+ mv ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ${wrksrc}/tools/clang/tools/extra
+ fi
+ # Move lld files into the llvm source.
+ if [ -d ${XBPS_BUILDDIR}/lld-${version}.src ]; then
+ mv ${XBPS_BUILDDIR}/lld-${version}.src ${wrksrc}/tools/lld
+ fi
+ # Move lldb files into the llvm source.
+ if [ "$_lldb_enable" = "yes" -a -d ${XBPS_BUILDDIR}/lldb-${version}.src ]; then
+ mv ${XBPS_BUILDDIR}/lldb-${version}.src ${wrksrc}/tools/lldb
+ fi
+ # Move compiler-rt files into the llvm source.
+ if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then
+ mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src ${wrksrc}/projects/compiler-rt
+ fi
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ # Disable sanitizers
+ sed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' ${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake
+ ;;
+ esac
+
+}
+
+pre_configure() {
+ # 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
+ ppc|ppc-musl) 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
+ make ${makejobs} -C utils/TableGen
+ make ${makejobs} -C tools/clang/utils/TableGen
+ configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/build/HOST/bin/llvm-tblgen"
+ configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/build/HOST/bin/clang-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";;
+ esac
+ configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
+ configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
+}
+
+do_install() {
+ vlicense LICENSE.TXT
+
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
+
+ # Fix permissions of static libs
+ chmod -x ${DESTDIR}/usr/lib/*.a
+
+ # 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
+}
+
+clang-analyzer_package() {
+ archs=noarch
+ pycompile_dirs="usr/share/scan-view"
+ depends="clang-${version}_${revision} python3"
+ 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() {
+ depends="clang-${version}_${revision} python3"
+ short_desc+=" - Extra Clang tools"
+ homepage="https://clang.llvm.org/extra/"
+ pkg_install() {
+ vmove usr/bin/clang-apply-replacements
+ vmove usr/bin/clang-query
+ vmove usr/bin/clang-rename
+ vmove usr/bin/clang-tidy
+ vmove usr/bin/modularize
+ vmove "usr/lib/libclangApplyReplacements*"
+ vmove "usr/lib/libclangQuery*"
+ vmove "usr/lib/libclangTidy*"
+ vmove "usr/share/clang/*tidy*"
+ }
+}
+
+clang_package() {
+ lib32disabled=yes
+ depends="libstdc++-devel libgcc-devel binutils"
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) depends+=" musl-devel";;
+ *) depends+=" glibc-devel";;
+ esac
+ short_desc+=" - C language family frontend"
+ alternatives="cc:cc:/usr/bin/clang"
+ 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*"
+ vmove "usr/share/clang"
+ }
+}
+
+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*
+ }
+}
+
+lld-devel_package() {
+ lib32disabled=yes
+ short_desc+=" - linker - development files"
+ homepage="https://lld.llvm.org"
+ pkg_install() {
+ vmove usr/include/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.*
+ vman tools/lldb/docs/lldb.1
+ vmove /usr/lib/python*
+ # Depend on python3-six instead of conflicting
+ rm ${PKGDESTDIR}/usr/lib/python3*/site-packages/six.py
+ }
+}
+
+lldb-devel_package() {
+ depends="lldb>=${version}_${revision}"
+ short_desc+=" - LLDB debugger - development files"
+ pkg_install() {
+ vmove usr/include/lldb
+ vmove "usr/lib/liblldb*.so"
+ }
+}
+
+libllvm9_package() {
+ short_desc+=" - runtime library"
+ pkg_install() {
+ vmove "usr/lib/libLLVM-*.so*"
+ }
+}
diff --git a/srcpkgs/llvm9/update b/srcpkgs/llvm9/update
new file mode 100644
index 00000000000..3d09eaff373
--- /dev/null
+++ b/srcpkgs/llvm9/update
@@ -0,0 +1,2 @@
+site=https://releases.llvm.org/
+pattern="'\K[\d\.]*(?=')"
From ccdce51762d92a346f56aac6eb7b7719c52cd36a Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:35:25 +0200
Subject: [PATCH 03/22] llvm: update to 9.0.0
---
srcpkgs/llvm/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template
index bb84697f830..b6212fc8bfd 100644
--- a/srcpkgs/llvm/template
+++ b/srcpkgs/llvm/template
@@ -1,9 +1,9 @@
# Template file for 'llvm'
pkgname=llvm
-version=8.0.0
+version=9.0.0
revision=1
build_style=meta
-depends="llvm8"
+depends="llvm9"
short_desc="LLVM meta package"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="Public Domain"
From 30d92b590d59691b59e5a0d19c5d763e1f8244a6 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:38:51 +0200
Subject: [PATCH 04/22] llvm-libunwind: update to 9.0.0 + fix ppc32
---
srcpkgs/llvm-libunwind/patches/ppc32.patch | 63 ++++++++++++++++++++++
srcpkgs/llvm-libunwind/template | 8 +--
2 files changed, 67 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/llvm-libunwind/patches/ppc32.patch
diff --git a/srcpkgs/llvm-libunwind/patches/ppc32.patch b/srcpkgs/llvm-libunwind/patches/ppc32.patch
new file mode 100644
index 00000000000..1408a0aafb0
--- /dev/null
+++ b/srcpkgs/llvm-libunwind/patches/ppc32.patch
@@ -0,0 +1,63 @@
+This fixes build at least with gcc9 which does not define `__ppc__`.
+
+--- include/__libunwind_config.h
++++ 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
+--- src/UnwindRegistersRestore.S
++++ src/UnwindRegistersRestore.S
+@@ -392,7 +392,7 @@ Lnovec:
+ PPC64_LR(3)
+ bctr
+
+-#elif defined(__ppc__)
++#elif defined(__powerpc__)
+
+ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
+ //
+--- src/UnwindRegistersSave.S
++++ 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)
+--- src/config.h
++++ 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__)
+--- src/libunwind.cpp
++++ 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/llvm-libunwind/template b/srcpkgs/llvm-libunwind/template
index e6d02df3b8f..c5dd2da671e 100644
--- a/srcpkgs/llvm-libunwind/template
+++ b/srcpkgs/llvm-libunwind/template
@@ -1,18 +1,18 @@
# Template file for 'llvm-libunwind'
pkgname=llvm-libunwind
-version=7.0.1
+version=9.0.0
revision=1
build_style=cmake
wrksrc="libunwind-${version}.src"
-hostmakedepends="llvm7"
-makedepends="llvm7"
+hostmakedepends="llvm9"
+makedepends="llvm9"
make_build_args="VERBOSE=1"
short_desc="LLVM version of libunwind library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="NCSA, MIT"
homepage="https://llvm.org"
distfiles="https://www.llvm.org/releases/${version}/libunwind-${version}.src.tar.xz"
-checksum=89c852991dfd9279dbca9d5ac10b53c67ad7d0f54bbab7156e9f057a978b5912
+checksum=976a8d09e1424fb843210eecec00a506b956e6c31adda3b0d199e945be0d0db2
post_install() {
vmkdir usr/include
From bde27d03865e51d8b6c55baea0ee1914bf43d51b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:38:01 +0200
Subject: [PATCH 05/22] libcxxabi: update to 9.0.0
---
srcpkgs/libcxxabi/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/libcxxabi/template b/srcpkgs/libcxxabi/template
index fe748223ef3..03b9424deee 100644
--- a/srcpkgs/libcxxabi/template
+++ b/srcpkgs/libcxxabi/template
@@ -1,6 +1,6 @@
# Template file for 'libcxxabi'
pkgname=libcxxabi
-version=8.0.0
+version=9.0.0
revision=1
wrksrc="${pkgname}-${version}.src"
build_style=cmake
@@ -8,16 +8,16 @@ configure_args="-DLIBCXXABI_LIBCXX_INCLUDES=../libcxx/include
-DLIBCXXABI_USE_LLVM_UNWINDER=1
-DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
make_build_args="VERBOSE=1"
-hostmakedepends="llvm8"
-makedepends="llvm8 llvm-libunwind-devel"
+hostmakedepends="llvm9"
+makedepends="llvm9 llvm-libunwind-devel"
short_desc="Low-level support for libc++ standard library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="NCSA, MIT"
homepage="https://libcxxabi.llvm.org"
distfiles="https://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz
https://www.llvm.org/releases/${version}/libcxx-${version}.src.tar.xz"
-checksum="c2d6de9629f7c072ac20ada776374e9e3168142f20a46cdb9d6df973922b07cd
- c2902675e7c84324fb2c1e45489220f250ede016cc3117186785d9dc291f9de2"
+checksum="675041783565c906ac2f7f8b2bc5c40f14d871ecfa8ade34855aa18de95530e9
+ 3c4162972b5d3204ba47ac384aa456855a17b5e97422723d4758251acf1ed28c"
case "$XBPS_TARGET_MACHINE" in
armv[67]l)
From 9a43bf251f265079bbd3efe6e7facfaa808df99b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 00:37:15 +0200
Subject: [PATCH 06/22] libcxx: update to 9.0.0 + ppc long double patch
---
srcpkgs/libcxx/patches/ppc.patch | 22 ++++++++++++++++++++++
srcpkgs/libcxx/template | 6 +++---
2 files changed, 25 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/libcxx/patches/ppc.patch
diff --git a/srcpkgs/libcxx/patches/ppc.patch b/srcpkgs/libcxx/patches/ppc.patch
new file mode 100644
index 00000000000..adcb0c57b0d
--- /dev/null
+++ b/srcpkgs/libcxx/patches/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.
+
+--- include/limits
++++ 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/libcxx/template b/srcpkgs/libcxx/template
index df7444a470f..58af53e149e 100644
--- a/srcpkgs/libcxx/template
+++ b/srcpkgs/libcxx/template
@@ -1,13 +1,13 @@
# Template file for 'libcxx'
pkgname=libcxx
-version=8.0.0
+version=9.0.0
revision=1
wrksrc="${pkgname}-${version}.src"
build_style=cmake
configure_args+=" -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
-DLIBCXX_CXX_ABI_LIBRARY_PATH=${XBPS_CROSS_BASE}/usr/lib
-DLIBCXXABI_USE_LLVM_UNWINDER=1"
-hostmakedepends="llvm8 python"
+hostmakedepends="llvm9 python3"
makedepends="libcxxabi-devel llvm llvm-libunwind-devel"
make_build_args="VERBOSE=1"
short_desc="New implementation of the C++ standard library, targeting C++11, C++14 and above"
@@ -15,7 +15,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="NCSA, MIT"
homepage="https://libcxx.llvm.org"
distfiles="https://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
-checksum=c2902675e7c84324fb2c1e45489220f250ede016cc3117186785d9dc291f9de2
+checksum=3c4162972b5d3204ba47ac384aa456855a17b5e97422723d4758251acf1ed28c
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
From d0f8905a455e123a6c1e1d66a1609e630570dd99 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 01:34:09 +0200
Subject: [PATCH 07/22] bpftrace: rebuild for clang-9.0.0
---
srcpkgs/bpftrace/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/bpftrace/template b/srcpkgs/bpftrace/template
index cac5b779664..56d673d38e5 100644
--- a/srcpkgs/bpftrace/template
+++ b/srcpkgs/bpftrace/template
@@ -1,7 +1,7 @@
# Template file for 'bpftrace'
pkgname=bpftrace
version=0.9.2
-revision=1
+revision=2
build_style=cmake
configure_args="-DBUILD_TESTING=OFF" # needs root to run
hostmakedepends="pkg-config flex"
From b030559cf0bff666874ced0612a89e3ced8ea724 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 01:34:28 +0200
Subject: [PATCH 08/22] gnome-builder: rebuild for clang-9.0.0
---
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 ebed528508f..98a9a3eeff5 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.32.4
-revision=2
+revision=3
build_style=meson
configure_args="-Dwith_webkit=true -Dwith_sysprof=true -Dhelp=true"
hostmakedepends="appdata-tools desktop-file-utils flex gobject-introspection
From 33f56b1aacd158269ecd99ba828f76f4dd46c6be Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 01:34:51 +0200
Subject: [PATCH 09/22] kdevelop: rebuild for clang-9.0.0
---
srcpkgs/kdevelop/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kdevelop/template b/srcpkgs/kdevelop/template
index fefb49159df..ad3c8d13c32 100644
--- a/srcpkgs/kdevelop/template
+++ b/srcpkgs/kdevelop/template
@@ -1,7 +1,7 @@
# Template file for 'kdevelop'
pkgname=kdevelop
version=5.4.1
-revision=1
+revision=2
build_style=cmake
hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools"
makedepends="apr-util-devel clang grantlee5-devel kcmutils-devel kdevelop-pg-qt
From e16bc96e474753acf1796de8de6abbbb52aebea4 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 01:36:13 +0200
Subject: [PATCH 10/22] shiboken2: rebuild for clang-9.0.0 + fix build with
qt5.13
---
srcpkgs/shiboken2/patches/qstringlist.patch | 12 ++++++++++++
srcpkgs/shiboken2/template | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/shiboken2/patches/qstringlist.patch
diff --git a/srcpkgs/shiboken2/patches/qstringlist.patch b/srcpkgs/shiboken2/patches/qstringlist.patch
new file mode 100644
index 00000000000..2dc1e3d0885
--- /dev/null
+++ b/srcpkgs/shiboken2/patches/qstringlist.patch
@@ -0,0 +1,12 @@
+Fixes build with Qt 5.13.
+
+--- sources/shiboken2/ApiExtractor/clangparser/clangutils.h
++++ sources/shiboken2/ApiExtractor/clangparser/clangutils.h
+@@ -33,6 +33,7 @@
+ #include <QtCore/QPair>
+ #include <QtCore/QString>
+ #include <QtCore/QVector>
++#include <QtCore/QStringList>
+
+ QT_FORWARD_DECLARE_CLASS(QDebug)
+
diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template
index 437833aed3f..394d9ba4f94 100644
--- a/srcpkgs/shiboken2/template
+++ b/srcpkgs/shiboken2/template
@@ -1,7 +1,7 @@
# Template file for 'shiboken2'
pkgname=shiboken2
version=5.11.2
-revision=1
+revision=2
_pkgname="pyside-setup-everywhere-src-${version}"
wrksrc="$_pkgname"
configure_args="-DUSE_PYTHON_VERSION=3 -DCMAKE_INSTALL_PREFIX=/usr
From f9b29e8deff6b8da28522944ec2e51ff21e6798b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 01:36:34 +0200
Subject: [PATCH 11/22] codelite: rebuild for lldb-9.0.0
---
srcpkgs/codelite/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/codelite/template b/srcpkgs/codelite/template
index cb2ef04fca4..9ca8123dafe 100644
--- a/srcpkgs/codelite/template
+++ b/srcpkgs/codelite/template
@@ -1,7 +1,7 @@
# Template file for 'codelite'
pkgname=codelite
version=13.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DWITH_PCH=0
$(vopt_if sftp -DENABLE_SFTP=1)
From fdc780c0ae8f1aa535b0c65dc77d1421ef2df17b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:18:19 +0200
Subject: [PATCH 12/22] libGL: patch and rebuild for llvm-9.0.0
---
...1a6b776e0f874e0e14d9943ac2b06bcc4aad.patch | 26 +++++++++++++++++++
srcpkgs/libGL/template | 2 +-
2 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/libGL/patches/3fd21a6b776e0f874e0e14d9943ac2b06bcc4aad.patch
diff --git a/srcpkgs/libGL/patches/3fd21a6b776e0f874e0e14d9943ac2b06bcc4aad.patch b/srcpkgs/libGL/patches/3fd21a6b776e0f874e0e14d9943ac2b06bcc4aad.patch
new file mode 100644
index 00000000000..d0db64c76e0
--- /dev/null
+++ b/srcpkgs/libGL/patches/3fd21a6b776e0f874e0e14d9943ac2b06bcc4aad.patch
@@ -0,0 +1,26 @@
+From 3fd21a6b776e0f874e0e14d9943ac2b06bcc4aad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
+Date: Fri, 28 Jun 2019 11:07:39 +0200
+Subject: [PATCH] targets/opencl: Add clangASTMatchers library as dependency
+
+Fixes link failure since clang r364424 "[clang/DIVar] Emit the flag for
+params that have unmodified value", clangCodeGen depends on
+clangASTMatchers now.
+
+Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
+---
+ src/gallium/targets/opencl/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
+index 317ad8dab4a..650a2054cfb 100644
+--- src/gallium/targets/opencl/meson.build
++++ src/gallium/targets/opencl/meson.build
+@@ -51,6 +51,7 @@ libopencl = shared_library(
+ cpp.find_library('clangSema', dirs : llvm_libdir),
+ cpp.find_library('clangAnalysis', dirs : llvm_libdir),
+ cpp.find_library('clangAST', dirs : llvm_libdir),
++ cpp.find_library('clangASTMatchers', dirs : llvm_libdir),
+ cpp.find_library('clangEdit', dirs : llvm_libdir),
+ cpp.find_library('clangLex', dirs : llvm_libdir),
+ cpp.find_library('clangBasic', dirs : llvm_libdir),
diff --git a/srcpkgs/libGL/template b/srcpkgs/libGL/template
index 832417cc645..9fa3577dcbb 100644
--- a/srcpkgs/libGL/template
+++ b/srcpkgs/libGL/template
@@ -1,7 +1,7 @@
# Template file for 'libGL'
pkgname=libGL
version=19.1.7
-revision=1
+revision=2
wrksrc="mesa-${version}"
build_style=meson
configure_args="-Dshared-glapi=true -Dgbm=true -Degl=true
From dc9d81af6fac3877e5794205b9561b8ca47a4282 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:19:49 +0200
Subject: [PATCH 13/22] beignet: patch and rebuild for llvm-9.0.0
---
srcpkgs/beignet/patches/llvm8.patch | 56 ++++++++
srcpkgs/beignet/patches/llvm9.patch | 196 ++++++++++++++++++++++++++++
srcpkgs/beignet/template | 2 +-
3 files changed, 253 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/beignet/patches/llvm8.patch
create mode 100644 srcpkgs/beignet/patches/llvm9.patch
diff --git a/srcpkgs/beignet/patches/llvm8.patch b/srcpkgs/beignet/patches/llvm8.patch
new file mode 100644
index 00000000000..15128d1a115
--- /dev/null
+++ b/srcpkgs/beignet/patches/llvm8.patch
@@ -0,0 +1,56 @@
+From 75c152599a7c1739e6dadcdb9b377acf7e44d9cf Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Wed, 30 Jan 2019 12:42:34 +0000
+Subject: [PATCH] lang/beignet: unbreak with llvm80
+
+Regressed by https://github.com/llvm/llvm-project/commit/721d95713a9e
+
+unable to load /usr/local/lib/beignet//libgbeinterp.so which is part of the driver, please check!
+ld-elf.so.1: /usr/local/lib/beignet//libgbeinterp.so: Undefined symbol "_ZN4llvm24DisableABIBreakingChecksE"
+
+Regressed by https://github.com/llvm/llvm-project/commit/4a2d58e16acc
+
+backend/src/llvm/llvm_gen_backend.cpp:3076:5: error:
+ unknown type name 'TerminatorInst'
+ TerminatorInst *term = bb->getTerminator();
+ ^
+backend/src/llvm/llvm_gen_backend.cpp:3083:5: error:
+ unknown type name 'TerminatorInst'
+ TerminatorInst *term = bb->getTerminator();
+ ^
+
+--- backend/src/CMakeLists.txt.orig 2017-09-22 08:05:22 UTC
++++ backend/src/CMakeLists.txt
+@@ -168,6 +168,7 @@ add_dependencies(gbe beignet_bitcode)
+ endif (NOT (USE_STANDALONE_GBE_COMPILER STREQUAL "true"))
+
+ add_library(gbeinterp SHARED gbe_bin_interpreter.cpp)
++target_link_libraries(gbeinterp ${LLVM_MODULE_LIBS})
+
+ if (LLVM_VERSION_NODOT VERSION_EQUAL 34)
+ find_library(TERMINFO NAMES tinfo ncurses)
+--- backend/src/llvm/llvm_gen_backend.cpp.orig 2017-10-24 06:04:48 UTC
++++ backend/src/llvm/llvm_gen_backend.cpp
+@@ -3073,14 +3073,22 @@ namespace gbe
+
+
+ static unsigned getChildNo(BasicBlock *bb) {
++#if LLVM_VERSION_MAJOR < 8
+ TerminatorInst *term = bb->getTerminator();
++#else
++ Instruction *term = bb->getTerminator();
++#endif
+ return term->getNumSuccessors();
+ }
+
+ // return NULL if index out-range of children number
+ static BasicBlock *getChildPossible(BasicBlock *bb, unsigned index) {
+
++#if LLVM_VERSION_MAJOR < 8
+ TerminatorInst *term = bb->getTerminator();
++#else
++ Instruction *term = bb->getTerminator();
++#endif
+ unsigned childNo = term->getNumSuccessors();
+ BasicBlock *child = NULL;
+ if(index < childNo) {
diff --git a/srcpkgs/beignet/patches/llvm9.patch b/srcpkgs/beignet/patches/llvm9.patch
new file mode 100644
index 00000000000..83942a73472
--- /dev/null
+++ b/srcpkgs/beignet/patches/llvm9.patch
@@ -0,0 +1,196 @@
+Source: FreeBSD
+
+Regressed by https://github.com/llvm/llvm-project/commit/2e97d2aa1bd3
+
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::addMatcher(clang::ast_matchers::internal::Matcher<clang::Stmt> const&, clang::ast_matchers::MatchFinder::MatchCallback*)
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::MatchCallback::~MatchCallback()
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::match(clang::ast_type_traits::DynTypedNode const&, clang::ASTContext&)
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::MatchFinder(clang::ast_matchers::MatchFinder::MatchFinderOptions)
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::~MatchFinder()
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxMethodDecl
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxRecordDecl
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::unaryOperator
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxConstructExpr
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxConstructorDecl
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxOperatorCallExpr
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::expr
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::allOf
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::anyOf
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::eachOf
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::unless
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::varDecl
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::callExpr
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::castExpr
+ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::internal::hasAnyNameFunc(llvm::ArrayRef<llvm::StringRef const*>)
+ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
+c++: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Regressed by https://github.com/llvm/llvm-project/commit/13680223b9d8
+
+backend/src/llvm/llvm_intrinsic_lowering.cpp:80:19: error:
+ no viable conversion from 'llvm::FunctionCallee' to 'llvm::Constant *'
+ Constant* FCache = M->getOrInsertFunction(NewFn,
+ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+backend/src/llvm/llvm_sampler_fix.cpp:85:18: error:
+ no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *'
+ ...Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
+ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+backend/src/llvm/llvm_sampler_fix.cpp:127:18: error:
+ no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *'
+ ...Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
+ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+backend/src/llvm/llvm_profiling.cpp:166:27: error: no
+ matching function for call to 'cast'
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
+ ^~~~~~~~~~~~~~~~~~~~
+backend/src/llvm/llvm_device_enqueue.cpp:401:52: error:
+ no matching function for call to 'cast'
+ CallInst* newCI = builder.CreateCall(cast<llvm::Function>(mod->getOrInsertFunction(
+ ^~~~~~~~~~~~~~~~~~~~
+/usr/local/llvm90/include/llvm/Support/Casting.h:256:44: note: candidate function [with X = llvm::Function, Y
+ = llvm::FunctionCallee] not viable: expects an l-value for 1st argument
+inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
+ ^
+/usr/local/llvm90/include/llvm/Support/Casting.h:249:1: note: candidate template ignored: requirement
+ '!is_simple_type<llvm::FunctionCallee>::value' was not satisfied [with X = llvm::Function, Y =
+ llvm::FunctionCallee]
+cast(const Y &Val) {
+^
+/usr/local/llvm90/include/llvm/Support/Casting.h:263:46: note: candidate template ignored: could not match
+ 'Y *' against 'llvm::FunctionCallee'
+inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
+ ^
+/usr/local/llvm90/include/llvm/Support/Casting.h:271:1: note: candidate template ignored: could not match
+ 'unique_ptr<type-parameter-0-1, default_delete<type-parameter-0-1> >' against 'llvm::FunctionCallee'
+cast(std::unique_ptr<Y> &&Val) {
+^
+backend/src/llvm/llvm_profiling.cpp:188:25: error: no
+ matching function for call to 'cast'
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
+ ^~~~~~~~~~~~~~~~~~~~
+/usr/local/llvm90/include/llvm/Support/Casting.h:256:44: note: candidate function [with X = llvm::Function, Y
+ = llvm::FunctionCallee] not viable: expects an l-value for 1st argument
+inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
+ ^
+/usr/local/llvm90/include/llvm/Support/Casting.h:249:1: note: candidate template ignored: requirement
+ '!is_simple_type<llvm::FunctionCallee>::value' was not satisfied [with X = llvm::Function, Y =
+ llvm::FunctionCallee]
+cast(const Y &Val) {
+^
+/usr/local/llvm90/include/llvm/Support/Casting.h:263:46: note: candidate template ignored: could not match
+ 'Y *' against 'llvm::FunctionCallee'
+inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
+ ^
+/usr/local/llvm90/include/llvm/Support/Casting.h:271:1: note: candidate template ignored: could not match
+ 'unique_ptr<type-parameter-0-1, default_delete<type-parameter-0-1> >' against 'llvm::FunctionCallee'
+cast(std::unique_ptr<Y> &&Val) {
+^
+
+--- CMake/FindLLVM.cmake.orig 2017-09-22 08:05:22 UTC
++++ CMake/FindLLVM.cmake
+@@ -116,6 +116,9 @@ macro(add_one_lib name)
+ endmacro()
+
+ #Assume clang lib path same as llvm lib path
++if (LLVM_VERSION_NODOT VERSION_GREATER 80)
++add_one_lib("clang-cpp")
++endif (LLVM_VERSION_NODOT VERSION_GREATER 80)
+ add_one_lib("clangCodeGen")
+ add_one_lib("clangFrontend")
+ add_one_lib("clangSerialization")
+--- backend/src/llvm/llvm_intrinsic_lowering.cpp.orig 2017-10-24 06:04:48 UTC
++++ backend/src/llvm/llvm_intrinsic_lowering.cpp
+@@ -77,7 +77,11 @@ namespace gbe {
+ std::vector<Type *> ParamTys;
+ for (Value** I = ArgBegin; I != ArgEnd; ++I)
+ ParamTys.push_back((*I)->getType());
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ FunctionCallee FCache = M->getOrInsertFunction(NewFn,
++#else
+ Constant* FCache = M->getOrInsertFunction(NewFn,
++#endif
+ FunctionType::get(RetTy, ParamTys, false));
+
+ IRBuilder<> Builder(CI->getParent(), BasicBlock::iterator(CI));
+--- backend/src/llvm/llvm_sampler_fix.cpp.orig 2017-10-24 06:04:48 UTC
++++ backend/src/llvm/llvm_sampler_fix.cpp
+@@ -82,7 +82,11 @@ namespace gbe {
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40
+ Module *M = I->getParent()->getParent()->getParent();
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ FunctionCallee samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
++#else
+ Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
++#endif
+ #else
+ Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType(), nullptr);
+ #endif
+@@ -124,7 +128,11 @@ namespace gbe {
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40
+ Module *M = I->getParent()->getParent()->getParent();
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ FunctionCallee samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
++#else
+ Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());
++#endif
+ #else
+ Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType(), nullptr);
+ #endif
+--- backend/src/llvm/llvm_profiling.cpp.orig 2017-10-24 06:04:48 UTC
++++ backend/src/llvm/llvm_profiling.cpp
+@@ -163,10 +163,18 @@ namespace gbe
+ // __gen_ocl_store_timestamp(int nth, int type);
+ Value *Args[2] = {ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)};
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ builder->CreateCall(module->getOrInsertFunction(
++#else
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
++#endif
+ "__gen_ocl_calc_timestamp", Type::getVoidTy(module->getContext()),
+ IntegerType::getInt32Ty(module->getContext()),
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ IntegerType::getInt32Ty(module->getContext())),
++#else
+ IntegerType::getInt32Ty(module->getContext()))),
++#endif
+ ArrayRef<Value*>(Args));
+ #else
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
+@@ -185,10 +193,18 @@ namespace gbe
+ Value *Args2[2] = {profilingBuf, ConstantInt::get(intTy, profilingType)};
+
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ builder->CreateCall(module->getOrInsertFunction(
++#else
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
++#endif
+ "__gen_ocl_store_profiling", Type::getVoidTy(module->getContext()),
+ ptrTy,
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ IntegerType::getInt32Ty(module->getContext())),
++#else
+ IntegerType::getInt32Ty(module->getContext()))),
++#endif
+ ArrayRef<Value*>(Args2));
+ #else
+ builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction(
+--- backend/src/llvm/llvm_device_enqueue.cpp.orig 2017-10-24 06:04:48 UTC
++++ backend/src/llvm/llvm_device_enqueue.cpp
+@@ -398,8 +398,13 @@ namespace gbe {
+ std::vector<Type *> ParamTys;
+ for (Value** iter = args.begin(); iter != args.end(); ++iter)
+ ParamTys.push_back((*iter)->getType());
++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90
++ CallInst* newCI = builder.CreateCall(mod->getOrInsertFunction(
++ "__gen_enqueue_kernel_slm", FunctionType::get(intTy, ParamTys, false)), args);
++#else
+ CallInst* newCI = builder.CreateCall(cast<llvm::Function>(mod->getOrInsertFunction(
+ "__gen_enqueue_kernel_slm", FunctionType::get(intTy, ParamTys, false))), args);
++#endif
+ CI->replaceAllUsesWith(newCI);
+ deadInsnSet.insert(CI);
+ }
diff --git a/srcpkgs/beignet/template b/srcpkgs/beignet/template
index f56b3d1a0ae..3c42546617b 100644
--- a/srcpkgs/beignet/template
+++ b/srcpkgs/beignet/template
@@ -1,7 +1,7 @@
# Template file for 'beignet'
pkgname=beignet
version=1.3.2
-revision=4
+revision=5
archs="i686* x86_64*"
wrksrc="Beignet-${version}-Source"
build_style=cmake
From 957e8a0ccd546c9f75abd77a27b688ccc229d8da Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:20:36 +0200
Subject: [PATCH 14/22] libclc-git: rebuild for llvm-9.0.0
---
srcpkgs/libclc-git/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/libclc-git/template b/srcpkgs/libclc-git/template
index 20ee5f6b589..40c42db08ed 100644
--- a/srcpkgs/libclc-git/template
+++ b/srcpkgs/libclc-git/template
@@ -1,7 +1,7 @@
# Template file for 'libclc-git'
pkgname=libclc-git
version=20181127
-revision=1
+revision=2
_git_hash=1ecb16dd7d8b8e9151027faab996f27b2ac508e3
wrksrc="libclc-${_git_hash}"
build_style=configure
From 2271eaafde29eb507077947188e40063b8abef63 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:20:57 +0200
Subject: [PATCH 15/22] juCi++: rebuild for llvm-9.0.0
---
srcpkgs/juCi++/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/juCi++/template b/srcpkgs/juCi++/template
index 7b4628be28d..dffd1d7119d 100644
--- a/srcpkgs/juCi++/template
+++ b/srcpkgs/juCi++/template
@@ -1,7 +1,7 @@
# Template file for 'juCi++'
pkgname=juCi++
version=1.5.0
-revision=1
+revision=2
_libclangmm_commit="687b9c231d850504ec515acb9ccab73f26c34063"
_tiny_commit="a6773276efdbc322f1abb0159301f5502647eb52"
wrksrc="jucipp-v${version}"
From 14141dd15f397ae05a7c1a706bf6e0fcaf92bb91 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:21:37 +0200
Subject: [PATCH 16/22] rtags: rebuild for clang-9.0.0
---
srcpkgs/rtags/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rtags/template b/srcpkgs/rtags/template
index 3ac8ac10ec8..d55cef3e284 100644
--- a/srcpkgs/rtags/template
+++ b/srcpkgs/rtags/template
@@ -1,7 +1,7 @@
# Template file for 'rtags'
pkgname=rtags
version=2.22
-revision=2
+revision=3
build_style=cmake
# Don't run tests in do_install, please.
configure_args="-DSKIP_CTEST=TRUE"
From 1e2259adeceea97394a5f1a388b5b7e7a60ec71a Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:22:02 +0200
Subject: [PATCH 17/22] bcc: rebuild for llvm-9.0.0
---
srcpkgs/bcc/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/bcc/template b/srcpkgs/bcc/template
index 807f1425c1d..9bb274fb468 100644
--- a/srcpkgs/bcc/template
+++ b/srcpkgs/bcc/template
@@ -1,7 +1,7 @@
# Template file for 'bcc'
pkgname=bcc
version=0.10.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DREVISION=${version}"
hostmakedepends="flex"
From 802fb4160856b7bf36548b6b0da5b9e40147d9c6 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:22:36 +0200
Subject: [PATCH 18/22] ccls: rebuild for clang-9.0.0
---
srcpkgs/ccls/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/ccls/template b/srcpkgs/ccls/template
index b805d42eb20..e04cf8107ed 100644
--- a/srcpkgs/ccls/template
+++ b/srcpkgs/ccls/template
@@ -1,7 +1,7 @@
# Template file for 'ccls'
pkgname=ccls
version=0.20190823
-revision=1
+revision=2
build_style=cmake
hostmakedepends="clang-tools-extra"
makedepends="clang llvm ncurses-devel rapidjson zlib-devel"
From a21d4ce71e13bf5d6a6076f7617f8e4f12053ab2 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:23:02 +0200
Subject: [PATCH 19/22] clazy: rebuild for clang-9.0.0
---
srcpkgs/clazy/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/clazy/template b/srcpkgs/clazy/template
index 81f3176a363..5281f5f5507 100644
--- a/srcpkgs/clazy/template
+++ b/srcpkgs/clazy/template
@@ -1,7 +1,7 @@
# Template file for 'clazy'
pkgname=clazy
version=1.5
-revision=2
+revision=3
build_style=cmake
hostmakedepends="python"
makedepends="clang llvm"
From dd7323d91caf0add89f62242b6f6e96b2a0472b2 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:23:16 +0200
Subject: [PATCH 20/22] include-what-you-use: rebuild for clang-9.0.0
---
srcpkgs/include-what-you-use/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/include-what-you-use/template b/srcpkgs/include-what-you-use/template
index 5ebf9a70d2a..331c4441fa2 100644
--- a/srcpkgs/include-what-you-use/template
+++ b/srcpkgs/include-what-you-use/template
@@ -1,7 +1,7 @@
# Template file for 'include-what-you-use'
pkgname=include-what-you-use
version=0.12
-revision=1
+revision=2
wrksrc="${pkgname}"
build_style=cmake
configure_args="-DIWYU_LLVM_ROOT_PATH=${XBPS_CROSS_BASE}/usr "
From baabc65a9b380ac72ab342817f1fe13d7b96a751 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 23 Sep 2019 19:23:42 +0200
Subject: [PATCH 21/22] qtcreator: patch and rebuild for clang-9.0.0
[ci skip]
---
srcpkgs/qtcreator/patches/clang9.patch | 11 +++++++++++
srcpkgs/qtcreator/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qtcreator/patches/clang9.patch
diff --git a/srcpkgs/qtcreator/patches/clang9.patch b/srcpkgs/qtcreator/patches/clang9.patch
new file mode 100644
index 00000000000..25a1a861746
--- /dev/null
+++ b/srcpkgs/qtcreator/patches/clang9.patch
@@ -0,0 +1,11 @@
+--- src/plugins/clangformat/clangformatutils.cpp
++++ src/plugins/clangformat/clangformatutils.cpp
+@@ -60,7 +60,7 @@ static clang::format::FormatStyle qtcStyle()
+ style.AllowShortBlocksOnASingleLine = false;
+ style.AllowShortCaseLabelsOnASingleLine = false;
+ style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
+- style.AllowShortIfStatementsOnASingleLine = false;
++ style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
+ style.AllowShortLoopsOnASingleLine = false;
+ style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
+ style.AlwaysBreakBeforeMultilineStrings = false;
diff --git a/srcpkgs/qtcreator/template b/srcpkgs/qtcreator/template
index 8240353ee61..efa09bbf07e 100644
--- a/srcpkgs/qtcreator/template
+++ b/srcpkgs/qtcreator/template
@@ -1,7 +1,7 @@
# Template file for 'qtcreator'
pkgname=qtcreator
version=4.9.2
-revision=3
+revision=4
wrksrc="qt-creator-opensource-src-${version}"
build_style=qmake
make_install_args="INSTALL_ROOT=\${DESTDIR}/usr"
From 36c830571a5259fb52e9dfa4839ff40bbdfd899e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 24 Sep 2019 14:02:01 +0200
Subject: [PATCH 22/22] afl: update to 2.55b + clang 8/9 fix
[ci skip]
---
srcpkgs/afl/template | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/afl/template b/srcpkgs/afl/template
index 9842510d59f..59d0f7325ef 100644
--- a/srcpkgs/afl/template
+++ b/srcpkgs/afl/template
@@ -1,7 +1,8 @@
# Template file for 'afl'
pkgname=afl
-version=2.52b
+version=2.55b
revision=1
+wrksrc="AFL-${version}"
build_style=gnu-makefile
# x86 only currently
archs="i686* x86_64*"
@@ -9,17 +10,17 @@ hostmakedepends="llvm clang"
short_desc="American fuzzy lop - a brute-force fuzzer"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
-homepage="http://lcamtuf.coredump.cx/afl/"
-distfiles="http://lcamtuf.coredump.cx/afl/releases/afl-${version}.tgz"
-checksum=43614b4b91c014d39ef086c5cc84ff5f068010c264c2c05bf199df60898ce045
+homepage="https://github.com/google/AFL/"
+distfiles="https://github.com/google/AFL/archive/v${version}.tar.gz"
+checksum=ca96fa6fac76f1ee104762cc9313be37a398f936f2b0e8a9f66e94244ae6babc
nostrip_files="small_archive.a small_exec.elf"
do_build() {
make PREFIX=/usr
- CFLAGS="${CFLAGS} -fPIC" \
- CXXFLAGS="${CXXFLAGS} -fPIC" \
+ CFLAGS="${CFLAGS//-fstack-clash-protection} -fPIC" \
+ CXXFLAGS="${CXXFLAGS//-fstack-clash-protection} -fPIC" \
LDFLAGS="${LDFLAGS} -pie" \
make PREFIX=/usr CC=clang CXX=clang++ -C llvm_mode
}
next prev parent reply other threads:[~2019-09-25 20:29 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-22 22:50 [PR PATCH] llvm9 voidlinux-github
2019-09-22 23:29 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-22 23:29 ` voidlinux-github
2019-09-22 23:40 ` llvm9 voidlinux-github
2019-09-22 23:52 ` llvm9 voidlinux-github
2019-09-23 0:34 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-23 0:34 ` voidlinux-github
2019-09-23 0:35 ` llvm9 voidlinux-github
2019-09-23 1:29 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-23 1:29 ` voidlinux-github
2019-09-23 2:34 ` voidlinux-github
2019-09-23 2:34 ` voidlinux-github
2019-09-23 15:54 ` voidlinux-github
2019-09-23 15:54 ` voidlinux-github
2019-09-23 15:56 ` llvm9 voidlinux-github
2019-09-23 20:19 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-23 20:19 ` voidlinux-github
2019-09-23 20:51 ` voidlinux-github
2019-09-23 20:51 ` voidlinux-github
2019-09-23 22:17 ` voidlinux-github
2019-09-23 22:17 ` voidlinux-github
2019-09-24 1:14 ` voidlinux-github
2019-09-24 1:14 ` voidlinux-github
2019-09-24 11:34 ` llvm9 voidlinux-github
2019-09-24 11:34 ` llvm9 voidlinux-github
2019-09-24 11:35 ` llvm9 voidlinux-github
2019-09-24 11:37 ` llvm9 voidlinux-github
2019-09-24 11:38 ` llvm9 voidlinux-github
2019-09-24 11:43 ` llvm9 voidlinux-github
2019-09-24 11:46 ` llvm9 voidlinux-github
2019-09-24 12:02 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-24 12:02 ` voidlinux-github
2019-09-24 12:03 ` llvm9 voidlinux-github
2019-09-24 12:10 ` llvm9 voidlinux-github
2019-09-24 12:11 ` llvm9 voidlinux-github
2019-09-24 12:44 ` llvm9 voidlinux-github
2019-09-24 12:53 ` llvm9 voidlinux-github
2019-09-24 12:58 ` llvm9 voidlinux-github
2019-09-24 13:10 ` llvm9 voidlinux-github
2019-09-24 14:01 ` llvm9 voidlinux-github
2019-09-24 16:52 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-24 16:52 ` voidlinux-github
2019-09-24 18:46 ` llvm9 voidlinux-github
2019-09-25 20:29 ` voidlinux-github [this message]
2019-09-25 20:29 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-25 20:31 ` llvm9 voidlinux-github
2019-09-25 20:52 ` [PR PATCH] [Updated] llvm9 voidlinux-github
2019-09-25 20:52 ` voidlinux-github
2019-09-25 20:53 ` llvm9 voidlinux-github
2019-09-26 17:41 ` llvm9 voidlinux-github
2019-09-26 18:08 ` [PR PATCH] [Merged]: llvm9 voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190925202905.z9HW2pd8tSEZyXuT6K3pb-fmq0pPW9DEY275TycHBXw@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).