From bc7b0080f49aaa8ca36c0630aee4b5fc28d3f4b1 Mon Sep 17 00:00:00 2001 From: q66 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 - srcpkgs/clang-tools-extra | 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 " 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 afb1f34f90524b25fe948d7402919dce8021fbd9 Mon Sep 17 00:00:00 2001 From: q66 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 71341b5c070..4a793547303 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 diff --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 + +#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 + +#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 +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() + /* 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 + + #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 +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 + +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 ++#include + +-#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 ++#undef pt_regs ++#else + #include +-#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 +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 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 // NOLINT ++# include // NOLINT + # include // NOLINT + # include // NOLINT + # include // 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 " +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 ea1ce72493b7d8892085cc2fb62898e87a755139 Mon Sep 17 00:00:00 2001 From: q66 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 " license="Public Domain" From a74d724ce15a80c3f833a53b1064c952cd60a47f Mon Sep 17 00:00:00 2001 From: q66 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 " 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 90f14b9e2ab4eea0a11e5a3d4f027ae4f5413c15 Mon Sep 17 00:00:00 2001 From: q66 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 " 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 795b4850d2b622539a8458e4800fb5c05c6558e1 Mon Sep 17 00:00:00 2001 From: q66 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 " 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 6e2aa2bc5bae476d6f5b61b38647bae2e5cf3984 Mon Sep 17 00:00:00 2001 From: q66 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 5c8e0b4b82ad1af3f50799c272e1fd58234966ce Mon Sep 17 00:00:00 2001 From: q66 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 98d1633e12834f1695a9642b85e06f26a89e6277 Mon Sep 17 00:00:00 2001 From: q66 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 691942d6c7fdfcc9d7135f4302be6c58c3d3f557 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 01:35:52 +0200 Subject: [PATCH 10/22] qt5: rebuild for clang-9.0.0 + patch build after pulse breakage --- srcpkgs/qt5/patches/0050-pulse-stubs.patch | 49 ++++++++++++++++++++++ srcpkgs/qt5/template | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/qt5/patches/0050-pulse-stubs.patch diff --git a/srcpkgs/qt5/patches/0050-pulse-stubs.patch b/srcpkgs/qt5/patches/0050-pulse-stubs.patch new file mode 100644 index 00000000000..c4f0fae86ee --- /dev/null +++ b/srcpkgs/qt5/patches/0050-pulse-stubs.patch @@ -0,0 +1,49 @@ +Pulse changed API in a recent update and these need to be fixed +in order to avoid build errors. + +--- qtwebengine/src/3rdparty/chromium/media/audio/pulse/pulse.sigs ++++ qtwebengine/src/3rdparty/chromium/media/audio/pulse/pulse.sigs +@@ -24,11 +24,11 @@ pa_operation* pa_context_get_source_info_by_index(pa_context* c, uint32_t idx, p + pa_operation* pa_context_get_source_info_by_name(pa_context* c, const char* name, pa_source_info_cb_t cb, void *userdata); + pa_operation* pa_context_get_source_info_list(pa_context* c, pa_source_info_cb_t cb, void* userdata); + pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata); +-pa_context_state_t pa_context_get_state(pa_context* c); ++pa_context_state_t pa_context_get_state(const pa_context* c); + pa_context* pa_context_new(pa_mainloop_api* mainloop, const char* name); + pa_operation* pa_context_set_source_volume_by_index(pa_context* c, uint32_t idx, const pa_cvolume* volume, pa_context_success_cb_t cb, void* userdata); + void pa_context_set_state_callback(pa_context* c, pa_context_notify_cb_t cb, void* userdata); +-pa_operation_state_t pa_operation_get_state(pa_operation* o); ++pa_operation_state_t pa_operation_get_state(const pa_operation* o); + void pa_context_unref(pa_context* c); + void pa_operation_unref(pa_operation* o); + int pa_stream_begin_write(pa_stream* p, void** data, size_t* nbytes); +@@ -38,23 +38,23 @@ pa_operation* pa_stream_cork(pa_stream* s, int b, pa_stream_success_cb_t cb, voi + int pa_stream_disconnect(pa_stream* s); + int pa_stream_drop(pa_stream *p); + pa_operation* pa_stream_flush(pa_stream* s, pa_stream_success_cb_t cb, void* userdata); +-uint32_t pa_stream_get_device_index(pa_stream* s); ++uint32_t pa_stream_get_device_index(const pa_stream* s); + int pa_stream_get_latency(pa_stream* s, pa_usec_t* r_usec, int* negative); +-pa_stream_state_t pa_stream_get_state(pa_stream* p); ++pa_stream_state_t pa_stream_get_state(const pa_stream* p); + pa_stream* pa_stream_new(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map * map); + pa_stream* pa_stream_new_with_proplist(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map* map, pa_proplist* p); + pa_proplist* pa_proplist_new(void); +-int pa_proplist_contains(pa_proplist* p, const char* key); ++int pa_proplist_contains(const pa_proplist* p, const char* key); + void pa_proplist_free(pa_proplist* p); +-const char* pa_proplist_gets(pa_proplist* p, const char* key); ++const char* pa_proplist_gets(const pa_proplist* p, const char* key); + int pa_proplist_sets(pa_proplist* p, const char* key, const char* value); +-size_t pa_stream_readable_size(pa_stream *p); ++size_t pa_stream_readable_size(const pa_stream *p); + int pa_stream_peek(pa_stream* p, const void** data, size_t* nbytes); + void pa_stream_set_read_callback(pa_stream* p, pa_stream_request_cb_t cb, void* userdata); + void pa_stream_set_state_callback(pa_stream* s, pa_stream_notify_cb_t cb, void* userdata); + int pa_stream_write(pa_stream* p, const void* data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek); + void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata); + void pa_stream_unref(pa_stream* s); +-int pa_context_errno(pa_context *c); ++int pa_context_errno(const pa_context *c); + const char* pa_strerror(int error); + pa_cvolume* pa_cvolume_set(pa_cvolume* a, unsigned channels, pa_volume_t v); diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index 610b2a88b07..05adb3bfeec 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,7 +1,7 @@ # Template file for 'qt5' pkgname=qt5 version=5.13.0 -revision=4 +revision=5 wrksrc="qt-everywhere-src-${version}" build_style=gnu-configure hostmakedepends="cmake clang flex git glib-devel gperf ninja pkg-config From c146308e9049bd6002631c10723a8913b6beb8c7 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 01:36:13 +0200 Subject: [PATCH 11/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 + #include + #include ++#include + + 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 e5f0a4568db756953950df59d5b671bb63dd6896 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 01:36:34 +0200 Subject: [PATCH 12/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 2c593a9a8e0166566b20f583bb69b8259afb825b Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:18:19 +0200 Subject: [PATCH 13/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?= +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 +--- + 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 31142bc720f534b687041e3a74440243f9dc8d33 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:19:49 +0200 Subject: [PATCH 14/22] beignet: rebuild for llvm-9.0.0 --- srcpkgs/beignet/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 dc1e1ddb1d1b1d245f893443b208363ae59514b9 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:20:36 +0200 Subject: [PATCH 15/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 b6e7ef29f770be3c66b84f35d31b6f5fcadccfbc Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:20:57 +0200 Subject: [PATCH 16/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 c7c0e3f275a..61f5c7bb0db 100644 --- a/srcpkgs/juCi++/template +++ b/srcpkgs/juCi++/template @@ -1,7 +1,7 @@ # Template file for 'juCi++' pkgname=juCi++ version=1.4.6 -revision=5 +revision=6 _libclangmm_commit="2b2f2ead1f685a9efb28ee2c0ff3cbe452a724dd" _tiny_commit="54b95a21cf35f8467e21038f523fd3342a77de4c" wrksrc="jucipp-v${version}" From f4e877d819f78ed5d9fe2ba4fe5bfb2928b8f84b Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:21:37 +0200 Subject: [PATCH 17/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 1452162570a9233a0f83f3edfdbe30fc6bc1ee50 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:22:02 +0200 Subject: [PATCH 18/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 e02b723c105ab913a861c89efefffa1f59e43083 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:22:36 +0200 Subject: [PATCH 19/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 6f4729e18c95af1449a379bb6d4d2aad6ecb6e4b Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:23:02 +0200 Subject: [PATCH 20/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 fec49d626988b1a71e47d26fe0ae0136e94bdb9a Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:23:16 +0200 Subject: [PATCH 21/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 f205c645b41e00837a5464a3718101f2775f48ff Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 19:23:42 +0200 Subject: [PATCH 22/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"