From 0530006d7f63d6c158b4ff5ea0c3f7ef3bae9cc4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 23 Feb 2023 21:45:48 +0000 Subject: gentoo auto-resync : 23:02:2023 - 21:45:48 --- sys-devel/Manifest.gz | Bin 10628 -> 10630 bytes sys-devel/clang-common/Manifest | 3 + .../clang-common/clang-common-16.0.0_rc3.ebuild | 168 +++++++ sys-devel/clang-runtime/Manifest | 1 + .../clang-runtime/clang-runtime-16.0.0_rc3.ebuild | 41 ++ sys-devel/clang/Manifest | 17 +- sys-devel/clang/clang-14.0.6-r1.ebuild | 2 +- sys-devel/clang/clang-15.0.7-r1.ebuild | 2 +- sys-devel/clang/clang-16.0.0.9999.ebuild | 2 +- sys-devel/clang/clang-16.0.0_rc2.ebuild | 2 +- sys-devel/clang/clang-16.0.0_rc3.ebuild | 477 +++++++++++++++++++ sys-devel/clang/clang-17.0.0.9999.ebuild | 2 +- sys-devel/clang/clang-17.0.0_pre20230211.ebuild | 2 +- sys-devel/clang/clang-17.0.0_pre20230218.ebuild | 2 +- sys-devel/gdb/Manifest | 4 +- sys-devel/gdb/gdb-13.1.ebuild | 2 +- sys-devel/gdb/gdb-9999.ebuild | 2 +- sys-devel/lld/Manifest | 3 + sys-devel/lld/lld-16.0.0_rc3.ebuild | 90 ++++ sys-devel/llvm-common/Manifest | 3 + .../llvm-common/llvm-common-16.0.0_rc3.ebuild | 28 ++ sys-devel/llvm/Manifest | 17 +- sys-devel/llvm/llvm-14.0.6-r2.ebuild | 2 +- sys-devel/llvm/llvm-15.0.7.ebuild | 2 +- sys-devel/llvm/llvm-16.0.0.9999.ebuild | 2 +- sys-devel/llvm/llvm-16.0.0_rc2.ebuild | 2 +- sys-devel/llvm/llvm-16.0.0_rc3.ebuild | 516 +++++++++++++++++++++ sys-devel/llvm/llvm-17.0.0.9999.ebuild | 2 +- sys-devel/llvm/llvm-17.0.0_pre20230211.ebuild | 2 +- sys-devel/llvm/llvm-17.0.0_pre20230218.ebuild | 2 +- 30 files changed, 1368 insertions(+), 32 deletions(-) create mode 100644 sys-devel/clang-common/clang-common-16.0.0_rc3.ebuild create mode 100644 sys-devel/clang-runtime/clang-runtime-16.0.0_rc3.ebuild create mode 100644 sys-devel/clang/clang-16.0.0_rc3.ebuild create mode 100644 sys-devel/lld/lld-16.0.0_rc3.ebuild create mode 100644 sys-devel/llvm-common/llvm-common-16.0.0_rc3.ebuild create mode 100644 sys-devel/llvm/llvm-16.0.0_rc3.ebuild (limited to 'sys-devel') diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz index 399e2425ae78..7a93dbe6ecd0 100644 Binary files a/sys-devel/Manifest.gz and b/sys-devel/Manifest.gz differ diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index fdc1dfdd3c33..e3fafc58963d 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -4,12 +4,15 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c +DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 +DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 EBUILD clang-common-14.0.6.ebuild 541 BLAKE2B 87b158e874cf600e23591a8095e0edb4d30d4482600ef8fe38984e9ba9559e6e2226107cd482f355d950392a6a452e1a8ae79d297d5afc3951a7f1c8f6227b5f SHA512 1bd0481468c278f131ec9f87243927b60a59752f4229450559bf8016e9599155a52593810fcdc1cf0aecd4aa1529e8df300d95123a53de18eb326152caafbbef EBUILD clang-common-15.0.7-r2.ebuild 4709 BLAKE2B 45c3f8fc620d93c68140ec3f86744524b706555213599fdfaf8ee6d1109cf71ca15d09400e3d080d7099355b4ac3c83a645c7d17f5ff9967cd77147f2b4fb890 SHA512 130d2f15aef579a2942bf61d6b8062dfba930c3413910b4634bc8032c452ef4627fadbb930b3a4c76fe57d870fe21b1c812f58945b9eea4c63bd6a821e2377dc EBUILD clang-common-16.0.0.9999.ebuild 4686 BLAKE2B c2bf510db70a7708d56746c035eebe20b332ace167138ae5260375dc5bfe15e2b8478692636cca60cebd9ebc2e418324377e3d17ebb49db7e30ecd6ad11e6db3 SHA512 abb81468747c4f83554c35792f6fd1e282b0edfa02a34157c0594cefef42b91c95092b35a88b7b4b7abfb17bff95029065b86f2c2724df5badb5924f915fd63e EBUILD clang-common-16.0.0_rc2.ebuild 4692 BLAKE2B 0628160af123d42ea6cc9a2d39d0115ccc3d0f4461f2bc3b13946d3fb587a100092df73ba512aa016bf359283cf8790cf465cdbf7a230f1cd02e536d570424cd SHA512 08f8ef115f59f74a3b845af7563dbd43819c4fb37ed27a2fc0c65ce3c0f7c7e61eb3617b1e8c54c598d5cff0a1b8988d0ed32f8fa40c6b4428545a5f8f1bf05a +EBUILD clang-common-16.0.0_rc3.ebuild 4686 BLAKE2B c2bf510db70a7708d56746c035eebe20b332ace167138ae5260375dc5bfe15e2b8478692636cca60cebd9ebc2e418324377e3d17ebb49db7e30ecd6ad11e6db3 SHA512 abb81468747c4f83554c35792f6fd1e282b0edfa02a34157c0594cefef42b91c95092b35a88b7b4b7abfb17bff95029065b86f2c2724df5badb5924f915fd63e EBUILD clang-common-17.0.0.9999.ebuild 4686 BLAKE2B c2bf510db70a7708d56746c035eebe20b332ace167138ae5260375dc5bfe15e2b8478692636cca60cebd9ebc2e418324377e3d17ebb49db7e30ecd6ad11e6db3 SHA512 abb81468747c4f83554c35792f6fd1e282b0edfa02a34157c0594cefef42b91c95092b35a88b7b4b7abfb17bff95029065b86f2c2724df5badb5924f915fd63e EBUILD clang-common-17.0.0_pre20230211.ebuild 4686 BLAKE2B c2bf510db70a7708d56746c035eebe20b332ace167138ae5260375dc5bfe15e2b8478692636cca60cebd9ebc2e418324377e3d17ebb49db7e30ecd6ad11e6db3 SHA512 abb81468747c4f83554c35792f6fd1e282b0edfa02a34157c0594cefef42b91c95092b35a88b7b4b7abfb17bff95029065b86f2c2724df5badb5924f915fd63e EBUILD clang-common-17.0.0_pre20230218.ebuild 4686 BLAKE2B c2bf510db70a7708d56746c035eebe20b332ace167138ae5260375dc5bfe15e2b8478692636cca60cebd9ebc2e418324377e3d17ebb49db7e30ecd6ad11e6db3 SHA512 abb81468747c4f83554c35792f6fd1e282b0edfa02a34157c0594cefef42b91c95092b35a88b7b4b7abfb17bff95029065b86f2c2724df5badb5924f915fd63e diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc3.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..be17e87b775a --- /dev/null +++ b/sys-devel/clang-common/clang-common-16.0.0_rc3.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + hardened stricter +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind ) + !llvm-libunwind? ( sys-libs/libunwind ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV} ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( sys-devel/lld ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -fstack-clash-protection + -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + dodir /usr/include/gentoo + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifndef _FORTIFY_SOURCE + #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + #define _FORTIFY_SOURCE ${fortify_level} + #endif + #endif + EOF + + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + -D_LIBCPP_ENABLE_ASSERTIONS=1 + EOF + fi + + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + + # constructs banned by C2x + -Werror=deprecated-non-prototype + + # deprecated but large blast radius + #-Werror=strict-prototypes + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + + local tool + for tool in clang{,++,-cpp}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + EOF + done +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-runtime/Manifest b/sys-devel/clang-runtime/Manifest index dd10551a6ffe..75becc52f72c 100644 --- a/sys-devel/clang-runtime/Manifest +++ b/sys-devel/clang-runtime/Manifest @@ -2,6 +2,7 @@ EBUILD clang-runtime-14.0.6.ebuild 760 BLAKE2B 0f6cfb8536569ffe2a09305e710563096 EBUILD clang-runtime-15.0.7.ebuild 759 BLAKE2B d7b481faffc4da0a6dc1b4e708322cd17cd497dc75363bdb89e7fbb1ecb2aecd9cbf91bdf816505476c7aca2ec7b6fb9ef178705e6b77361d21a7a270404a70a SHA512 8128acfc92b1601e93ffca1fd4233456f8a28fbc4cc65a1782da25df48abd3af82d0128b31f12b966ca02ab1eafcd28016c4443d9c7f1d28bc3f951cfff5e07f EBUILD clang-runtime-16.0.0.9999.ebuild 1369 BLAKE2B a25d32189f78e993706138f339ad0645e3042bd283ddc26b4189c117ea2368d0a1c2b09c2f5f538112bcad65fc14dc0d29f16e4d6ff98e3401c3bdb74d59d750 SHA512 c37860675576d51047f5347400753a19469ea0e2e6ff49a3a5ba6e35f5b33372c06ee2ac1e82aa4a681f35e8c186a1ff8eb25a9eccd0ee35e5ab3d57873f40e0 EBUILD clang-runtime-16.0.0_rc2.ebuild 1357 BLAKE2B 8bffc2e195aea4f0c5c13d8f730dbf7cf5afade08d6ca9915addb9a148d4fa28d01331461adc16221840095a8b94d997795e25fb01c68ca6260b24471abd2747 SHA512 cd391453ef4a5ef739d9897b25fc1899062c20e23dbb1bfa4ef33ada3a697ffaedaf6956ba82fd114b8f24a5c8de3d255b5d114c545968f0689bd6cb38b64ba6 +EBUILD clang-runtime-16.0.0_rc3.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db EBUILD clang-runtime-17.0.0.9999.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db EBUILD clang-runtime-17.0.0_pre20230211.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db EBUILD clang-runtime-17.0.0_pre20230218.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.0_rc3.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..67b42357665e --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-16.0.0_rc3.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +KEYWORDS="" +IUSE="+compiler-rt libcxx openmp +sanitize" +REQUIRED_USE="sanitize? ( compiler-rt )" +PROPERTIES="live" + +RDEPEND=" + compiler-rt? ( + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) + ) + libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 9919d48346b5..085933d1b96e 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -8,13 +8,16 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c +DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 +DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 -EBUILD clang-14.0.6-r1.ebuild 12015 BLAKE2B a3bcb2a4aa3ee35f647b0b64cf730b9fc91bbd372ede9edbb3e10aeb2b42952b2dbceacd2dbb328e82fb3cecd09d8eea4a7cdcbbee1685d89214c2a5dfb889a4 SHA512 6ae1274d73f029064d7a91fa860a56eabfe1fa182b2c58b5d8d3def766f0fd8f52407f2df99edf4667364161424e9dc9a569f015f696ab82da2cdca9207eb193 -EBUILD clang-15.0.7-r1.ebuild 12410 BLAKE2B d5cfe691f4c35d9945132db4aedd9f5e1049bc9698464c89169bda155eea8c489bf24d4cd9efe864017134dcbed934692bf87053432f19fcbddbad7618cf0500 SHA512 ce4b9bff335dd354d097399f102456c4a41f3e81963e9f35a4c1da9637134877a32c86c683017ed8ff084a2f28680018ba929a28bcc45c5d8dec2487a1903866 -EBUILD clang-16.0.0.9999.ebuild 12236 BLAKE2B 958d1cfd85652c3c7e8e96a7a6662b327c8b2a686e6fce57b072a29b27169b178fae9be6e4815369ec7df33f23691f72412496d3fc3a324a9376a9f1021b6cc3 SHA512 8a0fba05357a05ac71ce23cab36176ae883a9bec62b6ea87492302e382b833926a753f36143e09cda800cb427ce95fcc0a235d8276af688b1bdf567e2f994048 -EBUILD clang-16.0.0_rc2.ebuild 12111 BLAKE2B b056f2421559f9a16d65d8f8f9307c8385bb343bec73104ff322fa7fdebb28ef0b8f78a2f23b284c60db5464ad60764837d4157cbbbe61675f242cc757c81d21 SHA512 3e5930c5560a6e553bff54b834f9a5646c1df48499372d415e784f423f094673d93d44b0cf6f539af12ffb57e92045f96450e5d8917e3074ae612507dfa25b66 -EBUILD clang-17.0.0.9999.ebuild 12236 BLAKE2B 958d1cfd85652c3c7e8e96a7a6662b327c8b2a686e6fce57b072a29b27169b178fae9be6e4815369ec7df33f23691f72412496d3fc3a324a9376a9f1021b6cc3 SHA512 8a0fba05357a05ac71ce23cab36176ae883a9bec62b6ea87492302e382b833926a753f36143e09cda800cb427ce95fcc0a235d8276af688b1bdf567e2f994048 -EBUILD clang-17.0.0_pre20230211.ebuild 12105 BLAKE2B eb5bd6547ed4e5ee38dba74ce25ae88718e3b8135934fdbfaddc5f762fb8250b6cbc006c4d7d5c5768b5367aaa26130b2a53b5952c27a9c664e76cfd500f8c08 SHA512 c48e9c6d5d09c52f6692eb72f615c4576c7368b0209a9d2ec2444e46c622903d24ab66cb6b7b910f721ac87aa529e12cbb2b7b54ed45e9ffe33c0d586b976317 -EBUILD clang-17.0.0_pre20230218.ebuild 12105 BLAKE2B eb5bd6547ed4e5ee38dba74ce25ae88718e3b8135934fdbfaddc5f762fb8250b6cbc006c4d7d5c5768b5367aaa26130b2a53b5952c27a9c664e76cfd500f8c08 SHA512 c48e9c6d5d09c52f6692eb72f615c4576c7368b0209a9d2ec2444e46c622903d24ab66cb6b7b910f721ac87aa529e12cbb2b7b54ed45e9ffe33c0d586b976317 +EBUILD clang-14.0.6-r1.ebuild 12014 BLAKE2B 0f9eed7779a5b9aa8f92002f6f4d8e22e7baf3d3f6d1930e4716abf3aa00d866f68a682dc2a404655f53800e26c8b388da552184da6943287b2d91c5c1c2672b SHA512 c5e46f1044604f4e41cdb6c42d2079096c0bcdd396d99f8e95a6b5b66918e3519e4226741202f716fa5f53295188ec2bfcec66ae32480a8e10b4ab18bdb880ab +EBUILD clang-15.0.7-r1.ebuild 12409 BLAKE2B 8f8d642b676f0ad01700fca43d8158e54180010443f5456a3d3d270638dd280e8e399534c97d8fa8f7bcacd132d9f5735154cf4e12fd0fbc9a1e2b7f1e914ba9 SHA512 77139debe5214dd3047b44ab98bfd8a6eec2caa8635ba8cbfc14c94ed4d3d13febe08612e74f33db491cc98c30eadfcfead20a1c13a73466d7e49028222c93db +EBUILD clang-16.0.0.9999.ebuild 12235 BLAKE2B 5061b3228d7b0a2513601abab18bfba06f79d351da8b2e0114c4482994d9c69706e21b0072a59b6f8e0d442c440972f2f00bd3e5e3273801771c6044e1eba3e5 SHA512 5b50655e1e5b884b9a4aa1c8fc08b6bec1bc9b132eb404ec6b8ac6ab0516100b64091f82e6355f59991065ba5a94681d34286ca6004190b78efbe2b808884167 +EBUILD clang-16.0.0_rc2.ebuild 12110 BLAKE2B 8fd52ce1b51738a448ee1728f467bf9b3c64ca328e4c819948f89d5fcf3f2ed44e6b2a996465fbf3652988c77feab6a3f2bd682c942fd57307880330b527d730 SHA512 ad3d90a5ae2ef774b07d192325b15a2efe263625b738ab45d6f78fead7083aed83606add738ed03c6424655fa70a5fc987fce078ffc2d2670ccc4e171ff27a5c +EBUILD clang-16.0.0_rc3.ebuild 12235 BLAKE2B 5061b3228d7b0a2513601abab18bfba06f79d351da8b2e0114c4482994d9c69706e21b0072a59b6f8e0d442c440972f2f00bd3e5e3273801771c6044e1eba3e5 SHA512 5b50655e1e5b884b9a4aa1c8fc08b6bec1bc9b132eb404ec6b8ac6ab0516100b64091f82e6355f59991065ba5a94681d34286ca6004190b78efbe2b808884167 +EBUILD clang-17.0.0.9999.ebuild 12235 BLAKE2B 5061b3228d7b0a2513601abab18bfba06f79d351da8b2e0114c4482994d9c69706e21b0072a59b6f8e0d442c440972f2f00bd3e5e3273801771c6044e1eba3e5 SHA512 5b50655e1e5b884b9a4aa1c8fc08b6bec1bc9b132eb404ec6b8ac6ab0516100b64091f82e6355f59991065ba5a94681d34286ca6004190b78efbe2b808884167 +EBUILD clang-17.0.0_pre20230211.ebuild 12104 BLAKE2B 67b75aea6ee7536b74ba5e06bad5193f91a802fdc0721677d2966b1aea7b4832461bcdfc608f70f0d440e71c7dce388cfa385e7ab09ed9e4f0a7c6db03cb0634 SHA512 dba810cd731926ac37fa22306b98accc38d89b7a3c276b98b993fecfd44745532da39e2b882f654edb5a2864d9121f12ffeb669c61509365ab85d6fc6de2beb8 +EBUILD clang-17.0.0_pre20230218.ebuild 12104 BLAKE2B 67b75aea6ee7536b74ba5e06bad5193f91a802fdc0721677d2966b1aea7b4832461bcdfc608f70f0d440e71c7dce388cfa385e7ab09ed9e4f0a7c6db03cb0634 SHA512 dba810cd731926ac37fa22306b98accc38d89b7a3c276b98b993fecfd44745532da39e2b882f654edb5a2864d9121f12ffeb669c61509365ab85d6fc6de2beb8 MISC metadata.xml 1600 BLAKE2B 8e49e099132445cf695e904acad8a699f3d8c4c1e4cd6ba9d0b97180dfa5b67e9c30b00d1e4cb6cd2f61b27f022accc8d6ee889c6569fc58fbc058186ad216fc SHA512 96b7cf4988ff1fd923ec87311caed458b64888b5acaaf20cc1ad893f2a963158f7f59398f9fd4f9e65cab3df265c0d002048ff874f7a76b94f36377bf9e8f5f6 diff --git a/sys-devel/clang/clang-14.0.6-r1.ebuild b/sys-devel/clang/clang-14.0.6-r1.ebuild index 417a3a40d87d..cab7a426dbeb 100644 --- a/sys-devel/clang/clang-14.0.6-r1.ebuild +++ b/sys-devel/clang/clang-14.0.6-r1.ebuild @@ -234,7 +234,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local llvm_version=$(llvm-config --version) || die local clang_version=$(ver_cut 1-3 "${llvm_version}") diff --git a/sys-devel/clang/clang-15.0.7-r1.ebuild b/sys-devel/clang/clang-15.0.7-r1.ebuild index 26eaebf4de2d..3a9fc612178a 100644 --- a/sys-devel/clang/clang-15.0.7-r1.ebuild +++ b/sys-devel/clang/clang-15.0.7-r1.ebuild @@ -252,7 +252,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/clang/clang-16.0.0.9999.ebuild b/sys-devel/clang/clang-16.0.0.9999.ebuild index 4bc824e6a52a..df441961397a 100644 --- a/sys-devel/clang/clang-16.0.0.9999.ebuild +++ b/sys-devel/clang/clang-16.0.0.9999.ebuild @@ -253,7 +253,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/clang/clang-16.0.0_rc2.ebuild b/sys-devel/clang/clang-16.0.0_rc2.ebuild index 1ba28fce62a6..c6e614f2973f 100644 --- a/sys-devel/clang/clang-16.0.0_rc2.ebuild +++ b/sys-devel/clang/clang-16.0.0_rc2.ebuild @@ -253,7 +253,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/clang/clang-16.0.0_rc3.ebuild b/sys-devel/clang/clang-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..df441961397a --- /dev/null +++ b/sys-devel/clang/clang-16.0.0_rc3.ebuild @@ -0,0 +1,477 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit cmake llvm llvm.org multilib multilib-minimal \ + prefix python-single-r1 toolchain-funcs flag-o-matic + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="https://llvm.org/" + +# MSVCSetupApi.h: MIT +# sorttable.js: MIT + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="" +IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + ~sys-devel/clang-runtime-${PV} + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing + llvm/utils + third-party +) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +# Multilib notes: +# 1. ABI_* flags control ABIs libclang* is built for only. +# 2. clang is always capable of compiling code for all ABIs for enabled +# target. However, you will need appropriate crt* files (installed +# e.g. by sys-devel/gcc and sys-libs/glibc). +# 3. ${CHOST}-clang wrappers are always installed for all ABIs included +# in the current profile (i.e. alike supported by sys-devel/gcc). +# +# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need +# multilib clang* libraries (not runtime, not wrappers). + +pkg_setup() { + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # create extra parent dir for relative CLANG_RESOURCE_DIR access + mkdir -p x/y || die + BUILD_DIR=${WORKDIR}/x/y/clang + + llvm.org_src_prepare + + # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) + eprefixify \ + lib/Lex/InitHeaderSearch.cpp \ + lib/Driver/ToolChains/Darwin.cpp || die + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + 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 + # meta-targets + clang-libraries|distribution) + continue + ;; + # tools + clang|clangd|clang-*) + ;; + # static libraries + clang*|findAllSymbols) + continue + ;; + # conditional to USE=doc + docs-clang-html|docs-clang-tools-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 +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # common stuff + clang-cmake-exports + clang-headers + clang-resource-headers + libclang-headers + + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + amdgpu-arch + c-index-test + clang + clang-format + clang-offload-bundler + clang-offload-packager + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + nvptx-arch + + # needed for cross-compiling Clang + clang-tblgen + ) + + if use extra; then + out+=( + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + fi + + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + + local mycmakeargs=( + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + + -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON + + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -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+=( + -DLLVM_BUILD_DOCS=ON + -DLLVM_ENABLE_SPHINX=ON + -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi + fi + mycmakeargs+=( + -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} + ) + else + mycmakeargs+=( + -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF + ) + fi + + if [[ -n ${EPREFIX} ]]; then + mycmakeargs+=( + -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" + ) + fi + + if tc-is-cross-compiler; then + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin + mycmakeargs+=( + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-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 + + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + # provide a symlink for tests + if [[ ! -L ${WORKDIR}/lib/clang ]]; then + mkdir -p "${WORKDIR}"/lib || die + ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" +} + +src_install() { + MULTILIB_WRAPPED_HEADERS=( + /usr/include/clang/Config/config.h + ) + + multilib-minimal_src_install + + # Move runtime headers to /usr/lib/clang, where they belong + mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die + # move (remaining) wrapped headers back + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die + + # Apply CHOST and version suffix to clang tools + local clang_tools=( clang clang++ clang-cl clang-cpp ) + local abi i + + # cmake gives us: + # - clang-X + # - clang -> clang-X + # - clang++, clang-cl, clang-cpp -> clang + # we want to have: + # - clang-X + # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X + # - clang, clang++, clang-cl, clang-cpp -> clang*-X + # also in CHOST variant + for i in "${clang_tools[@]:1}"; do + rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" + done + + # now create target symlinks for all supported ABIs + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + for i in "${clang_tools[@]}"; do + dosym "${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" + done + done +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping & ABI mismatch checks + # (also drop the version suffix from runtime headers) + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi +} + +multilib_src_install_all() { + python_fix_shebang "${ED}" + if use static-analyzer; then + python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view + fi + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages + # match 'html' non-compression + use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" + # +x for some reason; TODO: investigate + use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" +} + +pkg_postinst() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow update all + fi + + elog "You can find additional utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" + if use extra; then + elog "Some of them are vim integration scripts (with instructions inside)." + elog "The run-clang-tidy.py script requires the following additional package:" + elog " dev-python/pyyaml" + fi +} + +pkg_postrm() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow clean all + fi +} diff --git a/sys-devel/clang/clang-17.0.0.9999.ebuild b/sys-devel/clang/clang-17.0.0.9999.ebuild index 4bc824e6a52a..df441961397a 100644 --- a/sys-devel/clang/clang-17.0.0.9999.ebuild +++ b/sys-devel/clang/clang-17.0.0.9999.ebuild @@ -253,7 +253,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/clang/clang-17.0.0_pre20230211.ebuild b/sys-devel/clang/clang-17.0.0_pre20230211.ebuild index 6a4c9a3aefe0..c05b36a1d940 100644 --- a/sys-devel/clang/clang-17.0.0_pre20230211.ebuild +++ b/sys-devel/clang/clang-17.0.0_pre20230211.ebuild @@ -253,7 +253,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/clang/clang-17.0.0_pre20230218.ebuild b/sys-devel/clang/clang-17.0.0_pre20230218.ebuild index 6a4c9a3aefe0..c05b36a1d940 100644 --- a/sys-devel/clang/clang-17.0.0_pre20230218.ebuild +++ b/sys-devel/clang/clang-17.0.0_pre20230218.ebuild @@ -253,7 +253,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local mycmakeargs=( -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index 7674a47058d0..c0f8701d0c03 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -7,6 +7,6 @@ DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c DIST gdb-13.1.tar.xz 23665472 BLAKE2B ab3a77ef35d21597dd1299787eebc422c3ca9764d0866223752c3036c0f9e198bf25ab4730bf6e7025bc2db148c66e98b191e15abc2d69c3088aed146728beef SHA512 e65054ffbc0357eeed4b17e1edc5ef45aa73c9ddf3b1210651e3d859576e27c1d27b266800fe26328eda58857455ccd8632f4000cfc5f63f90854096290187ca EBUILD gdb-12.1-r3.ebuild 8100 BLAKE2B 48a993f5a5319bb9326a1f045b4b4ca2706011f77a4c1ef96c135bff3aacf3a7b2e20862645f443f7558c405ea1864e2d8251407a5e208fce6817e0079c6cc50 SHA512 9519decae94744ffa27371879b222f21be38036b8b5642be4a37fc5d2930e2f92ede7373b0e56f66208d57a6d36b94762e9395cd42e89c55bfedc90f05bf0e98 EBUILD gdb-12.1-r4.ebuild 8352 BLAKE2B b70813155233f843c45cc853b4b1d5d14d9abc861fd9d244c67b14fe6e708cbc452fdc0064f8e0183c247c0c62ffb9e1390f843ad0b7344c75a177570a8fb4b5 SHA512 1d407f528c52b3b7930df48658d9c956fd7ff1416cb9e8ca01325febf689b69fbcffaa60fb55245a3e98de46c55a5390a5d63d3748be8da0b39a83a5519a42f6 -EBUILD gdb-13.1.ebuild 8570 BLAKE2B 32c61c49575772fec207a02628a01465eff60b655a7e6dc57cd1f69d7c9db143bb65b90650f17c09908ac997475b428d5acdd3b5d932f51b24c87ed11e8cbc43 SHA512 650ee621962310fef101c486047a293b05835c8becfdf94a2929020cb50500a393becf5e434914700a3cf50ed80b650f57bc84a8c3302ac2e0bc396ea5aa9b2f -EBUILD gdb-9999.ebuild 8570 BLAKE2B 32c61c49575772fec207a02628a01465eff60b655a7e6dc57cd1f69d7c9db143bb65b90650f17c09908ac997475b428d5acdd3b5d932f51b24c87ed11e8cbc43 SHA512 650ee621962310fef101c486047a293b05835c8becfdf94a2929020cb50500a393becf5e434914700a3cf50ed80b650f57bc84a8c3302ac2e0bc396ea5aa9b2f +EBUILD gdb-13.1.ebuild 8578 BLAKE2B a6880f78003e1b75dd9877bd3da2828e62409614b5ffb544105465dfa9e9a049a4a9abfab9584b1b4a7fcf1f7c54d57fe13018548b7f9a5477f64a5ed502359b SHA512 b3728e18a6753fd8549e6e70e9aeffe352959b16ab9308f79f875cb9cb75c13503794bc4602dbc65c06965f0c6132ba504a85d58ce619632eafa841d98941f0f +EBUILD gdb-9999.ebuild 8578 BLAKE2B a6880f78003e1b75dd9877bd3da2828e62409614b5ffb544105465dfa9e9a049a4a9abfab9584b1b4a7fcf1f7c54d57fe13018548b7f9a5477f64a5ed502359b SHA512 b3728e18a6753fd8549e6e70e9aeffe352959b16ab9308f79f875cb9cb75c13503794bc4602dbc65c06965f0c6132ba504a85d58ce619632eafa841d98941f0f MISC metadata.xml 1242 BLAKE2B 368d8798d7d3b610653f635eb36ee5517912e8a2cb392622b32ac0aa90f336e3b391ba25811dee110644e50fabec0d64f6bcf3b219cdd240ec806e709a198eed SHA512 192fa340899680413c3d6c886ecd7d2262475a33aecc452192e5fe1d8e3eb5cf17546e57181e720128cf9b39cd8e4b1b1a73cb1f0c9887866c0ce88b288636e2 diff --git a/sys-devel/gdb/gdb-13.1.ebuild b/sys-devel/gdb/gdb-13.1.ebuild index 4a30a9445468..d356d5e3ecab 100644 --- a/sys-devel/gdb/gdb-13.1.ebuild +++ b/sys-devel/gdb/gdb-13.1.ebuild @@ -147,7 +147,7 @@ src_configure() { --with-bugurl='https://bugs.gentoo.org/' --disable-werror # Disable modules that are in a combined binutils/gdb tree. bug #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} + --disable-{binutils,etc,gas,gold,gprof,gprofng,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild index 4a30a9445468..d356d5e3ecab 100644 --- a/sys-devel/gdb/gdb-9999.ebuild +++ b/sys-devel/gdb/gdb-9999.ebuild @@ -147,7 +147,7 @@ src_configure() { --with-bugurl='https://bugs.gentoo.org/' --disable-werror # Disable modules that are in a combined binutils/gdb tree. bug #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} + --disable-{binutils,etc,gas,gold,gprof,gprofng,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest index f973b86737b9..4df6548eb311 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -4,12 +4,15 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c +DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 +DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 EBUILD lld-14.0.6-r1.ebuild 2009 BLAKE2B 4db1dfc9b1997d31cc68240ae0b05afeae5a6b1cb24a0eb2012bc28b2ac8c0da4b532d270d070db5fd401717320a74b006628c19a12c787e2f9ba2dc24eb25b1 SHA512 73b2f0e7b27497ce9037cd10503b328378ff9a2e32cd36e6e264f5423cd05732da4ea2ef97b637fc344a4f3d5d3597c60dda29dba7eb509391c176d32d53a427 EBUILD lld-15.0.7.ebuild 2262 BLAKE2B 8882ba45692d54840d8a5933910ade614427733f3da2e344cf4df2806c125a783ff3c6ad4a2f76fd577cb4787fe07495c93e981c03f116fa7f383575d59936f7 SHA512 9b08495f068a01e991d200363549d29e9146e8687b297fa06beda90da1da9a793b1ebf512c3dad9bb985518a8fd9d1d13049a90dd8f06d4bc3de97779ff8e6ed EBUILD lld-16.0.0.9999.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b EBUILD lld-16.0.0_rc2.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b +EBUILD lld-16.0.0_rc3.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b EBUILD lld-17.0.0.9999.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b EBUILD lld-17.0.0_pre20230211.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b EBUILD lld-17.0.0_pre20230218.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b diff --git a/sys-devel/lld/lld-16.0.0_rc3.ebuild b/sys-devel/lld/lld-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..d22c1fb13951 --- /dev/null +++ b/sys-devel/lld/lld-16.0.0_rc3.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="" +IUSE="debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + >=dev-util/cmake-3.16 + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +LLVM_TEST_COMPONENTS=( llvm/utils third-party ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + llvm.org_src_unpack + + # Directory ${WORKDIR}/llvm does not exist with USE="-test", + # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, + # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system + # (lld/MachO/CMakeLists.txt) and is expected to be resolvable + # to existent directory ${WORKDIR}/libunwind/include. + mkdir -p "${WORKDIR}/llvm" || die +} + +src_configure() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest index 98d9cfa96f75..6011618dd754 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -4,12 +4,15 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c +DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 +DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 EBUILD llvm-common-14.0.6.ebuild 602 BLAKE2B ef26d6ac2606e9a316ddcce442da1762f578ade0346ba2a947fdace5e2020e8841c63d173e42506d23abf6efc062a2edfac0be98a3eefe1f7a29c88702e9f1d5 SHA512 789dad6fdcf9a930ddc1046e7e98ebc1e05b2dd3713bb1ec5b8a5711690d779691c91d1000d9776720b21ed241d2f12c0ae9a8dba0e6a17d0ddf563cdfbe657f EBUILD llvm-common-15.0.7.ebuild 601 BLAKE2B 3dd38d17640ed52ff0be26db026475a9d0e7e1acebe95043bc6e0e63e32ff4f03c5637a9dcce25987f673962447feb4aa015f8b5b5cb33553dc1a4f843b75399 SHA512 e8a93a72d06810cface48cce2d8f8a890cdf009939a96350a23fe407b064c05a3016c663d11a3866dc2dd0fd87599b5ac234895c8c42c902e9b0cdb37dba7b62 EBUILD llvm-common-16.0.0.9999.ebuild 524 BLAKE2B 1864e7c6a8578fe3ad74718368deca408757c501726fd3a2941087756f50bbf9ed83a6a635ef264150c86b577f373b5d391df4cbc6ff3e3e6a561bcc41b2c5f1 SHA512 feab4cb373d2384ce018d26b480024060b89c6a5475e7e7d475124b9a20a2c55470d98799067c437540b6ec6e7471f712534005ec426f76a247b8767edff6164 EBUILD llvm-common-16.0.0_rc2.ebuild 530 BLAKE2B 8475e3b53197e4d4632f635af86038889c0e93161819f3b655a570f8b3b774f392a786c67320845ca7be620bcd22acfd0349ec9376435deff1f4333c993abeb3 SHA512 2f899fd29442895532c45eb8c97e1bdf19aaef19406382b81ebad16cb9eb6d4181a637a10d090060557f1d0b33dc579828c2c5c5d5ad02d0c5a4a3cca256caef +EBUILD llvm-common-16.0.0_rc3.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe EBUILD llvm-common-17.0.0.9999.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe EBUILD llvm-common-17.0.0_pre20230211.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe EBUILD llvm-common-17.0.0_pre20230218.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe diff --git a/sys-devel/llvm-common/llvm-common-16.0.0_rc3.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..ce5f03ca34a5 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-16.0.0_rc3.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit llvm.org + +DESCRIPTION="Common files shared between multiple slots of LLVM" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="" + +RDEPEND=" + !sys-devel/llvm:0 +" + +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r */ + # some users may find it useful + newdoc README README.vim + dodoc vimrc +} diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index cc9e68b1d83e..ec92a5cdaee8 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -8,13 +8,16 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c +DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 +DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 -EBUILD llvm-14.0.6-r2.ebuild 12454 BLAKE2B 128ead83e67de958272391c029958c59d40cb2a673d705944baf89586f534d2d9a6fc9e30c5670f0d51ff820177acaa1a8b88b981d7ee18420dd312ceb886339 SHA512 a0fdc578d238c07cadae56c2d2bd2492401aeddf8e19f28d0fd5aa584344c73a0ac62da648e5466c9a18a722c944e604ad17eb69df8b138bd1bd4bdf0561a09c -EBUILD llvm-15.0.7.ebuild 12623 BLAKE2B e25245f37e3241ab433343e25a23a7919a7c1add19e31228ab70338948c0da89492dd3aaeceff1e38b8a7091360e4bba5ff0dca39a1c724ded8b894bd148f164 SHA512 1a81e82450ef5edf2906ce9336afa3837dd0755bfa7fda0ae1560a65fc9511ef3ef24806ef26e6a07e6ffdb4aac7ddcd2ae71cbd482b66d8c95bc0c2414887a9 -EBUILD llvm-16.0.0.9999.ebuild 12418 BLAKE2B 022f0f65017dbacde3fe2d6188273a84776e3e0f6c6d8c38729ed27678baaccad6f3e0ca8b178769f5ef114d9a2cc1999c9ed1b3981564efc741b2f3d97d780a SHA512 e45fbaa76a1eb6be2a82973bf51a79ab5a576d391174821ceeef44ccff64269f66824bcbd0d77dee381c816939d66bc3f8e64f9c6b4052e0287b48a02f7463a1 -EBUILD llvm-16.0.0_rc2.ebuild 12424 BLAKE2B 2449a60899100c772fa4c7426eece1a4d8794c5982cdb5eec53f1e3c0b494e543e57f5f7230eef637d56773c7fe85845f443a24bdc33e5259068141bc6f07d2f SHA512 ec2d31f0df9877a1d440e5ae7fbfb98636dc8b8966c6db176381bd73108c6f04ac7bde481c5faddc50f0d2af90d93ea4c93c11b1f1ba65f89468671891566005 -EBUILD llvm-17.0.0.9999.ebuild 12418 BLAKE2B 022f0f65017dbacde3fe2d6188273a84776e3e0f6c6d8c38729ed27678baaccad6f3e0ca8b178769f5ef114d9a2cc1999c9ed1b3981564efc741b2f3d97d780a SHA512 e45fbaa76a1eb6be2a82973bf51a79ab5a576d391174821ceeef44ccff64269f66824bcbd0d77dee381c816939d66bc3f8e64f9c6b4052e0287b48a02f7463a1 -EBUILD llvm-17.0.0_pre20230211.ebuild 12418 BLAKE2B 022f0f65017dbacde3fe2d6188273a84776e3e0f6c6d8c38729ed27678baaccad6f3e0ca8b178769f5ef114d9a2cc1999c9ed1b3981564efc741b2f3d97d780a SHA512 e45fbaa76a1eb6be2a82973bf51a79ab5a576d391174821ceeef44ccff64269f66824bcbd0d77dee381c816939d66bc3f8e64f9c6b4052e0287b48a02f7463a1 -EBUILD llvm-17.0.0_pre20230218.ebuild 12418 BLAKE2B 022f0f65017dbacde3fe2d6188273a84776e3e0f6c6d8c38729ed27678baaccad6f3e0ca8b178769f5ef114d9a2cc1999c9ed1b3981564efc741b2f3d97d780a SHA512 e45fbaa76a1eb6be2a82973bf51a79ab5a576d391174821ceeef44ccff64269f66824bcbd0d77dee381c816939d66bc3f8e64f9c6b4052e0287b48a02f7463a1 +EBUILD llvm-14.0.6-r2.ebuild 12453 BLAKE2B 1abe7ff61d3cb1a3fc9edbf9a2c4250f2ccc39dc65c6ae59deb32a7a7634b27b58da7cfe39c1fb7b85388819809e8400436f12faf698be2b3d4a881622890a23 SHA512 1953f255618368526b8a209e19c61b13892337281d35ee5087719ff02925e5ed697bdce30bb43ca1a35b527c832eb0a58cf09e622e15b902d9b2a7848876a85b +EBUILD llvm-15.0.7.ebuild 12622 BLAKE2B d454859d5bd3a53803d75c523be949664273df786e2352f148683d95d6c63657017301bf75c80d61f2dad730b5830434d5fbf019acd0bc6062b7575f27ab11e1 SHA512 b70207c89262d7910478c2548cdd530ca29acfe62636b0c1f983e47968725f0dc59cf9fe3a385bda0057c5c0376b681dcb2124093bbfecd717c7b12882bbaa35 +EBUILD llvm-16.0.0.9999.ebuild 12417 BLAKE2B c9756a3894cc28309788980a035e768d5d034242878dad72b8a7a01e9c67c9ae712a52b7f55a400a7099c1f0c84d60dcf7da2c0ef6e387a3f766c46e2b211e67 SHA512 b509fdbfcdd09708e0e26372e6dc09b14a94a5daba742032ca3bf71c817ee4ae72d9a95d9d587e70eb9a9683af96b06bb64571c4c02bbe70ac4a79e438a89d0b +EBUILD llvm-16.0.0_rc2.ebuild 12423 BLAKE2B 41cd18c9dbba9ece0f847200ad4f959072e07325fc759a597fac492464bd584cdd8354c8be83c301b9ee762d1c3ab9672fbd192f41e2b2b70590a72a28480464 SHA512 3d1e2ef83a98a0fb47a130824d81f77bc66d9e525d25d71d0387733a771c683fd8bb19aab7677b9825b7201ecb842e83803c6b83213e464a1470c2a47957c413 +EBUILD llvm-16.0.0_rc3.ebuild 12417 BLAKE2B c9756a3894cc28309788980a035e768d5d034242878dad72b8a7a01e9c67c9ae712a52b7f55a400a7099c1f0c84d60dcf7da2c0ef6e387a3f766c46e2b211e67 SHA512 b509fdbfcdd09708e0e26372e6dc09b14a94a5daba742032ca3bf71c817ee4ae72d9a95d9d587e70eb9a9683af96b06bb64571c4c02bbe70ac4a79e438a89d0b +EBUILD llvm-17.0.0.9999.ebuild 12417 BLAKE2B c9756a3894cc28309788980a035e768d5d034242878dad72b8a7a01e9c67c9ae712a52b7f55a400a7099c1f0c84d60dcf7da2c0ef6e387a3f766c46e2b211e67 SHA512 b509fdbfcdd09708e0e26372e6dc09b14a94a5daba742032ca3bf71c817ee4ae72d9a95d9d587e70eb9a9683af96b06bb64571c4c02bbe70ac4a79e438a89d0b +EBUILD llvm-17.0.0_pre20230211.ebuild 12417 BLAKE2B c9756a3894cc28309788980a035e768d5d034242878dad72b8a7a01e9c67c9ae712a52b7f55a400a7099c1f0c84d60dcf7da2c0ef6e387a3f766c46e2b211e67 SHA512 b509fdbfcdd09708e0e26372e6dc09b14a94a5daba742032ca3bf71c817ee4ae72d9a95d9d587e70eb9a9683af96b06bb64571c4c02bbe70ac4a79e438a89d0b +EBUILD llvm-17.0.0_pre20230218.ebuild 12417 BLAKE2B c9756a3894cc28309788980a035e768d5d034242878dad72b8a7a01e9c67c9ae712a52b7f55a400a7099c1f0c84d60dcf7da2c0ef6e387a3f766c46e2b211e67 SHA512 b509fdbfcdd09708e0e26372e6dc09b14a94a5daba742032ca3bf71c817ee4ae72d9a95d9d587e70eb9a9683af96b06bb64571c4c02bbe70ac4a79e438a89d0b MISC metadata.xml 2654 BLAKE2B c27983265b6c9b33200ee42565648f30a6cc9c51be53a1cb82a3353d7c1f7aa9c9501c58254280c2880ff2d4992b4834e4b5e2f1c9b1c60e9b21945f234b9973 SHA512 b331d9186908762907f5713b00e357785b62afbee83afefac8701beb1a20f7ebd68df4a030bb82c6f9164719d4ccfcaf16c189833ad40e9f5900c36247d9cff2 diff --git a/sys-devel/llvm/llvm-14.0.6-r2.ebuild b/sys-devel/llvm/llvm-14.0.6-r2.ebuild index dc3a35b256f4..da6b48a58ab2 100644 --- a/sys-devel/llvm/llvm-14.0.6-r2.ebuild +++ b/sys-devel/llvm/llvm-14.0.6-r2.ebuild @@ -321,7 +321,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-15.0.7.ebuild b/sys-devel/llvm/llvm-15.0.7.ebuild index 0608b0a4de25..85f2591d0b7d 100644 --- a/sys-devel/llvm/llvm-15.0.7.ebuild +++ b/sys-devel/llvm/llvm-15.0.7.ebuild @@ -323,7 +323,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.0.9999.ebuild index af0cdcdc6249..fcb512276fe7 100644 --- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild @@ -325,7 +325,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-16.0.0_rc2.ebuild b/sys-devel/llvm/llvm-16.0.0_rc2.ebuild index 92aec87031e0..d0d485fe9e5e 100644 --- a/sys-devel/llvm/llvm-16.0.0_rc2.ebuild +++ b/sys-devel/llvm/llvm-16.0.0_rc2.ebuild @@ -325,7 +325,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-16.0.0_rc3.ebuild b/sys-devel/llvm/llvm-16.0.0_rc3.ebuild new file mode 100644 index 000000000000..fcb512276fe7 --- /dev/null +++ b/sys-devel/llvm/llvm-16.0.0_rc3.ebuild @@ -0,0 +1,516 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ + toolchain-funcs flag-o-matic + +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="" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) + 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 + >=dev-util/cmake-3.16 + 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 ) +LLVM_TEST_COMPONENTS=( third-party ) +LLVM_MANPAGES=1 +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-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() { + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + + 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_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZSTD=$(usex zstd) + + -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 + + # 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 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.0.9999.ebuild b/sys-devel/llvm/llvm-17.0.0.9999.ebuild index af0cdcdc6249..fcb512276fe7 100644 --- a/sys-devel/llvm/llvm-17.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-17.0.0.9999.ebuild @@ -325,7 +325,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-17.0.0_pre20230211.ebuild b/sys-devel/llvm/llvm-17.0.0_pre20230211.ebuild index af0cdcdc6249..fcb512276fe7 100644 --- a/sys-devel/llvm/llvm-17.0.0_pre20230211.ebuild +++ b/sys-devel/llvm/llvm-17.0.0_pre20230211.ebuild @@ -325,7 +325,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then diff --git a/sys-devel/llvm/llvm-17.0.0_pre20230218.ebuild b/sys-devel/llvm/llvm-17.0.0_pre20230218.ebuild index af0cdcdc6249..fcb512276fe7 100644 --- a/sys-devel/llvm/llvm-17.0.0_pre20230218.ebuild +++ b/sys-devel/llvm/llvm-17.0.0_pre20230218.ebuild @@ -325,7 +325,7 @@ get_distribution_components() { } multilib_src_configure() { - tcc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 local ffi_cflags ffi_ldflags if use libffi; then -- cgit v1.2.3