From 67e5603b2844a6657dd0438fa26626b013e5567f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Jun 2024 00:11:52 +0100 Subject: gentoo auto-resync : 24:06:2024 - 00:11:52 --- sys-devel/Manifest.gz | Bin 7711 -> 7699 bytes sys-devel/clang-common/Manifest | 2 + .../clang-common-19.0.0_pre20240623.ebuild | 304 ++++++++++++ sys-devel/clang-runtime/Manifest | 1 + .../clang-runtime-19.0.0_pre20240623.ebuild | 39 ++ sys-devel/clang/Manifest | 4 +- sys-devel/clang/clang-19.0.0.9999.ebuild | 6 - sys-devel/clang/clang-19.0.0_pre20240623.ebuild | 469 ++++++++++++++++++ sys-devel/gcc/Manifest | 4 +- sys-devel/gcc/gcc-12.4.9999.ebuild | 62 --- sys-devel/gcc/gcc-12.5.9999.ebuild | 62 +++ sys-devel/gcc/gcc-14.1.1_p20240622.ebuild | 56 +++ sys-devel/lld/Manifest | 2 + sys-devel/lld/lld-19.0.0_pre20240623.ebuild | 93 ++++ sys-devel/llvm-common/Manifest | 2 + .../llvm-common-19.0.0_pre20240623.ebuild | 53 ++ sys-devel/llvm/Manifest | 2 + sys-devel/llvm/llvm-19.0.0_pre20240623.ebuild | 542 +++++++++++++++++++++ 18 files changed, 1633 insertions(+), 70 deletions(-) create mode 100644 sys-devel/clang-common/clang-common-19.0.0_pre20240623.ebuild create mode 100644 sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240623.ebuild create mode 100644 sys-devel/clang/clang-19.0.0_pre20240623.ebuild delete mode 100644 sys-devel/gcc/gcc-12.4.9999.ebuild create mode 100644 sys-devel/gcc/gcc-12.5.9999.ebuild create mode 100644 sys-devel/gcc/gcc-14.1.1_p20240622.ebuild create mode 100644 sys-devel/lld/lld-19.0.0_pre20240623.ebuild create mode 100644 sys-devel/llvm-common/llvm-common-19.0.0_pre20240623.ebuild create mode 100644 sys-devel/llvm/llvm-19.0.0_pre20240623.ebuild (limited to 'sys-devel') diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz index 4c6f8b3ca133..9d4349da2dc6 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 27dd2a85defd..8dcf52b675b6 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -6,6 +6,7 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 EBUILD clang-common-15.0.7-r8.ebuild 5482 BLAKE2B 20e8744166a852b4dbc233f128807e60bb204f14558d2cc1691b1a87777be2775d1a6c82a108945f795b02919bc47bf213b1a85e45f423c49a6009aed0fbbc3b SHA512 bf1f5cdf47c6772266117e9545994dcfb27cfd263a5e7749604106686d8e56b8b45ddab7073d6baf73e966304162f3aad755075c11dbb16bb42b88fa78e6face @@ -15,4 +16,5 @@ EBUILD clang-common-18.1.7.ebuild 9134 BLAKE2B ffad8a93bd8838dc8c22880e7cd195d77 EBUILD clang-common-19.0.0.9999.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 EBUILD clang-common-19.0.0_pre20240608.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 EBUILD clang-common-19.0.0_pre20240615.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 +EBUILD clang-common-19.0.0_pre20240623.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 MISC metadata.xml 1248 BLAKE2B d9c542ec74a08857a87a42927feef909c343b5b672145e471ebc69753a3f93432d2ae93ed2659a67d504e2c5ff4212640e4208b173d96e5a173a1043766b66f8 SHA512 eb6d4be1dfbdf6b70b774d42493f6b3015472d5e4bba9386254f6e4ae92307169fe1ac6f0f613d452a9c21c6d61ed57ab50efb54813146983f4d6809b32ddacb diff --git a/sys-devel/clang-common/clang-common-19.0.0_pre20240623.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..f260391ba4ab --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240623.ebuild @@ -0,0 +1,304 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !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 +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +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 + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.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. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + newins - gentoo-cet.cfg <<-EOF + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () && !defined(__GLIBC__) + # include + #endif + EOF + + 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 + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for + # non-hardened? + 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 + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +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 4e0a72109a21..b9789e77fb48 100644 --- a/sys-devel/clang-runtime/Manifest +++ b/sys-devel/clang-runtime/Manifest @@ -5,4 +5,5 @@ EBUILD clang-runtime-18.1.7.ebuild 1455 BLAKE2B 09d026673062eaf3251bc0ac3665217f EBUILD clang-runtime-19.0.0.9999.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a EBUILD clang-runtime-19.0.0_pre20240608.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a EBUILD clang-runtime-19.0.0_pre20240615.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a +EBUILD clang-runtime-19.0.0_pre20240623.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a MISC metadata.xml 661 BLAKE2B 24688c511713ea102b83c71d226d519981b3aee0e05ef7a56d6a80be829efd843194e45cb4fd801f0bb976b6f1976386d6a2b05d2bc907fe2aa42b22b85b7d1f SHA512 2b5ab8783c90795f2e7d1673d876048ed9745f4911fb7a860df56deac13a6dfeba4581a84562eae54eff757c45042ca3fab75c7800313ae61df9ce69780a9294 diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240623.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..323c0b62c062 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240623.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 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%%.*}" +IUSE="+compiler-rt libcxx openmp +sanitize" +REQUIRED_USE="sanitize? ( compiler-rt )" + +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 d1c93eefd593..cbb96082ddab 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -13,13 +13,15 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 EBUILD clang-15.0.7-r3.ebuild 12523 BLAKE2B d2f9e112d8c8d782b9d19913332445b234870dbff770bfd520b646347d8d804258e5043a155bb5e15f40ecdb41b2c0d70ee72dbe908b5621c2349d37f181d236 SHA512 c4abe3701012b4f9da97ac182680dbaceed802e95be06ae065debea943fa4635e60f4a0f31b6f23e3f7818f2d30dfb1e2c28f1a85dc0175c158b4e5c68b5a23e EBUILD clang-16.0.6.ebuild 12452 BLAKE2B 446a354b58fc0535b81596a9a3785a4cd5d7b7ad52a461baa3b6b7beacdc12161f62da588cd837b8b9c8f35307b1a2c885b9d01bf8edc4af1b551efaab09ebe8 SHA512 58b5694a7d28a03edd4a71e3a99b0b2678285e616cdaab82bb196f092a8726e9cd3787ab07d724680113b4f6683e89103cab2478e49a85e7b5c75a633fb1ca51 EBUILD clang-17.0.6.ebuild 12151 BLAKE2B 665280844db218824bec2add033e13e14b958ac510fb1b0b7193130a55041a5c802c57aa022a35d65a689c611ca9ed119eaf39c47f581d24f38d9c8655c5f062 SHA512 482ae07e36fb3c593d2051b2034f501fc0c94bdcaeb2a6a0701473d00f16f691c8a1584d4b1773dfd236297a12a42cb4f9443eb5c381dcb10d36f749a432ff1d EBUILD clang-18.1.7.ebuild 12225 BLAKE2B 1909258abbc403a0cd3b9f0ecb6ad5584f6d32eec2efbf518df5e79e513848a1c13e558554fbad126bd23b1236715d641ea7fd1d4c90b6eec0766784e2aa913c SHA512 8fc2935fc58673ac8f0b59a81014be335d2e6798e0787fb81910f8d3844ff4d9f6b6c749ca47bf02b0b24c4423884872df7284fd83efc7d18f015c95b561565a -EBUILD clang-19.0.0.9999.ebuild 12114 BLAKE2B dec80ec29d7ebbf8b41e9f0183600f02c0ddf66d4e4cb42ad7515a9e7877c6fbc4dd9a746a0a482dcd34ad120b3ccd1c5ce4c01f23e399417f5daacfaae6fa68 SHA512 a910a0e7d951e6cd2b7ec959c5cb9fd2d72fa0e72da772dedd4ac9ed852922840bb5228390ede72fdd054eecc5d6be5916ccce6fb04aff17cd98196553c10d20 +EBUILD clang-19.0.0.9999.ebuild 11875 BLAKE2B 7521378bd8f31602184272cc6240c133c8f110ad9ffb7a922e8d2b67c53724cda8217416d5a16269cb9bd55ad8a40bd61a465d3451285223480392afdd733712 SHA512 c1c0834b083008ac6fd51adfffb770b4242e37dd2cbc51c7e9fc58e5e38faf81a737e5a586276f60672223332f011e46ef973a44e0dbcb9fa40ae47b5bba37f8 EBUILD clang-19.0.0_pre20240608.ebuild 12141 BLAKE2B 81dfb104fdbd499b5dd79780171d42b83f0e3da164c7a20a74d81589c7708c50a7900b8bded93a0e889269eab50a5a9e37fe4c135a3c05edad96cc5f33dfd431 SHA512 40f6bd91e1095a230a02f8b3a133d9a667feef5d1ef82dcb78b33e65dab75d240957bf954479fec2a73a1420497c339f93c23942b252e0fd90a74363fd922ef1 EBUILD clang-19.0.0_pre20240615.ebuild 12141 BLAKE2B 81dfb104fdbd499b5dd79780171d42b83f0e3da164c7a20a74d81589c7708c50a7900b8bded93a0e889269eab50a5a9e37fe4c135a3c05edad96cc5f33dfd431 SHA512 40f6bd91e1095a230a02f8b3a133d9a667feef5d1ef82dcb78b33e65dab75d240957bf954479fec2a73a1420497c339f93c23942b252e0fd90a74363fd922ef1 +EBUILD clang-19.0.0_pre20240623.ebuild 11875 BLAKE2B 7521378bd8f31602184272cc6240c133c8f110ad9ffb7a922e8d2b67c53724cda8217416d5a16269cb9bd55ad8a40bd61a465d3451285223480392afdd733712 SHA512 c1c0834b083008ac6fd51adfffb770b4242e37dd2cbc51c7e9fc58e5e38faf81a737e5a586276f60672223332f011e46ef973a44e0dbcb9fa40ae47b5bba37f8 MISC metadata.xml 1318 BLAKE2B 704c1a64297b25da1b2e0eec23cbdf4791273da1babf23292160b6163d43438e62fe214df7afa09232893599951918440954c17a9bfa0c6f829a7d706f564192 SHA512 4677ad146739dd41e025a2335eec353a3d35ac8db7482948fee611566d84b41c4e6bdd75bc3d78f8933d4d9818a36bf222e1aa89e52f945501ff918479fea3b6 diff --git a/sys-devel/clang/clang-19.0.0.9999.ebuild b/sys-devel/clang/clang-19.0.0.9999.ebuild index 2a9776ca6020..87140d676d57 100644 --- a/sys-devel/clang/clang-19.0.0.9999.ebuild +++ b/sys-devel/clang/clang-19.0.0.9999.ebuild @@ -277,12 +277,6 @@ multilib_src_configure() { # 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_CUDAToolkit=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_LIBXML2=$(usex xml) diff --git a/sys-devel/clang/clang-19.0.0_pre20240623.ebuild b/sys-devel/clang/clang-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..87140d676d57 --- /dev/null +++ b/sys-devel/clang/clang-19.0.0_pre20240623.ebuild @@ -0,0 +1,469 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake llvm.org llvm-utils multilib multilib-minimal +inherit prefix python-single-r1 toolchain-funcs + +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}" +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} + test? ( ~sys-devel/lld-${PV} ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + ~sys-devel/clang-runtime-${PV} + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/utils +) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_cond_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +# 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). + +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-installapi + clang-linker-wrapper + 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() { + llvm_prepend_path "${LLVM_MAJOR}" + + 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// /;}" + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_LIBXML2=$(usex xml) + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? + + -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 +} + +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/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/gcc/Manifest b/sys-devel/gcc/Manifest index 91053e196f61..381da1f25e56 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -26,6 +26,7 @@ DIST gcc-13.2.0-patches-17.tar.xz 45036 BLAKE2B 85fe5e6b0da7a4477f0026aaf397d934 DIST gcc-13.3.0.tar.xz 87909952 BLAKE2B 0f3728b026bd8aab0e469dda54facf157a4b753d3405a74b0be6105a6e3a493d26df4007d90ae4e05d86277d41873312638f9589d1757cee80ca84de7f2099e3 SHA512 ed5f2f4c6ed2c796fcf2c93707159e9dbd3ddb1ba063d549804dd68cdabbb6d550985ae1c8465ae9a336cfe29274a6eb0f42e21924360574ebd8e5d5c7c9a801 DIST gcc-14-20240518.tar.xz 87946040 BLAKE2B 83e567d680b1463cc672fb461aa180cf46555911f0e91a3fb89b11fe8b81d12d64b3a3419953849cf2deb38f1cdf0defc05169c145964f74c1105d942b5519f9 SHA512 73dae806add90e8b3cdfe1c56754ae886f6f6150ef4ef217664b48507ff19d20933648bb6a19ab62756146e83e4df037ced30e4504d562966c40b3750475f28f DIST gcc-14-20240615.tar.xz 87972240 BLAKE2B 19b8ed044595393c507ed8b9c6a4a4fde0cf6bc1647f16bdd73e9190303a7bd8441602d73ffeeb75e5232113010a30b8ea848691befd21de5a591c9d56a398b7 SHA512 d8d757cfbedb7342443ce8de4439653537c46d25e552d88cea0ba9f7aa43ad14fb2b42a32a1dce5ae4eb2ac3849024f6b4e700f2c39330a00a65caa3f5fe29e7 +DIST gcc-14-20240622.tar.xz 87978376 BLAKE2B 8fb56057e6a84f941822c58aaee8c7c562a665295db6a1c708eda9457ac38723ab7e8ccdab9768bed888468f01f9a2b42527f9ab5475bd1a55f9e9ef694c8ee0 SHA512 9dd7747488b69378c96e6296332152035358a3091d904bd99f1aca6371a8f4d7ed50d4eca85e99d539849526165f2a4250a3dcf77be29a796a6e030167e7dde8 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.1.0-patches-1.tar.xz 11584 BLAKE2B d483f4e3324acdc26b9837028d5e20ad0cdcf3ef4bcc78a6902d63ceebc7e5ff70c8163f6a8c8e36405df47c59dd2df506147c53ce51a8ec73494e65b5902647 SHA512 3d7aea113b594d1896c93e9e6be85f467488fa75de2800ed76eab2f87cef26829b235d1f361b187e38cf13b0fb9518cd4431c3106ec1e49d0f744e7eb703eaa0 DIST gcc-14.1.0-patches-2.tar.xz 11400 BLAKE2B 8698d9521b193a03df20b68b70bc8d2dc083e246542d95e510b86f152a4d13818162985d4728d87f74be784870595a238d195f617427ec0905919cce0ed23476 SHA512 17e97aec43dea0c131fc6c829d05b7ab56d3164a7d79715f08f54cc2cff81747d1554ca2644edcc1cbd7db3d87dba6a1c2fb71896950bd9b54c4c5c10daa3e7f @@ -50,7 +51,7 @@ EBUILD gcc-12.3.1_p20240209.ebuild 1658 BLAKE2B 5e45b6a4d489f0719474fe44f6f4ce3a EBUILD gcc-12.3.1_p20240502.ebuild 1666 BLAKE2B f01943920ce5eb15d825539492a60e2d9ed69358833a4c2f5717334c39152c4ca47db8b1b213e17e358031912c886b21c7c0c03688bdc8d77d37052b45c4bff9 SHA512 65c3d11a21a251a8dbc899f37af0aca361ae41486db40dd19db1588373f599f5a87933e8190d573d3fac523771a7e1910058c352e563f434603fc7b52e7dfd33 EBUILD gcc-12.3.1_p20240613.ebuild 1667 BLAKE2B feb14aa36ffdcc357862df79af07cf674ababd61b15a1085c8b924c5874ec771379b435572762a8a8582e80f9ac3b6087fc1ca734d3fb2b9aa1d1ca9a2660717 SHA512 b9209208815aee967f0d720f05cdd2674859c57ba73917033f11dd9f79dcf615e503ad0e68c65ab1a3d3f43f4514edb7724c64eea137cbb093c13a6b607b935d EBUILD gcc-12.4.0.ebuild 1666 BLAKE2B f01943920ce5eb15d825539492a60e2d9ed69358833a4c2f5717334c39152c4ca47db8b1b213e17e358031912c886b21c7c0c03688bdc8d77d37052b45c4bff9 SHA512 65c3d11a21a251a8dbc899f37af0aca361ae41486db40dd19db1588373f599f5a87933e8190d573d3fac523771a7e1910058c352e563f434603fc7b52e7dfd33 -EBUILD gcc-12.4.9999.ebuild 1635 BLAKE2B 3af833a998966e089c6db5df1e40733ddf2d181cdcd8f68b6df0fd7db70a3d4b65c1dd7c4edcecbdb97dda959bd7de2dd2fef6502a5ce563f20e525f767ac045 SHA512 59629d13518708f70844d7795bfeb7144d1562ce61d90b666acb41953bf56a368a16471795bce2b6d54a058b3919fcef58b0e60d4b0a89f5e954f9f6b26514e9 +EBUILD gcc-12.5.9999.ebuild 1635 BLAKE2B 3af833a998966e089c6db5df1e40733ddf2d181cdcd8f68b6df0fd7db70a3d4b65c1dd7c4edcecbdb97dda959bd7de2dd2fef6502a5ce563f20e525f767ac045 SHA512 59629d13518708f70844d7795bfeb7144d1562ce61d90b666acb41953bf56a368a16471795bce2b6d54a058b3919fcef58b0e60d4b0a89f5e954f9f6b26514e9 EBUILD gcc-13.2.1_p20240210.ebuild 1718 BLAKE2B 3955dddeac163ab623486dc29bb6442df10aa777385f18ab94db94153fe7d703fdff3a262e71f863d77833763221ba9141fa6fafcc62e33196d206dbf9c245b4 SHA512 e170a54a7c98222dfb420bf0b0eea192adcad207c982cb4a499ccdc55f19c05730673ed31b6d3ff7579a01761f4610a3f5f592e264f0ddcb7e3c3a0c6606284e EBUILD gcc-13.2.1_p20240503.ebuild 1726 BLAKE2B 381a6cd5d60a1e4ac9016198f69d1910ece06c90a42fae257076bb996a602e7abe0a22ce3a54ee44fa556ee2b8f2aa01c54d113ba2be7694b2e67356dedfb213 SHA512 cc5789f2c17046e15ea1063102db13b58be0f63460e2ed284983c487c7e131b05daf1d26a59d8f337409552b8622e04db8d4a7735587d951235ec64438194316 EBUILD gcc-13.3.0.ebuild 1722 BLAKE2B cabfc4c8611616f03565bdb7666005357f6fe7094efa4a14fde7537f859166e0e195865040fe5141cd9391b1e97fd6dd436cfda61e3cd8c6661cbe536bf5f653 SHA512 7bce4bb5e4ca395c954f0e458cb43453e31af06b1cba5dfb00f7915a442d83ae53a3c8500f0dd8e491ac1238e3d954ffff78e4b332cde912623689e44fe2c127 @@ -58,6 +59,7 @@ EBUILD gcc-13.3.1_p20240614.ebuild 1726 BLAKE2B f30ed39390340ce8b3c2f938bc786301 EBUILD gcc-13.4.9999.ebuild 1722 BLAKE2B cabfc4c8611616f03565bdb7666005357f6fe7094efa4a14fde7537f859166e0e195865040fe5141cd9391b1e97fd6dd436cfda61e3cd8c6661cbe536bf5f653 SHA512 7bce4bb5e4ca395c954f0e458cb43453e31af06b1cba5dfb00f7915a442d83ae53a3c8500f0dd8e491ac1238e3d954ffff78e4b332cde912623689e44fe2c127 EBUILD gcc-14.1.1_p20240518.ebuild 1619 BLAKE2B 45cf6627b223638287177489e67c70cbcb09bedacefcadbe0165c05270ee2d56459fe9bc1d209e84ebb9470a038ec75c7e57881bd7e202ae0aae66ef94bc3b98 SHA512 2ab7c3c0d46b690e60ebaa3582b71cc3b0cd7930767888699825674b82e680dddcb4ff40552ad77c9c1d576f21ad98e6255b46cf6e7dc21f10252f8a73db9308 EBUILD gcc-14.1.1_p20240615.ebuild 1619 BLAKE2B 9d9c1e1af0c2f08691774a2fcb48edc120d951db0a58c43be559c9b812e30fd4b760fca23a1f0305db56c4c3542a8ce1347b25d292a263c46e9e0074528efe2b SHA512 6daf55a2f13c758d807fa9a9b29c9973fa927a2c1572fd2a259c3e60150daa7d0b6ea76796c95866313c04322669a40501e6e65f236547224affeb0d43e821ed +EBUILD gcc-14.1.1_p20240622.ebuild 1619 BLAKE2B 9d9c1e1af0c2f08691774a2fcb48edc120d951db0a58c43be559c9b812e30fd4b760fca23a1f0305db56c4c3542a8ce1347b25d292a263c46e9e0074528efe2b SHA512 6daf55a2f13c758d807fa9a9b29c9973fa927a2c1572fd2a259c3e60150daa7d0b6ea76796c95866313c04322669a40501e6e65f236547224affeb0d43e821ed EBUILD gcc-14.1.9999.ebuild 1453 BLAKE2B caee7ba2e0323b0953b53c822cfe76c70eebd466d80575612ae6daffdfbdb663266a9272691b33c4396bf8c70c81cf3c64035d9c5159f1ba9ed1e231ce739c1f SHA512 b1cc3de6f9f03b6e6558824cec9c19c8b4c424c769f8d02c0675c20f6c687b2ac27fb8d19646feb221570611e35248b8c22334b9207d27c401a5c34a54e34652 EBUILD gcc-15.0.0_pre20240609-r1.ebuild 1402 BLAKE2B 773dde45ccecbf9f0645b184d3f8200c2b6876ed11aaeda3e616889c4a5fc44db1a76bc640cfe4fbff094ccb93d2c89130baf4bb053cff25e794eceb88d95682 SHA512 1b2a9b20806a57fd90ff8a100c393586b70dbc308d825823c9c680c62a2334d2716678f2a6faee1f11044e8f6a7c0f4617d1bfd8b98a49c0e257f2dbe6ffecfd EBUILD gcc-15.0.0_pre20240616.ebuild 1402 BLAKE2B 1eda966164b7979272b3be8edc7b30752c4aae2524824a2a53476d7b8e711a01f5c4f9aee5b09f4aa7c8ac43fd9e0b86e5c65dd37b8467e22eb4f52a916448a4 SHA512 79282351ebb8eeb60202388dcf812d2a41621e175efc72f3a3c8ff923087f7d2d4c8381c2622d036991cdb62b51299985543e97ce270c1712d56357d8df0400f diff --git a/sys-devel/gcc/gcc-12.4.9999.ebuild b/sys-devel/gcc/gcc-12.4.9999.ebuild deleted file mode 100644 index 888f07093124..000000000000 --- a/sys-devel/gcc/gcc-12.4.9999.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# 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="12.3.0" -MUSL_GCC_VER="12.3.0" -PYTHON_COMPAT=( python3_{10..12} ) - -if [[ ${PV} == *.9999 ]] ; then - MY_PV_2=$(ver_cut 2) - MY_PV_3=1 - if [[ ${MY_PV_2} == 0 ]] ; then - MY_PV_2=0 - MY_PV_3=0 - else - MY_PV_2=$((${MY_PV_2} - 1)) - fi - - # e.g. 12.2.9999 -> 12.1.1 - TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} -elif [[ -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 - # Don't keyword live ebuilds - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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}" - BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" -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_user -} diff --git a/sys-devel/gcc/gcc-12.5.9999.ebuild b/sys-devel/gcc/gcc-12.5.9999.ebuild new file mode 100644 index 000000000000..888f07093124 --- /dev/null +++ b/sys-devel/gcc/gcc-12.5.9999.ebuild @@ -0,0 +1,62 @@ +# 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="12.3.0" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -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 + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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}" + BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +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_user +} diff --git a/sys-devel/gcc/gcc-14.1.1_p20240622.ebuild b/sys-devel/gcc/gcc-14.1.1_p20240622.ebuild new file mode 100644 index 000000000000..30a0c8d6cd97 --- /dev/null +++ b/sys-devel/gcc/gcc-14.1.1_p20240622.ebuild @@ -0,0 +1,56 @@ +# 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="2" +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 + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + # 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}" + BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +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/lld/Manifest b/sys-devel/lld/Manifest index e9ec0ea2395b..d24522866739 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -7,6 +7,7 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 EBUILD lld-15.0.7.ebuild 2269 BLAKE2B 322d5608e3acfb87bfb720646404ed405a3113c4faf1059428663a50d5566d7842fcff57ccf3aeb5e97b1a9acd4efd862db2368f130e088944ef4f0faf3c90f8 SHA512 e50d1d99fe18b6aba57c06eb6853f3212be1f7b7f2f3c70dcd226a69a4defc753eafcce77eb74f30eaa31b010fa094738718c1cdb23e584ef6e33eb72e536719 @@ -16,4 +17,5 @@ EBUILD lld-18.1.7.ebuild 2373 BLAKE2B 35b65cd90474db95b394ef3b041c017bf78b6650e2 EBUILD lld-19.0.0.9999.ebuild 2293 BLAKE2B 5825f0a471a50ec1d9e7775a82736f6369fa1e99904b30cf068f0092dce44d4e0c2e76fcb21d70b9ecb1756d19e8482a5ac940bdc25c5a1d58c9aee0c21b5d7b SHA512 86226e5f9aea8a87b022b2def7cef707fc7db0f1e026f4965ec64390708f7e2355c3e1ee991487bd0c6f9f17dc2f129a6b7a2b8abbf1e14fe48dd0e4cd73b1fa EBUILD lld-19.0.0_pre20240608.ebuild 2293 BLAKE2B 5825f0a471a50ec1d9e7775a82736f6369fa1e99904b30cf068f0092dce44d4e0c2e76fcb21d70b9ecb1756d19e8482a5ac940bdc25c5a1d58c9aee0c21b5d7b SHA512 86226e5f9aea8a87b022b2def7cef707fc7db0f1e026f4965ec64390708f7e2355c3e1ee991487bd0c6f9f17dc2f129a6b7a2b8abbf1e14fe48dd0e4cd73b1fa EBUILD lld-19.0.0_pre20240615.ebuild 2293 BLAKE2B 5825f0a471a50ec1d9e7775a82736f6369fa1e99904b30cf068f0092dce44d4e0c2e76fcb21d70b9ecb1756d19e8482a5ac940bdc25c5a1d58c9aee0c21b5d7b SHA512 86226e5f9aea8a87b022b2def7cef707fc7db0f1e026f4965ec64390708f7e2355c3e1ee991487bd0c6f9f17dc2f129a6b7a2b8abbf1e14fe48dd0e4cd73b1fa +EBUILD lld-19.0.0_pre20240623.ebuild 2293 BLAKE2B 5825f0a471a50ec1d9e7775a82736f6369fa1e99904b30cf068f0092dce44d4e0c2e76fcb21d70b9ecb1756d19e8482a5ac940bdc25c5a1d58c9aee0c21b5d7b SHA512 86226e5f9aea8a87b022b2def7cef707fc7db0f1e026f4965ec64390708f7e2355c3e1ee991487bd0c6f9f17dc2f129a6b7a2b8abbf1e14fe48dd0e4cd73b1fa MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685 diff --git a/sys-devel/lld/lld-19.0.0_pre20240623.ebuild b/sys-devel/lld/lld-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..79558afa1abe --- /dev/null +++ b/sys-devel/lld/lld-19.0.0_pre20240623.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit cmake flag-o-matic llvm.org llvm-utils 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}" +IUSE="+debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(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.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +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_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + 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 cea89b379e6e..ac75ab89067b 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -6,6 +6,7 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 EBUILD llvm-common-15.0.7.ebuild 1014 BLAKE2B da3b7ec6cd3c1e57758312fb9ea25e693305e1ef72b350eea85fbde5a1e636269d84bd491b6f528aee8a9cb8229f6304b371f99e6ac416c661c6519706b83b61 SHA512 68b9d672372fe71e39f2b8f9d80eb1dcb5138b8b9b961f56a4eeb81b3fc4054448a51a46b3a62547ebb6262425512f39bc146e5f2c3703de10ab520f1594e7a4 @@ -15,4 +16,5 @@ EBUILD llvm-common-18.1.7.ebuild 1047 BLAKE2B 195324cff3d34038012504238dfbbdb44f EBUILD llvm-common-19.0.0.9999.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d EBUILD llvm-common-19.0.0_pre20240608.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d EBUILD llvm-common-19.0.0_pre20240615.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d +EBUILD llvm-common-19.0.0_pre20240623.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685 diff --git a/sys-devel/llvm-common/llvm-common-19.0.0_pre20240623.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..2d8f35a84179 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240623.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 6f00250864fa..96424fe401e2 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -13,6 +13,7 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 EBUILD llvm-15.0.7-r3.ebuild 12592 BLAKE2B 81cd473990810203c4e8a47ceb0189ed399c869b85fab3181724dbd1429063cdaad1f6b6cb1ab5b392f531b0b4907cc61f266558b873b236f9a3ff439045aa37 SHA512 2321f9e6da93af22d5f074175a6a92b7dcd271e2b9b92128d268dd777a9c3bdd876010740153734e2593b90d26a58d4f784b2256a6b1e18160d13b3c10441fb3 @@ -22,4 +23,5 @@ EBUILD llvm-18.1.7.ebuild 13359 BLAKE2B 0baff2537134709ae351f867b40e9f0a7bcb5405 EBUILD llvm-19.0.0.9999.ebuild 12883 BLAKE2B 7cdb711526347c7a2c378c0e52e006429021daf3d637187eb9439d70a35ab94b59b028e9dd0d832e83ca2a522a2dd701268f5dc942ef53b3bba8d9bc1942e5f0 SHA512 43b7a87422810949d8c59d97e21be87311f755f2565828dacb988e64510c4f7c16202aa50f047ddddafd0c9cec14618cfc65c38a0016a9e8aa2055f18510dc59 EBUILD llvm-19.0.0_pre20240608.ebuild 12883 BLAKE2B 7cdb711526347c7a2c378c0e52e006429021daf3d637187eb9439d70a35ab94b59b028e9dd0d832e83ca2a522a2dd701268f5dc942ef53b3bba8d9bc1942e5f0 SHA512 43b7a87422810949d8c59d97e21be87311f755f2565828dacb988e64510c4f7c16202aa50f047ddddafd0c9cec14618cfc65c38a0016a9e8aa2055f18510dc59 EBUILD llvm-19.0.0_pre20240615.ebuild 12883 BLAKE2B 7cdb711526347c7a2c378c0e52e006429021daf3d637187eb9439d70a35ab94b59b028e9dd0d832e83ca2a522a2dd701268f5dc942ef53b3bba8d9bc1942e5f0 SHA512 43b7a87422810949d8c59d97e21be87311f755f2565828dacb988e64510c4f7c16202aa50f047ddddafd0c9cec14618cfc65c38a0016a9e8aa2055f18510dc59 +EBUILD llvm-19.0.0_pre20240623.ebuild 12883 BLAKE2B 7cdb711526347c7a2c378c0e52e006429021daf3d637187eb9439d70a35ab94b59b028e9dd0d832e83ca2a522a2dd701268f5dc942ef53b3bba8d9bc1942e5f0 SHA512 43b7a87422810949d8c59d97e21be87311f755f2565828dacb988e64510c4f7c16202aa50f047ddddafd0c9cec14618cfc65c38a0016a9e8aa2055f18510dc59 MISC metadata.xml 2835 BLAKE2B 07816d714509d62c0e0a443cc4af1f1f049497de75431f80a981f662b4f2281a16655be3e733a26099d0d814d5ce26d80cee13aa7a4e8d079168846a8e02670f SHA512 292ccb0a05a0239b5b00c6a84be11b4b385900d6467a6a139af03588c61aff9ac0e4bbcd23e89b2a7d7947f7d8cf8ba9323f2539a6c563a338b73f5ac6ffd00f diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240623.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..c4930d262794 --- /dev/null +++ b/sys-devel/llvm/llvm-19.0.0_pre20240623.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..13} ) + +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}" +IUSE=" + +binutils-plugin +debug debuginfod doc exegesis libedit +libffi + test 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}] ) + 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+=( + # library used by lldb + LLVMDebuginfod + + # 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-readtapi + llvm-reduce + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + reduce-chunk-list + 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_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}" + + -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+=( + # 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