From 9762345374b0472830886eb2afceb86bb3fa7055 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 28 Feb 2019 21:35:35 +0100 Subject: [PATCH] llvm7: remove all subpackages but libllvm7 [ci skip] --- srcpkgs/llvm7/template | 174 +----------------- srcpkgs/llvm7/update | 1 + .../cfe/cfe-004-add-musl-triples.patch | 31 ++-- 3 files changed, 24 insertions(+), 182 deletions(-) diff --git a/srcpkgs/llvm7/template b/srcpkgs/llvm7/template index b91f6a5cf3c..6c8c64c47c5 100644 --- a/srcpkgs/llvm7/template +++ b/srcpkgs/llvm7/template @@ -1,7 +1,7 @@ # Template file for 'llvm7' pkgname=llvm7 version=7.0.1 -revision=5 +revision=6 wrksrc="llvm-${version}.src" build_style=cmake configure_args=" @@ -13,22 +13,11 @@ configure_args=" -DLLVM_ENABLE_FFI=ON -DLLVM_BINUTILS_INCDIR=/usr/include" short_desc="Low Level Virtual Machine" -maintainer="Juan RP " +maintainer="Rasmus Thomsen " license="NCSA" homepage="https://www.llvm.org" -distfiles=" - https://www.llvm.org/releases/${version}/llvm-${version}.src.tar.xz - https://www.llvm.org/releases/${version}/lldb-${version}.src.tar.xz - https://www.llvm.org/releases/${version}/lld-${version}.src.tar.xz - https://www.llvm.org/releases/${version}/cfe-${version}.src.tar.xz - https://www.llvm.org/releases/${version}/clang-tools-extra-${version}.src.tar.xz - https://www.llvm.org/releases/${version}/compiler-rt-${version}.src.tar.xz" -checksum="a38dfc4db47102ec79dcc2aa61e93722c5f6f06f0a961073bd84b78fb949419b - 76b46be75b412a3d22f0d26279306ae7e274fe4d7988a2184c529c38a6a76982 - 8869aab2dd2d8e00d69943352d3166d159d7eae2615f66a684f4a0999fc74031 - a45b62dde5d7d5fdcdfa876b0af92f164d434b06e9e89b5d0b1cbc65dfe3f418 - 4c93c7d2bb07923a8b272da3ef7914438080aeb693725f4fc5c19cd0e2613bed - 782edfc119ee172f169c91dd79f2c964fb6b248bd9b73523149030ed505bbe18" +distfiles="https://www.llvm.org/releases/${version}/llvm-${version}.src.tar.xz" +checksum=a38dfc4db47102ec79dcc2aa61e93722c5f6f06f0a961073bd84b78fb949419b disable_parallel_builds=yes lib32disabled=yes @@ -36,14 +25,10 @@ lib32disabled=yes hostmakedepends="groff perl python zlib-devel libffi-devel swig" makedepends="python-devel zlib-devel libffi-devel libedit-devel libxml2-devel binutils-devel libatomic-devel" depends="libllvm7" +# all of these provide llvm-config +conflicts="llvm>=0 llvm3.9>=0 llvm6.0>=0 llvm7>=0" -subpackages="clang-tools-extra clang clang-analyzer libllvm7" -if [ -z "$CROSS_BUILD" ]; then - # XXX fails to cross compile due to python - subpackages+=" lldb lldb-devel" -fi -subpackages+=" lld lld-devel" - +subpackages="libllvm7" case "$XBPS_TARGET_MACHINE" in armv5*) broken="Tries to assemble VFP instructions with armv5tel arch";; esac @@ -55,51 +40,6 @@ post_extract() { 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 [ -z "$CROSS_BUILD" ]; 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 [ -z "$CROSS_BUILD" -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() { @@ -115,9 +55,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 @@ -159,104 +97,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/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" - } -} - libllvm7_package() { short_desc+=" - runtime library" pkg_install() { diff --git a/srcpkgs/llvm7/update b/srcpkgs/llvm7/update index 3d09eaff373..071d14ce89e 100644 --- a/srcpkgs/llvm7/update +++ b/srcpkgs/llvm7/update @@ -1,2 +1,3 @@ site=https://releases.llvm.org/ pattern="'\K[\d\.]*(?=')" +ignore="8.*" diff --git a/srcpkgs/llvm8/files/patches/cfe/cfe-004-add-musl-triples.patch b/srcpkgs/llvm8/files/patches/cfe/cfe-004-add-musl-triples.patch index 04b3764dbc9..dc1038de10a 100644 --- a/srcpkgs/llvm8/files/patches/cfe/cfe-004-add-musl-triples.patch +++ b/srcpkgs/llvm8/files/patches/cfe/cfe-004-add-musl-triples.patch @@ -1,11 +1,11 @@ --- clang/lib/Driver/ToolChains/Gnu.cpp +++ clang/lib/Driver/ToolChains/Gnu.cpp -@@ -1812,7 +1812,7 @@ +@@ -1871,7 +1871,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", -- "aarch64-suse-linux"}; -+ "aarch64-suse-linux","aarch64-linux-musl"}; +- "aarch64-suse-linux", "aarch64-linux-android"}; ++ "aarch64-suse-linux", "aarch64-linux-android", "aarch64-linux-musl"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu"}; @@ -19,27 +19,28 @@ + "armv7l-linux-musleabihf", + "armv7l-linux-gnueabihf"}; static const char *const ARMebLibDirs[] = {"/lib"}; - static const char *const ARMebTriples[] = {"armeb-linux-gnueabi"}; - static const char *const ARMebHFTriples[] = { -@@ -1835,14 +1837,15 @@ + static const char *const ARMebTriples[] = {"armeb-linux-gnueabi", + "armeb-linux-androideabi"}; +@@ -1896,7 +1898,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux", "x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", -- "x86_64-amazon-linux"}; -+ "x86_64-amazon-linux", "x86_64-linux-musl"}; +- "x86_64-amazon-linux", "x86_64-linux-android"}; ++ "x86_64-amazon-linux", "x86_64-linux-android", ++ "x86_64-linux-musl"}; static const char *const X32LibDirs[] = {"/libx32"}; static const char *const X86LibDirs[] = {"/lib32", "/lib"}; static const char *const X86Triples[] = { - "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", - "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux", +@@ -1905,7 +1908,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux", -- "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu"}; -+ "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu", -+ "i686-linux-musl"}; + "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu", + "i686-linux-android", "i386-gnu", "i486-gnu", +- "i586-gnu", "i686-gnu"}; ++ "i586-gnu", "i686-gnu", "i686-linux-musl"}; static const char *const MIPSLibDirs[] = {"/lib"}; - static const char *const MIPSTriples[] = {"mips-linux-gnu", "mips-mti-linux", -@@ -1869,11 +1872,13 @@ + static const char *const MIPSTriples[] = { +@@ -1945,11 +1948,13 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const PPC64LibDirs[] = {"/lib64", "/lib"}; static const char *const PPC64Triples[] = { "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",