From 5c42677148c717eb9f4673237db807f74740b4e9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 25 Aug 2024 14:56:25 +0100 Subject: gentoo auto-resync : 25:08:2024 - 14:56:25 --- sys-devel/Manifest.gz | Bin 7868 -> 7868 bytes sys-devel/gcc/Manifest | 2 + sys-devel/gcc/gcc-14.2.1_p20240824.ebuild | 53 +++ sys-devel/gnuconfig/Manifest | 2 + sys-devel/gnuconfig/gnuconfig-20240728.ebuild | 49 +++ sys-devel/llvm/Manifest | 6 + sys-devel/llvm/llvm-15.0.7-r6.ebuild | 520 ++++++++++++++++++++++++ sys-devel/llvm/llvm-16.0.6-r5.ebuild | 523 +++++++++++++++++++++++++ sys-devel/llvm/llvm-17.0.6-r3.ebuild | 542 ++++++++++++++++++++++++++ 9 files changed, 1697 insertions(+) create mode 100644 sys-devel/gcc/gcc-14.2.1_p20240824.ebuild create mode 100644 sys-devel/gnuconfig/gnuconfig-20240728.ebuild create mode 100644 sys-devel/llvm/llvm-15.0.7-r6.ebuild create mode 100644 sys-devel/llvm/llvm-16.0.6-r5.ebuild create mode 100644 sys-devel/llvm/llvm-17.0.6-r3.ebuild (limited to 'sys-devel') diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz index e628095d7218..1cde8ae402ec 100644 Binary files a/sys-devel/Manifest.gz and b/sys-devel/Manifest.gz differ diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 6c407c632cd1..547917b916ad 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -41,6 +41,7 @@ DIST gcc-14-20240727.tar.xz 88051096 BLAKE2B bb447e728275539688ba19d1f50c4f4936f DIST gcc-14-20240803.tar.xz 88016412 BLAKE2B 60301ac6acec9cea3001fda41e0dd10f6698cf0897e84750b28421c6425d28a2acfde8978a285052e44b54fc2244a181ed4430510df5920b8a94319727a5f19b SHA512 e9013bbbef39f67fcc63c9394513be43038f2fc5eebd098be3e5b90eb43bf8f2baf3ce72df1fe72ef2c327dffa103a4e1588c3c137944f7d602fb09498851328 DIST gcc-14-20240810.tar.xz 88012840 BLAKE2B 85f6513f4f4a001894fc22df6c53ce20d6af547191478d429da152f163406c6b320599445a58bef1e79bcacaae56b6bebab9bc9762a75c82bf65dd502e4e7048 SHA512 2b1fde696c9e97a15e9b3550145c74d031d6ad667ac62b51c11bc9e111caf229c6fc4530a18d876d31ab7554fc51263944b8c0182533b1e9275132ec6ce87887 DIST gcc-14-20240817.tar.xz 88024252 BLAKE2B 994b3e263246e344c6898943a17feb63f07b3de02777a77c689e001343119bd451e1ed5c6958f368077f10b4778c65fa492c55d164e2a0b1bbd65b275aae3cd1 SHA512 31de06694efeb2be49b64e9e8314a766d36c3d5f5f2d52d1e0419ba69262b7c344ef0700957eff11007ba5b81bd5e74dea2a2c0286990cb33927bac4a7db9756 +DIST gcc-14-20240824.tar.xz 88019780 BLAKE2B 8da729548e785196e1efb9e1d0ff522423196921e14828defc4c6bc176ea13c5fc76515bde7c293bf80025b54b6466b0ecd7e5ebda4307023d74704a6f19bdf6 SHA512 4ad87ded2468d5303e0a7dc51e85f82eb53c1f26aa2bcdc7aa341a159f0c2fafc43d32f1285f7fd8b359ae67e949c4556df73ba2bdcbbb05f3f8d9488052b081 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.1.0-patches-3.tar.xz 11868 BLAKE2B 06d079766bfbaddd066cd70f2d3f5e9ef17f3617fe90de4cb0a9562e6c3b2dc46d94dce03649f2e530c21e3fa0e0e6e5aae3c7b768bd08717c4f29ff29b00a04 SHA512 636a2853b5bf057fef262d54bcb250f3ebf63c600bc184cfea499783d254c462f6c0ecf5f0c5dac6634110ba0d11193fbfb96850ac27fc5a318f1d810f2231cc DIST gcc-14.1.0-patches-4.tar.xz 11620 BLAKE2B c819fbdea1f3bf10c8d4214d4c33cf28c1410171d2833b6f8c1225eeefe749ddb815067b3fdb750e5839761aee8d39ffc51ffb492f88e630076818a61b18362b SHA512 0d6e1b04591607dfc8022124b186ce499467c32db7667ee1a640fe2e07706597edc0e4ad5c7ebcb75c8f5fc6e45e9b9ef715402c71ff9ab21fe380007fe5d84f @@ -101,6 +102,7 @@ EBUILD gcc-14.2.1_p20240803.ebuild 1424 BLAKE2B 4be63d21fa7ca87116c82a7c9c9ec66f EBUILD gcc-14.2.1_p20240810.ebuild 1424 BLAKE2B 4be63d21fa7ca87116c82a7c9c9ec66f07e56d4b2164ff3b437a33f8a8f4d5cb1cc955a380d7c0ba30941a4744c1a0ac52030e8fe53a35d9aad555e57ebaff0a SHA512 3b9a7ea4b057ffc9bb007efbf62ced7d41d3f8b43bbe6e34043f0747d56c254f9ea0d91f0ab00935b0985bb02ac5d0483cf234ea97116ff58e7e40b78f1071f7 EBUILD gcc-14.2.1_p20240817-r1.ebuild 1424 BLAKE2B 757e83e2a0d2a4b119ee0d1bfae9342ca912d539c5d39e670915bf61ceac9b11dd8cb7022824861f241a173461fcbf175fe6ad370fc82b5fe813996abd718228 SHA512 bb2306312799c87361611cd05fd7ce6cbe2b02dbe68454f983c8703870032deb88ebf7b947bd5bcc3b428bc7565159c5a40a651240b1f10a1ba840ec32e00904 EBUILD gcc-14.2.1_p20240817.ebuild 1423 BLAKE2B aca2b0af18a0b6f4804f449f94063f2752bdf7619f1344772f9267a3d93b61d7c76196d3be96bf3f9b7aa4a30768c064f9a72bc14496959379a9c084691c6f23 SHA512 b5ede6a529624b73cadbf1637cf9f589f20562b5f499c6a6b4a6b0831c3cc321b031afab586a0deed7402a14ebe0e94e13a45f5e19f03f5e58037512bcf2dbd1 +EBUILD gcc-14.2.1_p20240824.ebuild 1424 BLAKE2B 757e83e2a0d2a4b119ee0d1bfae9342ca912d539c5d39e670915bf61ceac9b11dd8cb7022824861f241a173461fcbf175fe6ad370fc82b5fe813996abd718228 SHA512 bb2306312799c87361611cd05fd7ce6cbe2b02dbe68454f983c8703870032deb88ebf7b947bd5bcc3b428bc7565159c5a40a651240b1f10a1ba840ec32e00904 EBUILD gcc-14.3.9999.ebuild 1394 BLAKE2B d0a952b4d4dc5032efff8717a2d14e9d57c995847f77e23d9dde728c4ea859c6a15f6407aa87615a6dfa64ff0bcbaabd073f4b975c051632563e70247d336f90 SHA512 06bdc87af51e16a76beac56a8d2cf3403627278b3e6fa9e791f36614c1c3f5473bb75dff20aa8fb2c13d14f78dc0540a6e48e1310ddbf54335552261fa53629f EBUILD gcc-15.0.0_pre20240714-r1.ebuild 1343 BLAKE2B 9b3d091a2835e9fb2c44a8ac9af8c62ccf35da9b153b7e37091b7e4abe752943c70cde901b46865836456b4d47e718153f7a72049138682ab0f628038d167a8e SHA512 2bea3f8026a56adf799953bdaebacc56f460f69019657a765df0cdea3372a07f8eb00a88bec296fb90b4eef42d0dbddbe8143d5e0a02d552aedf063ae98b4f64 EBUILD gcc-15.0.0_pre20240714.ebuild 1343 BLAKE2B 19a9d4f8770afaa4b96760f9524b62c43caaee874b9e5f34c44ff6cab058b37ef9b7b4c3726fb70baaf76d501888014406c00b9c468c1deca456196b89994fa2 SHA512 27228f7b9a0d1cc9f7754012950347434b77f6a5596985a039291e40f472ddc97700e4389ef87cdb5280172918087c0fe195e7035850f58757c17998f73363c5 diff --git a/sys-devel/gcc/gcc-14.2.1_p20240824.ebuild b/sys-devel/gcc/gcc-14.2.1_p20240824.ebuild new file mode 100644 index 000000000000..261dc3f8707f --- /dev/null +++ b/sys-devel/gcc/gcc-14.2.1_p20240824.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.1.0" +PATCH_VER="5" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gnuconfig/Manifest b/sys-devel/gnuconfig/Manifest index 1519cc853a27..efcabc521bbc 100644 --- a/sys-devel/gnuconfig/Manifest +++ b/sys-devel/gnuconfig/Manifest @@ -1,6 +1,8 @@ DIST gnuconfig-20230731.tar.xz 73112 BLAKE2B c6502d6b339e56440dbfc9abb0ba49e3eec5a573c5e44779dd326e6f11b55b7fc3a6d99fec73abbcc271e8f6f125699ce87f512cb3a825144307cf820df0067a SHA512 d8e24a30f86f1983c69a37a901e2357a0aefbe15fcd3f8a331d1c6f8eabc81b7436930055756a764ae874e406090d8029403f1c0faa3737acb94bd937cd577ef DIST gnuconfig-20240101.tar.xz 76992 BLAKE2B a42e35c9858ac1eca409b29ecd71c787adad94bd977a35a8f74c870b3632b1031cd7c00e022c7837a8705a50316d3f618bfaedf569b63b4f75a33fc638330706 SHA512 2e6f1f83454335e2c111866bed2660d86919061c2e047c79d5e191ecb9411a28c0f269e8fddd8a212d38a2d0c4114e2a432e69bcbf8c7aee671db1ce15b34ae8 +DIST gnuconfig-20240728.tar.xz 82360 BLAKE2B 476cabe032305adc916dffa39f30f07ac8249449e79da06763f08af9b642399c5c08bd5cf6b7229d63ba36b55e0ca75692b5db058ae0aa75b6b6370f12209aba SHA512 a43067a6f2a7f8d055122aefef2b0d28314c16871455e9223b8429a428ec6b4383eefe8fb50ff00d7c4c39710c6fb9fa81c3c84f3e6f5f58cbd1cf475896135e EBUILD gnuconfig-20230731.ebuild 1257 BLAKE2B 4892261caadc58274ef06516ca74201c285542b585a4c9f73a4bc49f1e478abe141680dcdff43c5ddc51471924087c757f84ff6208979fb89712c1a6e50df87e SHA512 eee196b0e9f67afb3be5b2f6f50ee1d8494595d6a271ee466d90b763ca4bd031ffa8d3b85d860e2c1ded6e22f113251ff961122bddc904809923d6c28381a3be EBUILD gnuconfig-20240101.ebuild 1257 BLAKE2B c0801af4958a086ab001b20ca0604eaaac0f7e0b4d89a64892dbc406cb1006623443109aac7183858b463d07484a0eb42b1657de4b69c6041b53403474529922 SHA512 162921e4b54f17cdb66b8c01579b417692a00fb7245007b04cf229f7875b1b7a33b0d7c6a46848e93d83a3a1f4051fcc0eeaef67fff5d79a087043bf79029737 +EBUILD gnuconfig-20240728.ebuild 1265 BLAKE2B 336985b2db0408dfa266779cee02bb2a737ca0dab5d0e7679a792a2f7dac424c48b77f2cfdc91815d20dcdd870b36f057faef1f6d87a1a1d5e8ee4d2fda93159 SHA512 6a980147d50aa0ddcbf7c0984e6f46d39a78607f3701cb42ecd3d71f494545dff0dda27f6440e5828e4de424ff64aed72085f357b9a800a7d15726b31bffc646 EBUILD gnuconfig-99999999.ebuild 1265 BLAKE2B b9bba9dfc73c65d5e3a4194e1992f532a819335c4e10d013a851f41499f45c291c9180e4a380a228b6d01721c0c0f0f0685a60793b24f532affb3eb83b1d3483 SHA512 22860796aaeec1925f8e47e158fe3f7be71b5e2cb49565ad90e6a5ab89420e015068b961f455c68e1ead7ba58ca14aa326b3f6e35d695f8ecb9b358891a1be11 MISC metadata.xml 347 BLAKE2B 06b801ace1e56e47232a0efa9ae446193955866c1232d576729d4419932a4d338e7840408ef1ecfbabe4f518a18dc25abad921b4d185f5e7a9bd8b46bdb75b32 SHA512 14cbe44269cf0ffffc3c133172b84c6ebb5d17e7bb42f1dd9339abf009005b5a716cdae32c52867246d5f1b5e96a2b16a9e97f25b6d502e0380ceed7ed590fbe diff --git a/sys-devel/gnuconfig/gnuconfig-20240728.ebuild b/sys-devel/gnuconfig/gnuconfig-20240728.ebuild new file mode 100644 index 000000000000..04e57c23b5b3 --- /dev/null +++ b/sys-devel/gnuconfig/gnuconfig-20240728.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} == 99999999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git" + + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + S="${WORKDIR}" +fi + +DESCRIPTION="Updated config.sub and config.guess file from GNU" +HOMEPAGE="https://savannah.gnu.org/projects/config" + +LICENSE="GPL-3+-with-autoconf-exception" +SLOT="0" + +maint_pkg_create() { + cd "${S}" || die + + emake ChangeLog + local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog) + [[ ${#ver} != 8 ]] && die "invalid version '${ver}'" + + local tar="${T}/gnuconfig-${ver}.tar.xz" + tar -Jcf "${tar}" ./* || die "creating tar failed" + einfo "Packaged tar now available:" + einfo "$(du -b "${tar}")" +} + +src_unpack() { + if [[ ${PV} == 99999999 ]] ; then + git-r3_src_unpack + maint_pkg_create + else + unpack ${A} + fi +} + +src_install() { + insinto /usr/share/${PN} + doins config.{sub,guess} + fperms +x /usr/share/${PN}/config.{sub,guess} + dodoc ChangeLog +} diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index b275d06bffb1..adc00fdaecec 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -3,8 +3,11 @@ DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224 DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df +DIST llvm-gentoo-patchset-15.0.7-r6.tar.xz 25208 BLAKE2B c9fca31a053ee059c3060a94dcf675d472fc1a59b5f927648de58fb4ff20bfc229890f789ed47b3d053bd466b860a0c60a53b4b024a8fe18c776e9a72434d6de SHA512 601cd923711839dca7cb5bfea53ded644777c6340265a797939a53409fd2ca27059a015fd6ca6832e60314699ade27919a9a59dab395cc27f8fdc479a0f3c034 +DIST llvm-gentoo-patchset-16.0.6-r5.tar.xz 19728 BLAKE2B 36b605401893034b2b560d26cfb57512c81eddbc35b25d9c3d1fe051b8825c38cae1b8ed999faf8fef564ca5578402d3979bc56ba0a5514dc62594d893696f41 SHA512 20a36b69dfc2b4796ce33318a28529ebdc213945ee67a983e4218117d2ee2c93be1ecb38b0e8189249c5806a442cba708e0890e1b7bf6376edec4403bcc71425 DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825 DIST llvm-gentoo-patchset-17.0.6-r2.tar.xz 3664 BLAKE2B b3d61090bec41469027115f1a7b9c51ff2cd720a5363c755da7c87c120e4c85b5a2b4d65b95e418f15d947e580824d267a5ee86336f2d9272e58ec24fa2acaf7 SHA512 4be3d2fefce3f5b6b8f64632ff47a53d4de8a20b276e538527ba01a1a663c2846e1eba28fdd70364e583884618d94ee774791b1ca03fdda1fef8110b664e506c +DIST llvm-gentoo-patchset-17.0.6-r3.tar.xz 4648 BLAKE2B c709162068e83575f71a2ac2243665f47a3d42cac078daa5762bbd339d8593e8c1c5c58e2e415ba6659fe2f3c3824bd098c9be579103362084079140c0386f76 SHA512 251a33f146fcbdbe51c9e1ad7b08c2cd7d062d0b136c833cda8a5155c86080c506d575e4288cde4ba8530ca7f230c2afa63621878a8df0f23076a93c924e7d65 DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19 DIST llvm-gentoo-patchset-18.1.8-r4.tar.xz 15912 BLAKE2B 7300128244aafe42fcf5863e3aad2beb0c96c3df527e6d35fe571369bad520ba4aa397a329287da17eb33dca902057da5cd5193ec560ea7f5767ba2d00a45818 SHA512 b32633db387d4adb3bb2d067f824ae4e8e8a24a25aaa4888520f6e61a4bb1f8f70ad5f44057fbc0892c6f93c803e360612b0fc02c4ec068470b546a55f246cba DIST llvm-gentoo-patchset-18.1.8.tar.xz 7444 BLAKE2B ed41325f7e2efc257c03b3500f9ba49a29333f617ff9914705f9df660bbc1e1b3aafada6f2a68a316d2ee47cf628a35f3495f74c9f0ca00c120079e8e93bd4db SHA512 a6bb4313d2635d38f36a3fdb343b2b7f117129ec62f92ead0bbf7010ae73055cb757958975cd9d1677f2c4b1554819a16a918bef9e9e0d982f8025ce49b9a8ef @@ -24,8 +27,11 @@ DIST llvm-project-503907dc505db1e439e7061113bf84dd105f2e35.tar.gz 218750576 BLAK DIST llvm-project-db8ef6188cbbe2125e6d60bdef77a535105772df.tar.gz 218416682 BLAKE2B 691e3881e4a60c008c6b766b51ecc856122de1f40242ff1d91ebaa12682fea0a22f84783eb930c42d196f50ba0d3b2010f9010ed73ee7e292fe78c93d6e3f324 SHA512 2dc16a603b60607cc3daee2de0126a567a78c4fff72b2fbcb94c82472bc5ec64ac354ba8592b9a643248a5bfd43b34e2a60f2751a0c9e9e28b7f895fc50a5e9d DIST llvm-project-fd7d7882e7fa5a38d4bfde426120d4663718beb4.tar.gz 218217769 BLAKE2B a6c2aa012c342e31527b7e9f85e8fea3549d52530d8f87cd699e094a0aa768d099f9fd2631161ff7f53b4a5011937ed6d1f52b8fa1d23aa34183be1f487d4277 SHA512 c4863fab1a3c03f7f9c42f3501d3a75cebb491343515d77d30b26e5cbd720fc3fd628052099d87ed638e8c424bcbe7a1d066ed857f73da6f243d3d5a76b0e6c5 EBUILD llvm-15.0.7-r3.ebuild 12592 BLAKE2B 81cd473990810203c4e8a47ceb0189ed399c869b85fab3181724dbd1429063cdaad1f6b6cb1ab5b392f531b0b4907cc61f266558b873b236f9a3ff439045aa37 SHA512 2321f9e6da93af22d5f074175a6a92b7dcd271e2b9b92128d268dd777a9c3bdd876010740153734e2593b90d26a58d4f784b2256a6b1e18160d13b3c10441fb3 +EBUILD llvm-15.0.7-r6.ebuild 12599 BLAKE2B e180c4c343c9ca4e0a69118676cbdfd0787ace210fd638db0cb6a115b05dd1e10142c6dfb088c2d195f340cc81c3b997542c5957bf784ff4df1e7e577d24f440 SHA512 3f3b5a67a2188ae5063a9080abfc9be468a0ced00d2ef865c9ccef9a363d39f781b2be45743bc676dfcb738a3d2894c7e307588ecc7768394d2e11574d82b167 +EBUILD llvm-16.0.6-r5.ebuild 12832 BLAKE2B c63736426def1e30266dc43dba9c6b2d47767fde332b0165f53beaec85bed33a2f3cf0cc8f213769bb3167060ea8f940f82a645dd7e2ead39e9c5efad2d59a17 SHA512 33003aa6e8e55a2696c2b0831b83a1bfe947ce25b9b5c6d9035d085f016c134e8f549a28c26a47854fb07e3735432848377f0a50d26654b4bef209e6e63b15f6 EBUILD llvm-16.0.6.ebuild 12822 BLAKE2B fe0a8bca0506827f09ea9edc18e8574443af644540cec84126fa3668ca8fa538a103c76315ee7c61b0af67a1391168ae7b04201e7825958a46fe8642a327e93b SHA512 a1a861d11791cb583dc33b9c71a86bd50690ffb8b743a6bccf8b4600976f48e96a2b4171cc9b449c17c8b0516ef440cee89df8cff97a3c691968b3431a149612 EBUILD llvm-17.0.6-r2.ebuild 13303 BLAKE2B 292bff5aa3489c685c2a89ba55a6e4d0c06123cfcf6986c934494b1bc28a93f8768f8cac04f86eca44595167b6ce8b0c84548db45c4e810bdbbfb3f42660048a SHA512 2a7c8fb5a691acc9293c7bd39b2c7e0354420556ae7d9a02df35e550f2668063d690e9f8453da22f76cfe1e39132ba4af8e95112f4de8e8486521d8c5e81dfd6 +EBUILD llvm-17.0.6-r3.ebuild 13303 BLAKE2B 82441400486b9478d70bdff84a96ba576d52fdfd36b4bdb74b0d7cbeb988a4916e17a0f4d0ad8d80d327809643328ed5c1664101061e7254bc4483ab2065b471 SHA512 ecd5c54763055f5bee2ac2c34258fbc3586f3193274312608a1108cbd2d8dc6f89a836ac2184107014840b7e9133814f3b500635a6f64697244400d444f7bd58 EBUILD llvm-17.0.6.ebuild 13293 BLAKE2B 50e4212c63f1561f4fc8397a831f83bd3ea370349fa3b6239dfe2f9212757f6e8d5bb1921b8714680fe94d0f02ca523d289447b1396124aa94f91b539aabb17a SHA512 5b2b1d2293cf00d0c547a06111a0af706b2cad1f7cb5f2cc421f54a129c165560adbba4342d9bea486d5b2474a1eed066f1ae955a89133cd94b61a62313980bb EBUILD llvm-18.1.8-r1.ebuild 13372 BLAKE2B cb78f1c21e29ec1987c52edeebdc3d0200ec0b6f5d4b6443b2fd62eda6e3cafcc4bf849cd0bd1112f899904f3816970f5f4672f9c7a51f400bb39ce924d023d4 SHA512 9246e225b934b64e982c3d4399faea476871845616f979fa6d7eed832a75f879d611f85a29e04ca768bd6690945f24a3e7eebdbe8b81f156299b37965944ec91 EBUILD llvm-18.1.8-r4.ebuild 13382 BLAKE2B 2d52ad708ed578868b700b97cc581ea732147219b9b71d4ced6dbe2553054e2524ba0971e051934b610d5aaa4e6a164e14c56be9961637349b37d9bafa97916b SHA512 4e67d7e9ceb174d8b9135e330ff5371e385d0253f6d8f6c7058840de7dc7819a5711670fa6ca0b487d9f4985de20987c0d69ee1809e131fbea029029643da475 diff --git a/sys-devel/llvm/llvm-15.0.7-r6.ebuild b/sys-devel/llvm/llvm-15.0.7-r6.ebuild new file mode 100644 index 000000000000..ba86207405ca --- /dev/null +++ b/sys-devel/llvm/llvm-15.0.7-r6.ebuild @@ -0,0 +1,520 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \ + toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/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}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + =sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + libffi? ( virtual/pkgconfig ) +" +# There are no file collisions between these versions but having :0 +# installed means llvm-config there will take precedence. +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV/_/-}-r6 +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +python_check_deps() { + use doc || return 0 + + python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_uptodate() { + local prod_targets=( + $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ + | tail -n +2 | head -n -1) + ) + local all_targets=( + lib/Target/*/ + ) + all_targets=( "${all_targets[@]#lib/Target/}" ) + all_targets=( "${all_targets[@]%/}" ) + + local exp_targets=() i + for i in "${all_targets[@]}"; do + has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) + done + + if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" + eqawarn "Expected: ${exp_targets[*]}" + eqawarn + fi + + if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}" + eqawarn "Expected: ${prod_targets[*]}" + fi +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # shared libs + LLVM|LLVMgold) + ;; + # TableGen lib + deps + LLVMDemangle|LLVMSupport|LLVMTableGen) + ;; + # static libs + LLVM*) + continue + ;; + # meta-targets + distribution|llvm-libraries) + continue + ;; + # used only w/ USE=doc + docs-llvm-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfod + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-remark-size-diff + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then + # Smart hack: alter version suffix -> 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" + -DLLVM_ENABLE_LIBCXX=ON + ) + 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="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build cmake_build distribution + + 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_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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-16.0.6-r5.ebuild b/sys-devel/llvm/llvm-16.0.6-r5.ebuild new file mode 100644 index 000000000000..4134520ad63a --- /dev/null +++ b/sys-devel/llvm/llvm-16.0.6-r5.ebuild @@ -0,0 +1,523 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/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}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + /dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-remark-size-diff + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + use kernel_Darwin && mycmakeargs+=( + -DTerminfo_LIBRARIES=-lncurses + ) + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build cmake_build distribution + + 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_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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-17.0.6-r3.ebuild b/sys-devel/llvm/llvm-17.0.6-r3.ebuild new file mode 100644 index 000000000000..a9839483282d --- /dev/null +++ b/sys-devel/llvm/llvm-17.0.6-r3.ebuild @@ -0,0 +1,542 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug debuginfod doc exegesis libedit +libffi + ncurses test xar xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/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}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + /dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-remark-size-diff + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build cmake_build distribution + + 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_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)" +} -- cgit v1.2.3