From b24bd25253fe093f722ab576d29fdc41d04cb1ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 2 Aug 2019 19:14:55 +0100 Subject: gentoo resync : 02.08.2019 --- sys-devel/llvm/Manifest | 19 ++- sys-devel/llvm/llvm-10.0.0.9999.ebuild | 295 ++++++++++++++++++++++++++++++++ sys-devel/llvm/llvm-5.0.2.ebuild | 5 +- sys-devel/llvm/llvm-6.0.1-r2.ebuild | 5 +- sys-devel/llvm/llvm-6.0.1.ebuild | 5 +- sys-devel/llvm/llvm-7.1.0.ebuild | 5 +- sys-devel/llvm/llvm-8.0.0.ebuild | 3 +- sys-devel/llvm/llvm-8.0.1.ebuild | 297 +++++++++++++++++++++++++++++++++ sys-devel/llvm/llvm-8.0.9999.ebuild | 290 -------------------------------- sys-devel/llvm/llvm-9.0.0.9999.ebuild | 290 ++++++++++++++++++++++++++++++++ sys-devel/llvm/llvm-9999.ebuild | 295 -------------------------------- sys-devel/llvm/metadata.xml | 1 + 12 files changed, 903 insertions(+), 607 deletions(-) create mode 100644 sys-devel/llvm/llvm-10.0.0.9999.ebuild create mode 100644 sys-devel/llvm/llvm-8.0.1.ebuild delete mode 100644 sys-devel/llvm/llvm-8.0.9999.ebuild create mode 100644 sys-devel/llvm/llvm-9.0.0.9999.ebuild delete mode 100644 sys-devel/llvm/llvm-9999.ebuild (limited to 'sys-devel/llvm') diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 0867f4a33440..1d7abde40c48 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -15,11 +15,14 @@ DIST llvm-7.1.0-manpages.tar.bz2 120786 BLAKE2B b52a7afe7c5c170894e910ef2c651a5f DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a DIST llvm-8.0.0-manpages.tar.bz2 140542 BLAKE2B e6c58865ace0b8848ffe825e931a639daa5b22099317b3263acf8df4b8d5e1e97ed54a85b9241e6874b112c67114bda5617c3014c3bc1430c179bdf389e77269 SHA512 198f5bde8c610aa7953b325fc29c2bebe5c3d81469af6273975ed32cd739a9936813fca7399acc49809c322cf73fbdaa77a834f889bd78fe4672024965ea47fb DIST llvm-8.0.0.src.tar.xz 30503732 BLAKE2B d89bdeb0ec7d885e49cfe5ae025da84f00502d409710c0807a3cdd58dbd47c50cf6a635593569483150f7f2ecb0de0310bd6785cb7625219bf9f6224a0d68e1c SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f -EBUILD llvm-5.0.2.ebuild 7860 BLAKE2B 1284c462ae0aff0d04246ae0eedcd024e7751a6f9cb2985137da2396d5440aa9540e33df6952b3f8fa650c00beaaa15f0f8fc869ebf81d7f44cd8baf59a0bf71 SHA512 a491a60e20b93e9641c16cfcee885e413a9aa1c5f8e415eed206729be5e216e67671a9a2ab941f7c1bbc04c5b80481e7546765fa010ed10e2f6bead9f04439e7 -EBUILD llvm-6.0.1-r2.ebuild 8228 BLAKE2B 261885b7faf3a402d85873105898621c7f21de94072649beb6633a7880102f0973df82d4bf89b002027a01064d0a1cc75aab6078c4978d96f27c302e76aebff0 SHA512 d86a8a66846a11f02b411f802838169a59b47b1e6cdc30b4c845c5b2a3c5ebd185fa1e069cfb4723e242b1b4f4ae6827e7a316d407eb137c48693882940aadef -EBUILD llvm-6.0.1.ebuild 7885 BLAKE2B 2cf239c7d2d57c770b7c5a5dc410310463a7ec8070c7a64111c2198dad583997c6d00bfd3b839900454c188731dbc256680b42ba5378786768c9f2d25fcc75af SHA512 25951305382f8e3a22f36ace407e4c33607acfc7b34afcee0ba2a1cfcf97171e615fb18702508a4fb2ebbf53b63d5fc1cde72a9b3ee3b77191585e767e67e364 -EBUILD llvm-7.1.0.ebuild 7838 BLAKE2B 2b50bd00fa8c0078314cc0e6027ee5a30ab5b56dfbac038761b134a003a39361f6bf05703e8626a1af31ddcf3ff27f42ea7e6e474d7ddd1d704721ee62d9b7ef SHA512 d3df515d8ddb98dca9dffffea6da6cd4bfcfbaf43c6d3cef461e4ab7b7dfc20061673f27b8280345db5dc8a2b23de184512ca7679a69a8b87ad37c0224998dbf -EBUILD llvm-8.0.0.ebuild 8800 BLAKE2B f8ca29bb91999d7949bc9ee18349208b60b81755182d96d711dda84b9875b99b4636b54b59364a18039766910feba03926dcea3a687e5c52a88f8fa7f44055c2 SHA512 10ae3e715787db1c66e67c62ae25f3fd806ead83c95449b6a5b176014fce3c1149c376863ebbb88fd780bf8a06329c0c32d3b27f24f91b7d99bfea49f74462bf -EBUILD llvm-8.0.9999.ebuild 8299 BLAKE2B 5dd8ce5c960c85129d3d656d45912dea61aebb349d832b991e32e0caf6999e19ed9bf4ca0a0443f259442dc98bb884ce6ced610362255367501842196cd53588 SHA512 a07e5a92731311902cf6ff54a9e770beb518cbd8d5061e708bcce0ae398a7498a941a1ffd63251357a62eb73af7d45332f5686ea93e7183d69e2761149e82009 -EBUILD llvm-9999.ebuild 8602 BLAKE2B 83550a5f4be9b6eb03a5ccb29bf8a63cdab1af42e54f1ab6791c67644f25aa14f2f0f1849a5789686707d890b47a105820cfd0e1f220ad3adbe7f6ee06dc9e94 SHA512 bd8d8eebf5147c7cf77c05cd41e32047efd473517e8cd9243fb3bd1052bd7a45682648956c25f680ee4d1c1732f005194fc0be6044dd0e36a1c06c525b26260c -MISC metadata.xml 2471 BLAKE2B 681c200c5f77cdb7a21c2b9c3c2872b020794b18348cca171830c52960519ed4b84c943d6f7eda9971897a04e633808a987604037f09b7350a8c8e6c3a0e0ce9 SHA512 87bfcc7022a9e6ba3265a18c13b6372b95137c74f82831c659452ce4a7a2126ac176d85f9e424f45bdf19044e83fb9f0221eb1db701736803236216d526261dc +DIST llvm-8.0.1-manpages.tar.bz2 140915 BLAKE2B 13ac9e172728d643dac1d12ac06909b6db3dd9a1a380a92a07867e3cb835f94b265da5d75c4712b5409405a65795d2cb6b32da4098e38cbb95d7023b56bcbbc1 SHA512 23994a2374659fbbf8d9b5160f4d77e9be7c4c9fc14963e8186bbede78b0ee9257f6b6a9c484bc75d72443d65bb24e598841e64af500336283de0f454d6a2073 +DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 +EBUILD llvm-10.0.0.9999.ebuild 8627 BLAKE2B b06e240ec255f7c394dcff7b2d34811e36ebca138959d46cb73903caf0e1380fd3ced9784b9e7c4c7f0bb7dcf1a9d59d3f4dc98bda96332dcb115815b18ba1b3 SHA512 8e61b538fc0d6aa87866b8b163f93ed074b45bbccc5051cbec7e9cbd62bc9f045fafda79bcc86fd2d9f19518bcc22b42924807cc67d1d681f53acdd3c0445a12 +EBUILD llvm-5.0.2.ebuild 7833 BLAKE2B 9dbae32f7f1831cf9ba86af4995598b90bf1205930622bd3052f1f795b28e294a475e3c26575d27779ed3643fa94a4f4b303a1563fe5a098f56a370e9374f274 SHA512 a618dbec79914f0e488c650ea8a65dc7037b770c5d5fda21bbce5aa1519eecbf64f252589dac8f7b359bddb6f49aba33815bd31e620c997cfe797e00ebec9ce7 +EBUILD llvm-6.0.1-r2.ebuild 8203 BLAKE2B bcb664d83cde52223c52881e5b0e2f5793ac5cb86db845fbd5de8f61e3eb401ce37ab4a674804c45ca18d5c12612332e7411b97e318874b4678653dcebfda906 SHA512 f9738bd691afee2572b5168eb655822b1eb437a8a805832870f0317fb2396c332fb02e87843a2e02bfef72d4dfc0bf03c1642b669e071e1ad9ad9b55fb1b7570 +EBUILD llvm-6.0.1.ebuild 7858 BLAKE2B 90e21a4f83b3e6097f219214a19238ab360119ba278167f9c7b2c11e573dfd6632d92fdc6c36f0a1e1adc54cb3da89ce0973b0027d849e10d1db45796eabfee5 SHA512 501d8ca0aaa746b7d1ef8f81e84464af0447a9ff7d97125d795c92f20d190181e6a918ba9e3bc86b8323e9263c514bfa516d118e04e7a023d075a1d98815a07b +EBUILD llvm-7.1.0.ebuild 7813 BLAKE2B 6b4a88270dcb99da54125683fbb42b9851a9d475743b233f9be06f7bf1617443aa25f65792d4dbf415346f4d125f336e650ffb2f07314ae0b51490afc19dee20 SHA512 5788b5120013b42acb78d57297db3c1498dbf85268fd49c047a35829ede9bfd5475260b5951ea61c688ba8857c4677c830c6de8c940a58b234c87ff40fb691a4 +EBUILD llvm-8.0.0.ebuild 8776 BLAKE2B d70558537f6559486e94b3399d8cc50831a8954ccf5d1db25efff3b9f39120f6c80d516e09362337c4d2d7f90696d0a94ab8d3722c78b1023bdee62d0a2f87ab SHA512 acfca36f8adfe265472ea7bf1128bab8a6567807169a01a8e10be67ab3a1830379528f9b0c7187a88544475f79ab00343c9fbef7336af994e94742f97156d4fc +EBUILD llvm-8.0.1.ebuild 8627 BLAKE2B f2aa6c4fabd3ea3524bde74e1b36ff0ff4557ab2bcd190edf9ce72f891baaa4887d34a5b1468695bcd446cdc5be5f48a5af3faf80e74c160f1e916c4b132c7d9 SHA512 ad4fb255a53749e46e7e627460569d29a4fb19aabc60d9dbaf663d377ac7b0308d1e7cf879045a731f115eb27b38952bc03cf662e8deb7479292a668ccfb4b58 +EBUILD llvm-9.0.0.9999.ebuild 8321 BLAKE2B 135cb49821d6cb8cfb80eb75d26374882f2066641b06cb1ca2485b0aa5b966f1b482cf17082c88ce30a4f7afb4579c42e6617f5434e783de5e88ad7a50951e96 SHA512 26e1740cf8af22da6be28c32105cf41d5982f1867da04df4328844ee16048e79dfb35e7cdd161146e8d032e3c0754c489709e2c3855ac96561f24d8cc70718df +MISC metadata.xml 2563 BLAKE2B ca85030788fb213fc891d895238fd75562cdd25cc5fe4271d709cb1c00ef56b0e8b367dc70cc18f7d185d6fbdb57333e219a984220b60141d28fb4784b2cb94a SHA512 8de68ee7f964e6eb2613bd2ff584f834e0f5a3ae8b303b5f2f10fda718a87af9b8ddfc19399950fe4eb8be515930124ced8018190af0f69da7ec5fe8180a68a2 diff --git a/sys-devel/llvm/llvm-10.0.0.9999.ebuild b/sys-devel/llvm/llvm-10.0.0.9999.ebuild new file mode 100644 index 000000000000..8f93e039da4f --- /dev/null +++ b/sys-devel/llvm/llvm-10.0.0.9999.ebuild @@ -0,0 +1,295 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + +inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" +SRC_URI="" +EGIT_REPO_URI="https://git.llvm.org/git/llvm.git + https://github.com/llvm-mirror/llvm.git" + +# Those are in lib/Targets, without explicit CMakeLists.txt mention +ALL_LLVM_EXPERIMENTAL_TARGETS=( AVR Nios2 RISCV ) +# Keep in sync with CMakeLists.txt +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore + "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. ARM backend: LLVM Software Grant by ARM. +# 3. MD5 code: public-domain. +# 4. Tests (not installed): +# a. gtest: BSD. +# b. YAML tests: MIT. + +LICENSE="UoI-NCSA rc BSD public-domain + llvm_targets_ARM? ( LLVM-Grant )" +SLOT="$(ver_cut 1)" +KEYWORDS="" +IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 + kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0= + exegesis? ( dev-libs/libpfm:= ) + gold? ( + || ( + >=sys-devel/binutils-2.31.1-r4:*[plugins] + =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" +# configparser-3.2 breaks the build (3.3 or none at all are fine) +DEPEND="${RDEPEND} + dev-lang/perl + || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 + ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) + ) + kernel_Darwin? ( + =sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + gold? ( sys-libs/binutils-libs ) + libffi? ( virtual/pkgconfig ) + !! SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + ) + + if multilib_is_native_abi; then + mycmakeargs+=( + -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use doc && mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + use gold && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake-utils_src_make check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + cmake-utils_src_install + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "10llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${SLOT}/share/man" +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-5.0.2.ebuild b/sys-devel/llvm/llvm-5.0.2.ebuild index 80b1b7799ed2..16c23e4ecfd0 100644 --- a/sys-devel/llvm/llvm-5.0.2.ebuild +++ b/sys-devel/llvm/llvm-5.0.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -70,8 +70,7 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" S=${WORKDIR}/${P/_/}.src diff --git a/sys-devel/llvm/llvm-6.0.1-r2.ebuild b/sys-devel/llvm/llvm-6.0.1-r2.ebuild index e63c8ba26ae2..cde232512825 100644 --- a/sys-devel/llvm/llvm-6.0.1-r2.ebuild +++ b/sys-devel/llvm/llvm-6.0.1-r2.ebuild @@ -32,7 +32,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LICENSE="UoI-NCSA rc BSD public-domain llvm_targets_ARM? ( LLVM-Grant )" SLOT="$(ver_cut 1)" -KEYWORDS="amd64 ~arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="debug doc gold libedit +libffi ncurses test xar xml kernel_Darwin ${ALL_LLVM_TARGETS[*]}" RESTRICT="!test? ( test )" @@ -72,8 +72,7 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" S=${WORKDIR}/${P/_/}.src diff --git a/sys-devel/llvm/llvm-6.0.1.ebuild b/sys-devel/llvm/llvm-6.0.1.ebuild index a326996a1901..d801ca21e89a 100644 --- a/sys-devel/llvm/llvm-6.0.1.ebuild +++ b/sys-devel/llvm/llvm-6.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -72,8 +72,7 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" S=${WORKDIR}/${P/_/}.src diff --git a/sys-devel/llvm/llvm-7.1.0.ebuild b/sys-devel/llvm/llvm-7.1.0.ebuild index 0a6f9fd206d0..0241b48c77ba 100644 --- a/sys-devel/llvm/llvm-7.1.0.ebuild +++ b/sys-devel/llvm/llvm-7.1.0.ebuild @@ -32,7 +32,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LICENSE="UoI-NCSA rc BSD public-domain llvm_targets_ARM? ( LLVM-Grant )" SLOT="$(ver_cut 1)/$(ver_cut 1-2)" -KEYWORDS="amd64 ~arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml kernel_Darwin ${ALL_LLVM_TARGETS[*]}" RESTRICT="!test? ( test )" @@ -73,8 +73,7 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT%/*} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" S=${WORKDIR}/${P/_/}.src diff --git a/sys-devel/llvm/llvm-8.0.0.ebuild b/sys-devel/llvm/llvm-8.0.0.ebuild index 212c6de12274..069d8dc2ebb8 100644 --- a/sys-devel/llvm/llvm-8.0.0.ebuild +++ b/sys-devel/llvm/llvm-8.0.0.ebuild @@ -77,8 +77,7 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" S=${WORKDIR}/${P/_/}.src diff --git a/sys-devel/llvm/llvm-8.0.1.ebuild b/sys-devel/llvm/llvm-8.0.1.ebuild new file mode 100644 index 000000000000..776acd7fbeb2 --- /dev/null +++ b/sys-devel/llvm/llvm-8.0.1.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \ + multiprocessing pax-utils python-any-r1 toolchain-funcs + +MY_P=${P}.src +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" +SRC_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/${MY_P}.tar.xz + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )" + +# Keep in sync with CMakeLists.txt +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. ARM backend: LLVM Software Grant by ARM. +# 3. MD5 code: public-domain. +# 4. Tests (not installed): +# a. gtest: BSD. +# b. YAML tests: MIT. + +LICENSE="UoI-NCSA rc BSD public-domain + llvm_targets_ARM? ( LLVM-Grant )" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml + kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0= + exegesis? ( dev-libs/libpfm:= ) + gold? ( + || ( + >=sys-devel/binutils-2.31.1-r4:*[plugins] + =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )" +# configparser-3.2 breaks the build (3.3 or none at all are fine) +DEPEND="${RDEPEND} + dev-lang/perl + || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 + ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) + ) + kernel_Darwin? ( + =sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + !doc? ( ${PYTHON_DEPS} ) + gold? ( sys-libs/binutils-libs ) + libffi? ( virtual/pkgconfig ) + !! SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + ) + + if multilib_is_native_abi; then + mycmakeargs+=( + -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use doc && mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + use gold && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake-utils_src_make check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + cmake-utils_src_install + + # move headers to /usr/include for wrapping + rm -rf "${ED%/}"/usr/include || die + mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "10llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + # install pre-generated manpages + if ! use doc; then + # (doman does not support custom paths) + insinto "/usr/lib/llvm/${SLOT}/share/man/man1" + doins "${WORKDIR}/${P}-manpages/llvm"/*.1 + fi + + docompress "/usr/lib/llvm/${SLOT}/share/man" +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT%/}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python 2.7 along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-8.0.9999.ebuild b/sys-devel/llvm/llvm-8.0.9999.ebuild deleted file mode 100644 index 762eed9364fe..000000000000 --- a/sys-devel/llvm/llvm-8.0.9999.ebuild +++ /dev/null @@ -1,290 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python2_7 ) - -inherit cmake-utils eapi7-ver flag-o-matic git-r3 multilib-minimal \ - multiprocessing pax-utils python-any-r1 toolchain-funcs - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" -EGIT_BRANCH="release_80" - -# Keep in sync with CMakeLists.txt -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - -# Additional licenses: -# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. -# 2. ARM backend: LLVM Software Grant by ARM. -# 3. MD5 code: public-domain. -# 4. Tests (not installed): -# a. gtest: BSD. -# b. YAML tests: MIT. - -LICENSE="UoI-NCSA rc BSD public-domain - llvm_targets_ARM? ( LLVM-Grant )" -SLOT="$(ver_cut 1)" -KEYWORDS="" -IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -RESTRICT="!test? ( test )" - -RDEPEND=" - sys-libs/zlib:0= - exegesis? ( dev-libs/libpfm:= ) - gold? ( - || ( - >=sys-devel/binutils-2.31.1-r4:*[plugins] - =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) - xar? ( app-arch/xar ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )" -# configparser-3.2 breaks the build (3.3 or none at all are fine) -DEPEND="${RDEPEND} - dev-lang/perl - || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 - ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) - ) - kernel_Darwin? ( - =sys-devel/binutils-apple-5.1 - ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - !doc? ( ${PYTHON_DEPS} ) - gold? ( sys-libs/binutils-libs ) - libffi? ( virtual/pkgconfig ) - !! SOVERSION when linking - # against libc++. This way we won't end up mixing LLVM libc++ - # libraries with libstdc++ clang, and the other way around. - mycmakeargs+=( - -DLLVM_VERSION_SUFFIX="libcxx" - ) - fi - -# Note: go bindings have no CMake rules at the moment -# but let's kill the check in case they are introduced -# if ! multilib_is_native_abi || ! use go; then - mycmakeargs+=( - -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND - ) -# fi - - use test && mycmakeargs+=( - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - ) - - if multilib_is_native_abi; then - mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=$(usex doc) - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_UTILS=ON - ) - use doc && mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - use gold && mycmakeargs+=( - -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include - ) - fi - - if tc-is-cross-compiler; then - local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" - [[ -x "${tblgen}" ]] \ - || die "${tblgen} not found or usable" - mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DLLVM_TABLEGEN="${tblgen}" - ) - fi - - # workaround BMI bug in gcc-7 (fixed in 7.4) - # https://bugs.gentoo.org/649880 - # apply only to x86, https://bugs.gentoo.org/650506 - if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && - [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] - then - local CFLAGS="${CFLAGS} -mno-bmi" - local CXXFLAGS="${CXXFLAGS} -mno-bmi" - fi - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake-utils_src_configure -} - -multilib_src_compile() { - cmake-utils_src_compile - - pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld - pax-mark m "${BUILD_DIR}"/bin/lli - pax-mark m "${BUILD_DIR}"/bin/lli-child-target - - if use test; then - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests - pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - cmake-utils_src_make check -} - -src_install() { - local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config - ) - - local MULTILIB_WRAPPED_HEADERS=( - /usr/include/llvm/Config/llvm-config.h - ) - - local LLVM_LDPATHS=() - multilib-minimal_src_install - - # move wrapped headers back - mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die -} - -multilib_src_install() { - cmake-utils_src_install - - # move headers to /usr/include for wrapping - rm -rf "${ED%/}"/usr/include || die - mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die - - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) -} - -multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) - newenvd - "10llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - # we need to duplicate it in ROOTPATH for Portage to respect... - ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" - _EOF_ - - docompress "/usr/lib/llvm/${SLOT}/share/man" -} - -pkg_postinst() { - elog "You can find additional opt-viewer utility scripts in:" - elog " ${EROOT%/}/usr/lib/llvm/${SLOT}/share/opt-viewer" - elog "To use these scripts, you will need Python 2.7 along with the following" - elog "packages:" - elog " dev-python/pygments (for opt-viewer)" - elog " dev-python/pyyaml (for all of them)" -} diff --git a/sys-devel/llvm/llvm-9.0.0.9999.ebuild b/sys-devel/llvm/llvm-9.0.0.9999.ebuild new file mode 100644 index 000000000000..dbdf1284b2a3 --- /dev/null +++ b/sys-devel/llvm/llvm-9.0.0.9999.ebuild @@ -0,0 +1,290 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + +inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" +SRC_URI="" +EGIT_REPO_URI="https://git.llvm.org/git/llvm.git + https://github.com/llvm-mirror/llvm.git" +EGIT_BRANCH="release_90" + +# Keep in sync with CMakeLists.txt +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. ARM backend: LLVM Software Grant by ARM. +# 3. MD5 code: public-domain. +# 4. Tests (not installed): +# a. gtest: BSD. +# b. YAML tests: MIT. + +LICENSE="UoI-NCSA rc BSD public-domain + llvm_targets_ARM? ( LLVM-Grant )" +SLOT="$(ver_cut 1)" +KEYWORDS="" +IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 + kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0= + exegesis? ( dev-libs/libpfm:= ) + gold? ( + || ( + >=sys-devel/binutils-2.31.1-r4:*[plugins] + =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" +# configparser-3.2 breaks the build (3.3 or none at all are fine) +DEPEND="${RDEPEND} + dev-lang/perl + || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 + ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) + ) + kernel_Darwin? ( + =sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + gold? ( sys-libs/binutils-libs ) + libffi? ( virtual/pkgconfig ) + !! SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + ) + + if multilib_is_native_abi; then + mycmakeargs+=( + -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use doc && mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + use gold && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake-utils_src_make check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + cmake-utils_src_install + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "10llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${SLOT}/share/man" +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild deleted file mode 100644 index f194df950517..000000000000 --- a/sys-devel/llvm/llvm-9999.ebuild +++ /dev/null @@ -1,295 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-utils eapi7-ver flag-o-matic git-r3 multilib-minimal \ - multiprocessing pax-utils python-any-r1 toolchain-funcs - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - -# Those are in lib/Targets, without explicit CMakeLists.txt mention -ALL_LLVM_EXPERIMENTAL_TARGETS=( AVR Nios2 RISCV ) -# Keep in sync with CMakeLists.txt -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - -# Additional licenses: -# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. -# 2. ARM backend: LLVM Software Grant by ARM. -# 3. MD5 code: public-domain. -# 4. Tests (not installed): -# a. gtest: BSD. -# b. YAML tests: MIT. - -LICENSE="UoI-NCSA rc BSD public-domain - llvm_targets_ARM? ( LLVM-Grant )" -SLOT="9" -KEYWORDS="" -IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -RESTRICT="!test? ( test )" - -RDEPEND=" - sys-libs/zlib:0= - exegesis? ( dev-libs/libpfm:= ) - gold? ( - || ( - >=sys-devel/binutils-2.31.1-r4:*[plugins] - =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) - xar? ( app-arch/xar ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )" -# configparser-3.2 breaks the build (3.3 or none at all are fine) -DEPEND="${RDEPEND} - dev-lang/perl - || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 - ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) - ) - kernel_Darwin? ( - =sys-devel/binutils-apple-5.1 - ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - !doc? ( ${PYTHON_DEPS} ) - gold? ( sys-libs/binutils-libs ) - libffi? ( virtual/pkgconfig ) - !! SOVERSION when linking - # against libc++. This way we won't end up mixing LLVM libc++ - # libraries with libstdc++ clang, and the other way around. - mycmakeargs+=( - -DLLVM_VERSION_SUFFIX="libcxx" - ) - fi - -# Note: go bindings have no CMake rules at the moment -# but let's kill the check in case they are introduced -# if ! multilib_is_native_abi || ! use go; then - mycmakeargs+=( - -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND - ) -# fi - - use test && mycmakeargs+=( - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - ) - - if multilib_is_native_abi; then - mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=$(usex doc) - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_UTILS=ON - ) - use doc && mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - use gold && mycmakeargs+=( - -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include - ) - fi - - if tc-is-cross-compiler; then - local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" - [[ -x "${tblgen}" ]] \ - || die "${tblgen} not found or usable" - mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DLLVM_TABLEGEN="${tblgen}" - ) - fi - - # workaround BMI bug in gcc-7 (fixed in 7.4) - # https://bugs.gentoo.org/649880 - # apply only to x86, https://bugs.gentoo.org/650506 - if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && - [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] - then - local CFLAGS="${CFLAGS} -mno-bmi" - local CXXFLAGS="${CXXFLAGS} -mno-bmi" - fi - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake-utils_src_configure -} - -multilib_src_compile() { - cmake-utils_src_compile - - pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld - pax-mark m "${BUILD_DIR}"/bin/lli - pax-mark m "${BUILD_DIR}"/bin/lli-child-target - - if use test; then - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests - pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - cmake-utils_src_make check -} - -src_install() { - local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config - ) - - local MULTILIB_WRAPPED_HEADERS=( - /usr/include/llvm/Config/llvm-config.h - ) - - local LLVM_LDPATHS=() - multilib-minimal_src_install - - # move wrapped headers back - mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die -} - -multilib_src_install() { - cmake-utils_src_install - - # move headers to /usr/include for wrapping - rm -rf "${ED%/}"/usr/include || die - mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die - - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) -} - -multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) - newenvd - "10llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - # we need to duplicate it in ROOTPATH for Portage to respect... - ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" - _EOF_ - - docompress "/usr/lib/llvm/${SLOT}/share/man" -} - -pkg_postinst() { - elog "You can find additional opt-viewer utility scripts in:" - elog " ${EROOT%/}/usr/lib/llvm/${SLOT}/share/opt-viewer" - elog "To use these scripts, you will need Python along with the following" - elog "packages:" - elog " dev-python/pygments (for opt-viewer)" - elog " dev-python/pyyaml (for all of them)" -} diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml index d07370205495..1f534c1999e7 100644 --- a/sys-devel/llvm/metadata.xml +++ b/sys-devel/llvm/metadata.xml @@ -17,5 +17,6 @@ Support querying terminal properties using ncurses' terminfo Support dumping LLVM bitcode sections in Mach-O files (uses app-arch/xar) + Enable support for sci-mathematics/z3 constraint solver -- cgit v1.2.3