From d72a987a342949e200b5e9decbd71f246da53788 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 May 2024 00:01:15 +0100 Subject: gentoo auto-resync : 12:05:2024 - 00:01:15 --- sys-devel/Manifest.gz | Bin 7700 -> 7701 bytes sys-devel/binutils/Manifest | 2 +- sys-devel/binutils/binutils-2.42-r1.ebuild | 2 +- sys-devel/clang-common/Manifest | 2 + .../clang-common-19.0.0_pre20240509.ebuild | 304 ++++++++++++ sys-devel/clang-runtime/Manifest | 1 + .../clang-runtime-19.0.0_pre20240509.ebuild | 39 ++ sys-devel/clang/Manifest | 2 + sys-devel/clang/clang-19.0.0_pre20240509.ebuild | 475 ++++++++++++++++++ sys-devel/gcc/Manifest | 9 +- sys-devel/gcc/gcc-13.2.1_p20240510.ebuild | 66 +++ sys-devel/gcc/gcc-14.0.1_pre20240430.ebuild | 67 --- sys-devel/gcc/gcc-14.0.1_pre20240503.ebuild | 67 --- sys-devel/lld/Manifest | 2 + sys-devel/lld/lld-19.0.0_pre20240509.ebuild | 93 ++++ sys-devel/llvm-common/Manifest | 2 + .../llvm-common-19.0.0_pre20240509.ebuild | 53 ++ sys-devel/llvm/Manifest | 2 + sys-devel/llvm/llvm-19.0.0_pre20240509.ebuild | 547 +++++++++++++++++++++ 19 files changed, 1593 insertions(+), 142 deletions(-) create mode 100644 sys-devel/clang-common/clang-common-19.0.0_pre20240509.ebuild create mode 100644 sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240509.ebuild create mode 100644 sys-devel/clang/clang-19.0.0_pre20240509.ebuild create mode 100644 sys-devel/gcc/gcc-13.2.1_p20240510.ebuild delete mode 100644 sys-devel/gcc/gcc-14.0.1_pre20240430.ebuild delete mode 100644 sys-devel/gcc/gcc-14.0.1_pre20240503.ebuild create mode 100644 sys-devel/lld/lld-19.0.0_pre20240509.ebuild create mode 100644 sys-devel/llvm-common/llvm-common-19.0.0_pre20240509.ebuild create mode 100644 sys-devel/llvm/llvm-19.0.0_pre20240509.ebuild (limited to 'sys-devel') diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz index a83760c38939..faadedbd3eb7 100644 Binary files a/sys-devel/Manifest.gz and b/sys-devel/Manifest.gz differ diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index f90c0609798e..782627089a87 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -37,6 +37,6 @@ EBUILD binutils-2.38-r2.ebuild 13134 BLAKE2B e2e1805917cb6a6ee19c30ad3b9bec5daaa EBUILD binutils-2.39-r5.ebuild 13655 BLAKE2B 28c078a099015b084637aae637a2c346eab4156f8b94842fff790dbc7004049cbcf7a71ec9ad2b892d4d89d1377a7f3876514e6de167adab9f98639cf17e4763 SHA512 b7f3aa7252f6803afabef0d2434151cc381023ac41ab0a0771dd2480333c4ff5ae59d0211603261ab5c5071f4281fbaa9190a172fcefdf3eb37c70ced3f737f6 EBUILD binutils-2.40-r9.ebuild 14132 BLAKE2B ea7d8298ab644f3c4d1c2ca620949cef1f2e146243052eaa50545ccf46bd63858265c00169e0440e90cbefb8d4e16cceb64d709074dcdfc1c257a4760baa2196 SHA512 0396cf41ca211169afc106efe15c8a009e354d675c21a42b73aa7c1feab785e9c927c034ef86b92aba57b4a422189838b9c51a3e864be82901eb535da331a7a9 EBUILD binutils-2.41-r5.ebuild 14654 BLAKE2B 2049e8618a6aa4385bf036726a027cc2e58ce1e5e00d35d1d9926846f0209fcfe958d42e7ad4de6ea474bc8dd728c6f8d706121867e2c39e1404621deb15a1af SHA512 feeb65fc8ed360235fddc9d287d4aa28109ea60504283332940133eb40bcc0be5799a400c1da8aa7cf0e4038ebc8619ee225d6baf83ddc9f1d923c2ba2ded675 -EBUILD binutils-2.42-r1.ebuild 15528 BLAKE2B 6ef1df9992b9e2da5a0b4bed549de4f85cadfb17df94b3a3a5ee497edc64081e103b91e7368cd7bae709fd45c7d8d00e3647b6f4f3a02d5e26a7ef17f22e495b SHA512 42e636e73edb1f10eea3a8e91774c9194d0ce4137f60bfa22e253e6106301ead661d050474b45ef96ebf42e91c964a8277d2266bb7780d0bf92d4d9d4e9c44fa +EBUILD binutils-2.42-r1.ebuild 15527 BLAKE2B b32d127722cf8f14594b965d68c818c5436a43bc64ce3335070e6efcac545e35e2c0ae04aa439c95be402eba66f3036d667ffafb3036de96251c0c54945509cc SHA512 e99b0a1c6b82de4ec5a967660451c98363c2cbcb4889b37ee6b57ce6e69daf073408e8716cb89199e29774c1772fd97cf388e77a8341705a8727c2192db13547 EBUILD binutils-9999.ebuild 15530 BLAKE2B d92bd075285bff3f62e62b606888e418e6dc4e73b17756db590085d98296259287f7e1a8b308b7469a461e6b2fe58afa4cf8b08a9b2eaffb074f7227ff6cb4c2 SHA512 be4fa43d5911e4756a04d0ccf6f9afb66fbb712836856fe2087508f8a8345cd0a351ec3a900d1c138a8779f0c0690c4a473c3d0de3b1811f8fe28491900cd36f MISC metadata.xml 995 BLAKE2B 85ccdd924f8c459a4cd7e608dff59c7281523da0d9457b0094b97e140cd07a300cb38383d9402808859100ca0bf219ce86e367bb5282216121bd81f68d588c17 SHA512 3ee538640e5d8c0efe6b8cf1de299e0d78965dece1ad814384844e8e24db72b11ca30d5fb68dfae2e71046d35aee0e71ee3ecbda3730ca49446dd0b2cd0f817c diff --git a/sys-devel/binutils/binutils-2.42-r1.ebuild b/sys-devel/binutils/binutils-2.42-r1.ebuild index a43babf01253..4857ba622360 100644 --- a/sys-devel/binutils/binutils-2.42-r1.ebuild +++ b/sys-devel/binutils/binutils-2.42-r1.ebuild @@ -32,7 +32,7 @@ else [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" SLOT=$(ver_cut 1-2) - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86" fi # diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index c05a24105aed..200b6310bd05 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -10,6 +10,7 @@ DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 +DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 EBUILD clang-common-15.0.7-r8.ebuild 5482 BLAKE2B 20e8744166a852b4dbc233f128807e60bb204f14558d2cc1691b1a87777be2775d1a6c82a108945f795b02919bc47bf213b1a85e45f423c49a6009aed0fbbc3b SHA512 bf1f5cdf47c6772266117e9545994dcfb27cfd263a5e7749604106686d8e56b8b45ddab7073d6baf73e966304162f3aad755075c11dbb16bb42b88fa78e6face EBUILD clang-common-16.0.6-r4.ebuild 5726 BLAKE2B de26b88570bf487a2be2a59f4551c8e61b940fb84b0dc3cb5be1884252672782700b657fb63c0b7ac247ec2092b236a550b51273f73ec19fab7db6eeda0ff94e SHA512 9f2778fbb89d578e162b36c7a692219533437d9fbec407422e7aff1b11d942f09c8cf0edb5c5bd37bbf34523b1f947b418f954b632d769f836baa7d2493bc527 EBUILD clang-common-17.0.6-r5.ebuild 9010 BLAKE2B cbb5c5094ca6e99fc9ce1734acf02e2e35b792173f84b71e19b25e687f7a93a6fca31e4461fc580d92c0eadabe1400359bec3938fc0cba2cac9bc28a4b8d66be SHA512 ea66877912d34f11a0b788a0d188caf03a5c06098507e7bbb3fa609f594d7b9397ac8fa21c7b502238e36b1ede7bf32dc173b9a6d74a3be1e5d3f25babac9165 @@ -18,4 +19,5 @@ EBUILD clang-common-18.1.5.ebuild 9134 BLAKE2B ffad8a93bd8838dc8c22880e7cd195d77 EBUILD clang-common-19.0.0.9999.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 EBUILD clang-common-19.0.0_pre20240427.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 EBUILD clang-common-19.0.0_pre20240504.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 +EBUILD clang-common-19.0.0_pre20240509.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_pre20240509.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..f260391ba4ab --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240509.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 2fc7f5e47579..6b051fe60989 100644 --- a/sys-devel/clang-runtime/Manifest +++ b/sys-devel/clang-runtime/Manifest @@ -6,4 +6,5 @@ EBUILD clang-runtime-18.1.5.ebuild 1455 BLAKE2B 09d026673062eaf3251bc0ac3665217f EBUILD clang-runtime-19.0.0.9999.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a EBUILD clang-runtime-19.0.0_pre20240427.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a EBUILD clang-runtime-19.0.0_pre20240504.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a +EBUILD clang-runtime-19.0.0_pre20240509.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_pre20240509.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..323c0b62c062 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240509.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 e9c852531550..61872406d4d8 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -17,6 +17,7 @@ DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 +DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 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 @@ -25,4 +26,5 @@ EBUILD clang-18.1.5.ebuild 12225 BLAKE2B d52fd24ce24fb92e1546160ac8aecbb2baef2c0 EBUILD clang-19.0.0.9999.ebuild 12121 BLAKE2B e9e8731b4b44f4d0fa46280abea5d33792816ab54c7f40dbff794e7fcdd1fdc1f37b47fdb79efe16f3ee5c5b86a4a6d62da4765da4283467457bf3329e01cb7b SHA512 95974fe447ad803577d6bcbada6dc33b32b7ae1a6626e754529b334c2565b3d5a26dd51c6391edbc6c7defe4450f103dbdbbdcfd4b241c882d922197ef0895ab EBUILD clang-19.0.0_pre20240427.ebuild 12121 BLAKE2B e9e8731b4b44f4d0fa46280abea5d33792816ab54c7f40dbff794e7fcdd1fdc1f37b47fdb79efe16f3ee5c5b86a4a6d62da4765da4283467457bf3329e01cb7b SHA512 95974fe447ad803577d6bcbada6dc33b32b7ae1a6626e754529b334c2565b3d5a26dd51c6391edbc6c7defe4450f103dbdbbdcfd4b241c882d922197ef0895ab EBUILD clang-19.0.0_pre20240504.ebuild 12121 BLAKE2B e9e8731b4b44f4d0fa46280abea5d33792816ab54c7f40dbff794e7fcdd1fdc1f37b47fdb79efe16f3ee5c5b86a4a6d62da4765da4283467457bf3329e01cb7b SHA512 95974fe447ad803577d6bcbada6dc33b32b7ae1a6626e754529b334c2565b3d5a26dd51c6391edbc6c7defe4450f103dbdbbdcfd4b241c882d922197ef0895ab +EBUILD clang-19.0.0_pre20240509.ebuild 12121 BLAKE2B e9e8731b4b44f4d0fa46280abea5d33792816ab54c7f40dbff794e7fcdd1fdc1f37b47fdb79efe16f3ee5c5b86a4a6d62da4765da4283467457bf3329e01cb7b SHA512 95974fe447ad803577d6bcbada6dc33b32b7ae1a6626e754529b334c2565b3d5a26dd51c6391edbc6c7defe4450f103dbdbbdcfd4b241c882d922197ef0895ab MISC metadata.xml 1318 BLAKE2B 704c1a64297b25da1b2e0eec23cbdf4791273da1babf23292160b6163d43438e62fe214df7afa09232893599951918440954c17a9bfa0c6f829a7d706f564192 SHA512 4677ad146739dd41e025a2335eec353a3d35ac8db7482948fee611566d84b41c4e6bdd75bc3d78f8933d4d9818a36bf222e1aa89e52f945501ff918479fea3b6 diff --git a/sys-devel/clang/clang-19.0.0_pre20240509.ebuild b/sys-devel/clang/clang-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..79df96923121 --- /dev/null +++ b/sys-devel/clang/clang-19.0.0_pre20240509.ebuild @@ -0,0 +1,475 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake 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/lib/Transforms/Hello +) +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-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 + + # 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) + -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 42f1c805b076..6743f06edfb3 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -16,13 +16,11 @@ DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b7 DIST gcc-12.3.0-patches-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f DIST gcc-13-20240503.tar.xz 84417232 BLAKE2B 4024852c3252667054e6086263b2a0e21dfa1e56a7adf4edb2fee4841dc2b41eb3f02dee7b15c5de3a1ac7c438929da4ca584cab07724086f6eb315a331c4a44 SHA512 32b74972ba94d1016e052eb7c7dc976b32d679e40aeafb406bbbc69d34ade3fe0f35d8941ef678eaf0bb33aea1aaba8fbce9122733b12920a470763a18aa6514 +DIST gcc-13-20240510.tar.xz 84434880 BLAKE2B 5e4287c90dc7af4b8186f7a8766f2777aade3d6c863ee56c7b87b91f0805a73d1a16c6a2243816f4f5ab17583220bcd323bc123770937e43bd603318f7aa17e9 SHA512 cd438ec026a107ee41314d87e994e722cb332604cb02878d02eae3732c38c0a39494fed05af4276bf6de902cb6600eba55bfc650fc72fb187dfd15186e46c1f8 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 DIST gcc-13.2.0-patches-14.tar.xz 46928 BLAKE2B fce23bc5315f35b04a4976550c4b44578944a1b17e40c7553351eeb8a1ef0f3a2538da5a5e1ae6f37b784ff11bbd8a44b8f6eec542be63e34d984dee69e1cd81 SHA512 d7d52bb2915fd89c06b0134bede8db939cadbb1f2dcddf923bee2c3f9f577ff9e5e986b60420d892539edf82867a0d1bd635807814bc618b06a2b37cdaca893a DIST gcc-13.2.0-patches-15.tar.xz 47052 BLAKE2B f145341813d6baf9cbcc3e8421c7f427148503d2aeddd6a2eaac1ad3d470a818292392861542a7915d8b0f2f9b3255603f394b2e6833141658fc035bcd2b5366 SHA512 c89a3fccd944f03d25e076a967c3b220803ee9a6fbedec1daf2c20f629dd6162ce6be4f259522bd193169f0e8307daa9895b5d8581cf975ee086e5abfd675e34 -DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617 -DIST gcc-14.0.0-patches-26.tar.xz 12360 BLAKE2B a2fdd6ff1774bc94f96bc4f7da4092c373936c93e04b94e75701227ab55d530523fee6b561773d05080e51748cc7716868d8b108f51a06e37a2c26a1d7f39b33 SHA512 1275e6345417ee196e74c46845d05508c8662d71e2432fbfbf7f1eb9c220657b4ee8e3b0ca02b7b4c7e14df164f254380c65af91cadc3bda4cd7afbe6af5ea8b -DIST gcc-14.1.0-RC-20240430.tar.xz 92292396 BLAKE2B c1a449c0677b6aaf61efd85cb80d14e1d27e9913a7b1b183689ccdb67ef62203d62e3665e093bbeb96b6f28c6d623694853c87ee67bb9098a4cb8397b224cdb9 SHA512 d4ee39b5e77f94dbf8212f5e026eefa15803f3cd6846d6179ea16edb6beea902bc5cb0b90a8c4383b6d6e50083f457959de2dc3b1240975eb283bff43b628f92 -DIST gcc-14.1.0-RC-20240503.tar.xz 92292772 BLAKE2B 2ed7adfe3b2476eb09ef950650ce83429cc0d43daab9fbc438baf60d503e9945fe1e260e3e97b38b5e53ee73f1a7c65c227f49e91db1b1472e251dc011a2ad10 SHA512 a1d9f52243afb8b5dc428bfc45b5cce85c6fdfc3f64bdd45e2afe7e98cc3107adf0ed34af4076fc40df48830f993409dae21e65f7f5db3158f20c738cebd9955 +DIST gcc-13.2.0-patches-16.tar.xz 44792 BLAKE2B 0b6b584d68e69685638695596b780249ca0119ad362747a82d886fd10f77ceb05d02e033e906a090c67f44b1977f40df6a95206d81a32dd15e2f5413c6c92496 SHA512 324d9e63d16c35d55edde20de049162c01b0d487b4548d06c49f0da04a761ec255bc5e020cc2e7f60d12f5d129768afdcf7c86a59126f71f388ab375c34be6de 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.tar.xz 92265736 BLAKE2B 7efd6574b8bca081de6e31480ec0565c6d7fb773383e8e1fdcc17e35bba2bf44b3f4f995cdbcccd001689926e96a6563ef3d099902fe3b37ab09dcf553ab0596 SHA512 e9e224f2b26646fcf038d28dfa08b94c623bc57941f99894a321d01c600f7c68aff6b8837fd25e73e540de1f8de5606e98694a62cdcdfb525ce768b3ef6879ea @@ -46,9 +44,8 @@ EBUILD gcc-12.3.1_p20240509.ebuild 1667 BLAKE2B feb14aa36ffdcc357862df79af07cf67 EBUILD gcc-12.4.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.2.1_p20240510.ebuild 1727 BLAKE2B 0445c77a22452fecf262fbffb8f5665e72f8f756ca274c0bf2eecc38eefb135a7420852c41e632a176c93d02fb109ff89037854673073f8e62a79eba4c5ceb10 SHA512 ae70bbc550e818873fc47b1549ea25d3b8294ab6dc2eb287b7afc7a146bf71bbe112c8ba34058d67bb0419eabfcf84d9e7679fbc70e4269a41065edbe6a41863 EBUILD gcc-13.3.9999.ebuild 1635 BLAKE2B 06b81b06457d409fa4d837adb5e7d60c207546c115916a3ade51d4ec18dee9985b5b3aeb0f811ce9fd1bec29afcc91298110c33ab604ca44ce86c151e41d2037 SHA512 47e978a337c2073c19574cc7697665bcc62480258dd01ceaf105d14221d10473e8755eb1d7f53096cd6ed03fa11aa0a14a7cae42271b38a423d9cdf950b9a942 -EBUILD gcc-14.0.1_pre20240430.ebuild 1720 BLAKE2B 825a9920c30aae378c3558146c2b98a9561c3c94a75395883e2b619ab4500feb47e692f1f1ee082067d692ab9b01bd94981af15ae5afcc3573568388c6eacd2b SHA512 d1852d3b482279ba20da06b62735fa297d2334896515e6555647c47c1cbe9c7a72b1817e423500e6a67d35a455dd8d2856bfad41909933299f43b759ac456201 -EBUILD gcc-14.0.1_pre20240503.ebuild 1720 BLAKE2B 825a9920c30aae378c3558146c2b98a9561c3c94a75395883e2b619ab4500feb47e692f1f1ee082067d692ab9b01bd94981af15ae5afcc3573568388c6eacd2b SHA512 d1852d3b482279ba20da06b62735fa297d2334896515e6555647c47c1cbe9c7a72b1817e423500e6a67d35a455dd8d2856bfad41909933299f43b759ac456201 EBUILD gcc-14.1.0-r1.ebuild 1475 BLAKE2B e25b99917c998a17ff7634bccf4fd1b133bc56f0346e39e6851bbb75f20c859895bf99af4dfd1decc3a8e4c1bd9bd96ef0df4df82e84a62b5b7bb06f2383cd1f SHA512 9dc820ac2f40f75550ddc8a404afbedfe273b0c6368c62161aa53e26e4f0e195bd1ecdbd4d21f8ca21fdfd2a7b483928a2d64ed67f08ab9391d94e536e09b8fb EBUILD gcc-14.1.0.ebuild 1421 BLAKE2B 058366274ed328844e97c6071519375252397425c04619b1dfc50fd9e917769092dc1f42277625f969e5b45b7476b30115abcda321f3285db784b7f6a4d492e4 SHA512 dd6fc016e3019e2675f8a019cff5f5cba7f7933d3155693926a507cf3d71e2b030e683d07a25890696b2a568efe89a5d8e1fdd88cdce865b661628e8f1ce6397 EBUILD gcc-14.1.9999.ebuild 1394 BLAKE2B 6a8bef5a0638de6ddbc1126ffbc1af934d95243575a20bfa8dd6eb9f5c03572e1b8019d9439e7c59c4fa208373073a083796536694205967240c257b37f9d2ce SHA512 22c1e9406ee605d82e40fd0f34b538d09b4aacdd12f43f782ad23d915ea08e579bb67758b4500e1f7fc78fdf546203f4913250acecfff342748ef30ec433bd08 diff --git a/sys-devel/gcc/gcc-13.2.1_p20240510.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240510.ebuild new file mode 100644 index 000000000000..3660aa66f2a7 --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240510.ebuild @@ -0,0 +1,66 @@ +# 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="13.2.0" +PATCH_VER="16" +MUSL_VER="2" +MUSL_GCC_VER="13.2.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 ~loong ~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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240430.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240430.ebuild deleted file mode 100644 index 202dd10cfd6e..000000000000 --- a/sys-devel/gcc/gcc-14.0.1_pre20240430.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_GCC_RC=1 -TOOLCHAIN_PATCH_DEV="sam" -PATCH_GCC_VER="14.0.0" -PATCH_VER="26" -MUSL_VER="1" -MUSL_GCC_VER="14.0.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=master -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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch - eapply_user -} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240503.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240503.ebuild deleted file mode 100644 index 202dd10cfd6e..000000000000 --- a/sys-devel/gcc/gcc-14.0.1_pre20240503.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_GCC_RC=1 -TOOLCHAIN_PATCH_DEV="sam" -PATCH_GCC_VER="14.0.0" -PATCH_VER="26" -MUSL_VER="1" -MUSL_GCC_VER="14.0.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=master -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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch - eapply_user -} diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest index f995fa3d7529..51e63314e456 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -11,6 +11,7 @@ DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 +DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 EBUILD lld-15.0.7.ebuild 2269 BLAKE2B 322d5608e3acfb87bfb720646404ed405a3113c4faf1059428663a50d5566d7842fcff57ccf3aeb5e97b1a9acd4efd862db2368f130e088944ef4f0faf3c90f8 SHA512 e50d1d99fe18b6aba57c06eb6853f3212be1f7b7f2f3c70dcd226a69a4defc753eafcce77eb74f30eaa31b010fa094738718c1cdb23e584ef6e33eb72e536719 EBUILD lld-16.0.6.ebuild 2324 BLAKE2B 9b849aea16a8188e4da4cfcf0c85fb3e997007e1287ec062aee182c7955c7bc78132e761c2611198c7207283fbe930fbee6bdc9a39b922d6d5387bedadaf1b76 SHA512 a7c3d4c1508e5435ba9f6250c6b2fd3157fb4f2c205a6888736f79fa739c59eec3e901927b53af81de3a3c6d4fa5d576be3eaa6ad45c60e5d952ed4ad9706c2f EBUILD lld-17.0.6.ebuild 2363 BLAKE2B 8ebe513b67f3fb8efd981b97c1f77fe5de2065c363c2b9e99b8836983539fe5637b231e8be2a87713d47b48a49bfde77471ad65fa5166b606df476eca6f94fc1 SHA512 fd63e8600e393ecd95a05a28c8ac0d71b12f5aedcf273f432bea1904165b874ee913afff4aab91c2049aa1eb95c239bca217b84150133b2060f95ea66ce1944e @@ -19,4 +20,5 @@ EBUILD lld-18.1.5.ebuild 2373 BLAKE2B 3c077afb30cf364f50baa371a6df7bfc20ca719ea8 EBUILD lld-19.0.0.9999.ebuild 2293 BLAKE2B 18ee4d77344d5fd4ad0cab1d0a7d54d02edda3b3969dc9b5fbbb16af1296e4a65be293a0472911598c1cab3e23e45a115495fb1368b3a4db48dc4fdc0c7061e7 SHA512 3ad276dc89c7be26ed0e6c90eb1e8f951b0f6ecf163a6534071f63add887619444fdd8f05135a4e23c195773758320a4aede1683a7d0c4779696b60deef19e40 EBUILD lld-19.0.0_pre20240427.ebuild 2293 BLAKE2B 18ee4d77344d5fd4ad0cab1d0a7d54d02edda3b3969dc9b5fbbb16af1296e4a65be293a0472911598c1cab3e23e45a115495fb1368b3a4db48dc4fdc0c7061e7 SHA512 3ad276dc89c7be26ed0e6c90eb1e8f951b0f6ecf163a6534071f63add887619444fdd8f05135a4e23c195773758320a4aede1683a7d0c4779696b60deef19e40 EBUILD lld-19.0.0_pre20240504.ebuild 2293 BLAKE2B 18ee4d77344d5fd4ad0cab1d0a7d54d02edda3b3969dc9b5fbbb16af1296e4a65be293a0472911598c1cab3e23e45a115495fb1368b3a4db48dc4fdc0c7061e7 SHA512 3ad276dc89c7be26ed0e6c90eb1e8f951b0f6ecf163a6534071f63add887619444fdd8f05135a4e23c195773758320a4aede1683a7d0c4779696b60deef19e40 +EBUILD lld-19.0.0_pre20240509.ebuild 2293 BLAKE2B 18ee4d77344d5fd4ad0cab1d0a7d54d02edda3b3969dc9b5fbbb16af1296e4a65be293a0472911598c1cab3e23e45a115495fb1368b3a4db48dc4fdc0c7061e7 SHA512 3ad276dc89c7be26ed0e6c90eb1e8f951b0f6ecf163a6534071f63add887619444fdd8f05135a4e23c195773758320a4aede1683a7d0c4779696b60deef19e40 MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685 diff --git a/sys-devel/lld/lld-19.0.0_pre20240509.ebuild b/sys-devel/lld/lld-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..5440a5c89919 --- /dev/null +++ b/sys-devel/lld/lld-19.0.0_pre20240509.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..12} ) +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 2fd3592fc2f0..8149e1e003f0 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -10,6 +10,7 @@ DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 +DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 EBUILD llvm-common-15.0.7.ebuild 1014 BLAKE2B da3b7ec6cd3c1e57758312fb9ea25e693305e1ef72b350eea85fbde5a1e636269d84bd491b6f528aee8a9cb8229f6304b371f99e6ac416c661c6519706b83b61 SHA512 68b9d672372fe71e39f2b8f9d80eb1dcb5138b8b9b961f56a4eeb81b3fc4054448a51a46b3a62547ebb6262425512f39bc146e5f2c3703de10ab520f1594e7a4 EBUILD llvm-common-16.0.6.ebuild 1034 BLAKE2B 1e0a0b6cbb746a7eb45e3f553bc949b69314afc3d913cda004d395e7b322c17f976496eed074cf08718dc2d9efa7f3db81dec4f38394fe6ea2b77793b74f4371 SHA512 8fbb211a6b05d24409642fcb00a4fb798499721cc30c4c5fa2df120ed74d9da7286916cf3788ea26f2cb21e334876417b05a4336fedff99e95d1ebe358f8b311 EBUILD llvm-common-17.0.6.ebuild 1034 BLAKE2B 1e0a0b6cbb746a7eb45e3f553bc949b69314afc3d913cda004d395e7b322c17f976496eed074cf08718dc2d9efa7f3db81dec4f38394fe6ea2b77793b74f4371 SHA512 8fbb211a6b05d24409642fcb00a4fb798499721cc30c4c5fa2df120ed74d9da7286916cf3788ea26f2cb21e334876417b05a4336fedff99e95d1ebe358f8b311 @@ -18,4 +19,5 @@ EBUILD llvm-common-18.1.5.ebuild 1041 BLAKE2B 6fd0cd984783dffba5a2d72e77983646fb EBUILD llvm-common-19.0.0.9999.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d EBUILD llvm-common-19.0.0_pre20240427.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d EBUILD llvm-common-19.0.0_pre20240504.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d +EBUILD llvm-common-19.0.0_pre20240509.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_pre20240509.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..2d8f35a84179 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240509.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 f2117d2e9622..63308c375a6d 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -17,6 +17,7 @@ DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 +DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 EBUILD llvm-15.0.7-r3.ebuild 12592 BLAKE2B 81cd473990810203c4e8a47ceb0189ed399c869b85fab3181724dbd1429063cdaad1f6b6cb1ab5b392f531b0b4907cc61f266558b873b236f9a3ff439045aa37 SHA512 2321f9e6da93af22d5f074175a6a92b7dcd271e2b9b92128d268dd777a9c3bdd876010740153734e2593b90d26a58d4f784b2256a6b1e18160d13b3c10441fb3 EBUILD llvm-16.0.6.ebuild 12822 BLAKE2B fe0a8bca0506827f09ea9edc18e8574443af644540cec84126fa3668ca8fa538a103c76315ee7c61b0af67a1391168ae7b04201e7825958a46fe8642a327e93b SHA512 a1a861d11791cb583dc33b9c71a86bd50690ffb8b743a6bccf8b4600976f48e96a2b4171cc9b449c17c8b0516ef440cee89df8cff97a3c691968b3431a149612 EBUILD llvm-17.0.6.ebuild 13293 BLAKE2B 50e4212c63f1561f4fc8397a831f83bd3ea370349fa3b6239dfe2f9212757f6e8d5bb1921b8714680fe94d0f02ca523d289447b1396124aa94f91b539aabb17a SHA512 5b2b1d2293cf00d0c547a06111a0af706b2cad1f7cb5f2cc421f54a129c165560adbba4342d9bea486d5b2474a1eed066f1ae955a89133cd94b61a62313980bb @@ -25,4 +26,5 @@ EBUILD llvm-18.1.5.ebuild 13353 BLAKE2B 876a80da23376e127e1196a427a50771f5410e69 EBUILD llvm-19.0.0.9999.ebuild 13238 BLAKE2B cd2c461147c5f02904c3fb693d4a47367dc986bb9a6f127761f7dc4cc1a32b2a95da8fedea345dec7ab8afabe5dac94dd0eecd84a963dbbdf3ef12fc4eaa8e8c SHA512 a800a86ea3636eb3dd971d4782e93a0d98c6928a5bb9603d7b9ad95ce675cd1fbe0e5b4f9aa2a6c961b8d172003320f38fd980ca032219e9e6a0cf142c459ec4 EBUILD llvm-19.0.0_pre20240427.ebuild 13238 BLAKE2B cd2c461147c5f02904c3fb693d4a47367dc986bb9a6f127761f7dc4cc1a32b2a95da8fedea345dec7ab8afabe5dac94dd0eecd84a963dbbdf3ef12fc4eaa8e8c SHA512 a800a86ea3636eb3dd971d4782e93a0d98c6928a5bb9603d7b9ad95ce675cd1fbe0e5b4f9aa2a6c961b8d172003320f38fd980ca032219e9e6a0cf142c459ec4 EBUILD llvm-19.0.0_pre20240504.ebuild 13238 BLAKE2B cd2c461147c5f02904c3fb693d4a47367dc986bb9a6f127761f7dc4cc1a32b2a95da8fedea345dec7ab8afabe5dac94dd0eecd84a963dbbdf3ef12fc4eaa8e8c SHA512 a800a86ea3636eb3dd971d4782e93a0d98c6928a5bb9603d7b9ad95ce675cd1fbe0e5b4f9aa2a6c961b8d172003320f38fd980ca032219e9e6a0cf142c459ec4 +EBUILD llvm-19.0.0_pre20240509.ebuild 13238 BLAKE2B cd2c461147c5f02904c3fb693d4a47367dc986bb9a6f127761f7dc4cc1a32b2a95da8fedea345dec7ab8afabe5dac94dd0eecd84a963dbbdf3ef12fc4eaa8e8c SHA512 a800a86ea3636eb3dd971d4782e93a0d98c6928a5bb9603d7b9ad95ce675cd1fbe0e5b4f9aa2a6c961b8d172003320f38fd980ca032219e9e6a0cf142c459ec4 MISC metadata.xml 2835 BLAKE2B 07816d714509d62c0e0a443cc4af1f1f049497de75431f80a981f662b4f2281a16655be3e733a26099d0d814d5ce26d80cee13aa7a4e8d079168846a8e02670f SHA512 292ccb0a05a0239b5b00c6a84be11b4b385900d6467a6a139af03588c61aff9ac0e4bbcd23e89b2a7d7947f7d8cf8ba9323f2539a6c563a338b73f5ac6ffd00f diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240509.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240509.ebuild new file mode 100644 index 000000000000..8624219a7e20 --- /dev/null +++ b/sys-devel/llvm/llvm-19.0.0_pre20240509.ebuild @@ -0,0 +1,547 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE=" + +binutils-plugin +debug debuginfod doc exegesis libedit +libffi + ncurses 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}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3: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 + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build cmake_build distribution + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} -- cgit v1.2.3