diff options
Diffstat (limited to 'sys-devel')
219 files changed, 2709 insertions, 19980 deletions
diff --git a/sys-devel/autogen/autogen-5.18.16-r101.ebuild b/sys-devel/autogen/autogen-5.18.16-r101.ebuild index 3b0f0528e7c4..f1e80ec472f6 100644 --- a/sys-devel/autogen/autogen-5.18.16-r101.ebuild +++ b/sys-devel/autogen/autogen-5.18.16-r101.ebuild @@ -16,7 +16,7 @@ SRC_URI=" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="libopts static-libs" REQUIRED_USE="${GUILE_REQUIRED_USE}" diff --git a/sys-devel/autogen/autogen-5.18.16-r3.ebuild b/sys-devel/autogen/autogen-5.18.16-r3.ebuild deleted file mode 100644 index ecb7672f0777..000000000000 --- a/sys-devel/autogen/autogen-5.18.16-r3.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic autotools toolchain-funcs - -DESCRIPTION="Program and text file generation" -HOMEPAGE="https://www.gnu.org/software/autogen/" -SRC_URI=" - mirror://gnu/${PN}/rel${PV}/${P}.tar.xz - https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="libopts static-libs" - -RDEPEND=" - >=dev-scheme/guile-2.0:= - dev-libs/libxml2 -" -DEPEND="${RDEPEND}" -# TODO: investigate & drop this! -BDEPEND="sys-apps/which" - -# We don't pass the flag explicitly, bug #796776. -# Let's fix it upstream after next autogen release if it happens. -QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" - -QA_CONFIG_IMPL_DECL_SKIP+=( - # libgen.h is legacy and linux doesn't include -lgen nor nonstandard - # functions. bug #924961 - pathfind -) - -PATCHES=( - "${FILESDIR}"/${PN}-5.18.16-no-werror.patch - "${FILESDIR}"/${PN}-5.18.16-rpath.patch - "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch - "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch - "${FILESDIR}"/${PN}-5.18.16-guile-3.patch - "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch - "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch -) - -src_prepare() { - default - - # missing tarball file - cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die - - # May be able to drop this on next release (>5.18.16) - eautoreconf -} - -src_configure() { - # suppress possibly incorrect -R flag - export ag_cv_test_ldflags= - - # autogen requires run-time sanity of regex and string functions. - # Use defaults of linux-glibc until we need somethig more advanced. - if tc-is-cross-compiler ; then - export ag_cv_run_strcspn=no - export libopts_cv_with_libregex=yes - fi - - # bug 920174 - use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE - - econf $(use_enable static-libs static) -} - -src_install() { - default - - find "${ED}" -name '*.la' -delete || die - - if ! use libopts ; then - rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die - fi -} diff --git a/sys-devel/autogen/autogen-5.18.16-r4.ebuild b/sys-devel/autogen/autogen-5.18.16-r4.ebuild deleted file mode 100644 index 6cf60c1863b1..000000000000 --- a/sys-devel/autogen/autogen-5.18.16-r4.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic autotools toolchain-funcs - -DESCRIPTION="Program and text file generation" -HOMEPAGE="https://www.gnu.org/software/autogen/" -SRC_URI=" - mirror://gnu/${PN}/rel${PV}/${P}.tar.xz - https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="libopts static-libs" - -RDEPEND=" - >=dev-scheme/guile-2.0:= - dev-libs/libxml2 -" -DEPEND="${RDEPEND}" - -# We don't pass the flag explicitly, bug #796776. -# Let's fix it upstream after next autogen release if it happens. -QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" - -QA_CONFIG_IMPL_DECL_SKIP+=( - # libgen.h is legacy and linux doesn't include -lgen nor nonstandard - # functions. bug #924961 - pathfind -) - -PATCHES=( - "${FILESDIR}"/${PN}-5.18.16-no-werror.patch - "${FILESDIR}"/${PN}-5.18.16-rpath.patch - "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch - "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch - "${FILESDIR}"/${PN}-5.18.16-guile-3.patch - "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch - "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch - "${FILESDIR}"/${PN}-5.18.16-no-which.patch -) - -src_prepare() { - default - - # missing tarball file - cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die - - # May be able to drop this on next release (>5.18.16) - eautoreconf -} - -src_configure() { - # suppress possibly incorrect -R flag - export ag_cv_test_ldflags= - - # autogen requires run-time sanity of regex and string functions. - # Use defaults of linux-glibc until we need somethig more advanced. - if tc-is-cross-compiler ; then - export ag_cv_run_strcspn=no - export libopts_cv_with_libregex=yes - fi - - # bug 920174 - use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE - - econf $(use_enable static-libs static) -} - -src_install() { - default - - find "${ED}" -name '*.la' -delete || die - - if ! use libopts ; then - rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die - fi -} diff --git a/sys-devel/bin86/bin86-0.16.21-r1.ebuild b/sys-devel/bin86/bin86-0.16.21-r1.ebuild deleted file mode 100644 index cdbd313b3371..000000000000 --- a/sys-devel/bin86/bin86-0.16.21-r1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -inherit toolchain-funcs - -DESCRIPTION="Assembler and loader used to create kernel bootsector" -HOMEPAGE="http://v3.sk/~lkundrak/dev86/" -SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" - -PATCHES="${FILESDIR}"/${PN}-0.16.21-amd64-build.patch - -src_prepare() { - use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__" - sed -i \ - -e '/^PREFIX/s|=.*|=$(DESTDIR)/usr|' \ - -e '/^MANDIR/s|)/man/man1|)/share/man/man1|' \ - -e '/^INSTALL_OPTS/s|-s||' \ - -e "/^CFLAGS/s|=.*|=${CFLAGS} -D_POSIX_SOURCE ${CPPFLAGS}|" \ - -e "/^LDFLAGS/s|=.*|=${LDFLAGS}|" \ - Makefile || die - tc-export CC - default -} - -src_install() { - dodir /usr/bin /usr/share/man/man1 - default -} diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest index 22c77453207c..9909b1d3989b 100644 --- a/sys-devel/binutils-apple/Manifest +++ b/sys-devel/binutils-apple/Manifest @@ -1,13 +1,6 @@ DIST binutils-apple-patches-3.2.6-r0.tar.bz2 3500 BLAKE2B f10dcf71400ea5d4bf7efb8ad906240765cfb56743274b3e1684eeb4273a35171aa4202d475920cff2c5c39e89f9bd1d7e5b0d38ba6c2b4705b0a592ba47e063 SHA512 4ccb8ebd49ac8eac4dbd0c1f24ee1836f216efd2e9e15b13072cbc76d8f83fbf4f1f6b3b60736bf5d5482af3e49ec1eaedfce8dd0ce1e949f915faf9c92ee0ea -DIST binutils-apple-patches-4.3-r1.tar.bz2 37363 BLAKE2B a5ad04d4bf746a864f03a25d052197ed9a6ecada1f34460f4e38bea8cd87dfe2cb6c7f99f2096acac2231cd1e0c13c53757854b07f729a7a0c5a162a908fbe83 SHA512 f5d64ad182891c3af971e6aabd3c0c1b717b6a1cb471632339cba61b41a998d15880d18de09aafa1c3d059e528c888d6e8b914025c79bc21897d90a6d0e2ebf5 -DIST binutils-apple-patches-5.1-r2.tar.bz2 51642 BLAKE2B 1b44020a05e0a91cfe569273f1e3dc65afaeac4bcdb80a626bdcc1f30cf8fbba6cc7bb522ece93126d4035b2d309defefd17fe0cee5bcaadcc58c4fa0feb4827 SHA512 37ba0dcae6c10b54a07c6208f6893ab80b0de1bd1c2f677902f707c8290629f7671a481e256b57a18bf304b95e41e4d59519bc1c88f15de488c0ef7e142f5cd8 -DIST binutils-apple-patches-7.3-r2.tar.bz2 44551 BLAKE2B 036cd2a2e4a66b046467f2984cce1c15f0d07c6b66aa6c8df3e07360943104aabe6f2555a0094973df71a5844496cb69d97a0ff13366043e02a01d8fbb0b0239 SHA512 219c26aeb54e89e23ab91706dda0803cf0c9f2a33acb5cc676db2d2ea33ad22af0661ea19450ad8f1f006f6c1703269fd95c98c52a7bcfa0c6491bc1cfb1a0ba -DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3fdc0685fc46f82366df0b6153c1a59fbe5c122622e799754397e980e8752ef01ef25bbac81bb8f0339e92168790211b1d9c03bef2d SHA512 e7ca8cbac75671846c044abcd5415cfcf5832ff71acd5a2799b643369b02f2f7148990398c51913a3758e589f9fbff875e333aadf568e2a8a2defeafaa2aca95 DIST cctools-795.tar.gz 1993795 BLAKE2B dc0915f8647eecba5352e34dfc5752b679df39ead9a4734c49955a824d2cc127308eed46a614665dfe08a9d3036eb37f587e1b765a7df727facc42a33befacb0 SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254 -DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126 DIST darwin-xtools-8.2.1-r103.tar.gz 3106189 BLAKE2B f13e77f796eefc393389206d5663c98d55c3fe0eb5123b366155e7c993cea421a039121d705cab2aa5fcdab2ef08d2b17dd5b9d6e0b2c50c97db067b0ec10283 SHA512 241f402ac368606eb9b89421a3e0a2ebbde1ea79d6e84cc55680a7f3dbc31dfa402ee7b20f605627c1bfd9097bbe824dea466339a7ff9026810911ef70940bda DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f -DIST dyld-421.2.tar.gz 625173 BLAKE2B 8f8325314861ae2ea10fbe78c74c7199b547973ac61a8e9cb76fb874a0e53395ea31c04e489f85ac7cfdb5715ae5051679453de75eb195e313113e7bbbc70340 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8 -DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d DIST ld64-97.17.tar.gz 421947 BLAKE2B 56820ef28490f2e0181d6e36b87506c6f00ae5759afe304a063fb6bd1904ace566ef4aa69ff0d235d65968af547a1a5735cb23bcefa990f418740188d399b637 SHA512 841774a1a7c0e2f661ac7e66703f7578d8f11274897ffa15f8c49daf290a23465763f264a4dae99f15754891f44c425c0d327652112007b499bc8f755a7fc9d6 DIST libunwind-30.tar.gz 82811 BLAKE2B 26993d6afa6930931c01b579326964a66832ed7a6ffa26eff10016c8d6d175d3b671753cf8700dcdbae7f0a9c01b16e9cbd3c9fe86697608f1f08a8eceb64782 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild index 9c2ab92a0fe8..3672ba2ce7bf 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Gentoo Authors +# Copyright 2020-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -17,7 +17,7 @@ KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos" # xtools uses c++11 features, not available in gcc-apple, hence gcc/clang dep DEPEND="sys-devel/binutils-config - || ( sys-devel/gcc:* sys-devel/clang:* ) + || ( sys-devel/gcc:* llvm-core/clang:* ) app-arch/xar dev-libs/libyaml" RDEPEND="${DEPEND}" diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild deleted file mode 100644 index b1c82e7522e4..000000000000 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit flag-o-matic llvm prefix - -# versions: -# XCode-11.3.1 ld64-530 cctools-949.0.1 -# XCode-11.2.1 ld64-520 cctools-949.0.1 -# XCode-11.0 ld64-512.4 cctools-949.0.1 -# XCode-8.2.1 ld64-274.2 cctools-895 <== binutils-apple-8.2.1-r1 (2019) - -# macOS-10.15.6 dyld-750.6 Causes build failures with Xcode-11 tools -# macOS-10.14.4-10.14.6 dyld-655.1.1 Causes build failures with Xcode-11 tools -# macOS-10.13.6 dyld-551.4 -# macOS-10.12.1-10.12.3 dyld-421.2 <== binutils-apple-8.2.1-r1,8.1 - -LD64=ld64-274.2 -CCTOOLS_VERSION=895 -CCTOOLS=cctools-${CCTOOLS_VERSION} -DYLD=dyld-421.2 - -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" -HOMEPAGE="http://www.opensource.apple.com/" -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r1.tar.bz2" - -LICENSE="APSL-2" -KEYWORDS="~x64-macos" -IUSE="lto classic test" -RESTRICT="!test? ( test )" - -# ld64 can now only be compiled using llvm and libc++ since it massively uses -# C++11 language features. *But additionally* the as driver now defaults to -# calling clang as the assembler on many platforms. This can be disabled using -# -Wa,-Q but since it's default we make llvm a static runtime dependency. -RDEPEND="sys-devel/binutils-config - lto? ( app-arch/xar ) - sys-devel/llvm:* - sys-libs/libcxx" -DEPEND="${RDEPEND} - test? ( >=dev-lang/perl-5.8.8 )" - -SLOT="8" - -S=${WORKDIR} - -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -llvm_pkg_setup() { - # eclass version will die if no LLVM can be found which will break prefix - # bootstrap - : -} - -src_prepare() { - cd "${S}"/${LD64}/src - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h - cp "${S}"/ld64-274.2-Makefile Makefile - - eapply -p2 "${S}"/ld64-274.1-nolto.patch - eapply -p2 "${S}"/ld64-236.3-crashreporter.patch - eapply -p2 "${S}"/ld64-264.3.102-bitcode-case.patch - eapply -p2 "${S}"/ld64-274.1-unknown-fixup.patch - eapply -p2 "${S}"/ld64-274.1-notapi.patch - eapply -p2 "${S}"/ld64-274.2-cfi-info-type.patch - - # workound llvm-3.9.{0,1} issue - # https://bugs.gentoo.org/show_bug.cgi?id=603580 - # https://groups.google.com/forum/#!topic/llvm-dev/JY6nuKE__sU - # http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160829/169553.html - sed -i -e '/COMPILE_TIME_ASSERT/d' ld/parsers/libunwind/*.hpp || die - - # provide missing headers from libunwind and dyld - mkdir -p include/{mach,mach-o/arm} || die - # never present because it's private - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die - # use copies from cctools because they're otherwise hidden in some SDK - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die - # provide all required CPU_TYPEs on all platforms - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h - # add alias for newer identifiers, because ld64 uses both but cctools - # header only defines the older - eapply -p2 "${S}"/ld64-236.3-missing-cputypes.patch - - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" - echo "char ldVersionString[] = ${VER_STR};" > version.cpp - - eapply -p0 "${S}"/ld64-123.2-debug-backtrace.patch - - cd "${S}"/${CCTOOLS} - eapply -p1 "${S}"/${PN}-4.5-as.patch - eapply -p1 "${S}"/${PN}-5.1-as-dir.patch - eapply -p2 "${S}"/${PN}-5.1-ranlib.patch - eapply -p1 "${S}"/${PN}-3.1.1-libtool-ranlib.patch - eapply -p1 "${S}"/${PN}-3.1.1-no-headers.patch - eapply -p0 "${S}"/${PN}-4.0-no-oss-dir.patch - eapply -p1 "${S}"/cctools-839-intel-retf.patch - eapply -p2 "${S}"/${PN}-5.1-extraneous-includes.patch - eapply -p1 "${S}"/${PN}-5.1-strnlen.patch - eapply -p1 "${S}"/${PN}-7.3-make-j.patch - eapply -p1 "${S}"/${PN}-7.3-no-developertools-dir.patch - eapply -p1 "${S}"/${PN}-8.2.1-llvm-prefix-3.patch - eapply -p1 "${S}"/${PN}-8.2.1-llvm-shim.patch - eprefixify libstuff/execute.c - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die - - # do not build profileable libstuff to save compile time - sed -i -e "/^all:/s, profile , ," libstuff/Makefile - - # cctools version is provided to make via RC_ProjectSourceVersion which - # generates and compiles it as apple_version[] into libstuff. From - # there it's picked up by the individual tools. Since - # RC_ProjectSourceVersion is also used as library version, we can't - # just append our local version info. So we hack the libstuff Makefile - # to include our Gentoo version. - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ - libstuff/Makefile - - eapply_user - - # clean up test suite - cd "${S}"/${LD64}/unit-tests/test-cases - local c - - # we don't have llvm - ((++c)); rm -rf llvm-integration; - - # we don't have dtrace - ((++c)); rm -rf dtrace-static-probes-coalescing; - ((++c)); rm -rf dtrace-static-probes; - - # a file is missing - ((++c)); rm -rf eh-coalescing-r - - # we don't do universal binaries - ((++c)); rm -rf blank-stubs; - - # looks like a problem with apple's result-filter.pl - ((++c)); rm -rf implicit-common3; - ((++c)); rm -rf order_file-ans; - - # TODO no idea what goes wrong here - ((++c)); rm -rf dwarf-debug-notes; - - einfo "Deleted $c tests that were bound to fail" - - cd "${S}" - ebegin "cleaning Makefiles from unwanted CFLAGS" - find . -name "Makefile" -print0 | xargs -0 sed \ - -i \ - -e 's/ -g / /g' \ - -e 's/^G =.*$/G =/' \ - -e 's/^OFLAG =.*$/OFLAG =/' \ - -e 's/install -c -s/install/g' - eend $? -} - -src_configure() { - ENABLE_LTO=0 - if use lto ; then - ENABLE_LTO=1 - - LLVM_INCDIR=$(get_llvm_prefix)/include - LLVM_LIBDIR=$(get_llvm_prefix)/lib - - [ -n "${LLVM_INCDIR}" -a -n "${LLVM_LIBDIR}" ] || \ - die "LLVM not found - LTO support can not be enabled" - - # LTO and LLVM support currently both depend only on libLTO being - # present. So we can enable both. - CCTOOLS_LTO_CFLAGS="-DLTO_SUPPORT -I${LLVM_INCDIR}" - CCTOOLS_LLVM_CFLAGS="-DLLVM_SUPPORT -I${LLVM_INCDIR}" - fi - - export CTARGET=${CTARGET:-${CHOST}} - if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi - fi - - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} - if is_cross ; then - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} - else - BINPATH=/usr/${CTARGET}/binutils-bin/${PV} - fi - - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is - # what we want) - append-cppflags -DNDEBUG - - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it. - DERIVED_FILE_DIR=${LD64}/src \ - ${LD64}/src/create_configure -} - -compile_ld64() { - einfo "building ${LD64}" - cd "${S}"/${LD64}/src - emake \ - LTO=${ENABLE_LTO} \ - LTO_INCDIR=${LLVM_INCDIR} \ - LTO_LIBDIR=${LLVM_LIBDIR} \ - TAPI=0 \ - TAPI_LIBDIR="${EPREFIX}"/usr/lib - - use test && emake build_test -} - -compile_cctools() { - einfo "building ${CCTOOLS}" - cd "${S}"/${CCTOOLS} - # Suppress running dsymutil because it will warn about missing debug - # info which is expected when compiling without -g as we normally do. - # This might need some more thought if anyone ever wanted to build us - # for debugging with Apple's tools. - emake \ - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ - EFITOOLS= \ - LTO="${CCTOOLS_LTO_CFLAGS} ${CCTOOLS_LLVM_CFLAGS}" \ - COMMON_SUBDIRS='libstuff ar misc otool' \ - SUBDIRS_32= \ - LEGACY= \ - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ - RC_CFLAGS="${CFLAGS}" \ - OFLAG="${CCTOOLS_OFLAG}" \ - DSYMUTIL=": disabled: dsymutil" - - cd "${S}"/${CCTOOLS}/as - emake \ - BUILD_OBSOLETE_ARCH= \ - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ - OFLAG="${CCTOOLS_OFLAG}" \ - DSYMUTIL=": disabled: dsymutil" -} - -src_compile() { - compile_ld64 - compile_cctools -} - -install_ld64() { - exeinto ${BINPATH} - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} - dosym ld64 ${BINPATH}/ld - insinto ${DATAPATH}/man/man1 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 -} - -install_cctools() { - cd "${S}"/${CCTOOLS} - emake install_all_but_headers \ - EFITOOLS= \ - COMMON_SUBDIRS='ar misc otool' \ - SUBDIRS_32= \ - DSTROOT="\"${D}\"" \ - BINDIR="\"${EPREFIX}\"${BINPATH}" \ - LOCBINDIR="\"${EPREFIX}\"${BINPATH}" \ - USRBINDIR="\"${EPREFIX}\"${BINPATH}" \ - LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}" \ - MANDIR="\"${EPREFIX}\"${DATAPATH}/man/" - cd "${S}"/${CCTOOLS}/as - emake install \ - BUILD_OBSOLETE_ARCH= \ - DSTROOT="\"${D}\"" \ - USRBINDIR="\"${EPREFIX}\"${BINPATH}" \ - LIBDIR="\"${EPREFIX}\"${LIBPATH}" \ - LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}" - - # upstream is starting to replace classic binutils with llvm-integrated - # ones. In Xcode, nm and size are now symlinks to llvm-{nm,size} while the - # classic version is preserved as {nm,size}-classic. When asked to do so - # by use classic we statically link to the classic version. - # binutils-bin/<version>/<tool> - # -> binutils-bin/<version>/<tool>-classic - # - # Otherwise we try to find and use the llvm version of the tool. Since our - # binutils do not live in the same directory as the llvm installation and - # llvm tends to move around, we use a shim that tries to find the llvm - # version of the tool in prefix. It will fall back to the classic tool if - # it fails. - # binutils-bin/<version>/<tool> - # -> binutils-bin/<version>/llvm-<tool> - # -> $EPREFIX/usr/lib/llvm/<major/bin/llvm-<tool> - # -> $EPREFIX/usr/bin/llvm-<tool> - # -> binutils-bin/<version>/<tool>-classic - budir="${D}"/${EPREFIX}/${BINPATH} - for tool in nm size ; do - use classic && \ - ln -sfn ${tool}-classic "${budir}/${tool}" || \ - ln -sfn llvm-shim "${budir}/${tool}" - done - - # Also, otool is now based on llvm-objdump. But a small wrapper installed - # as llvm-otool remains, providing command line compatibility. - use classic && \ - ln -sfn otool-classic "${budir}/otool" || \ - ln -sfn llvm-otool "${budir}/otool" - - # And finally, although our cctools don't actually contain dsymutil and - # objdump, we provide access to the llvm versions of them via the shim to - # be in line with Xcode. - for tool in objdump dsymutil ; do - ln -sfn llvm-shim "${budir}/${tool}" - done - - cd "${ED}"/${BINPATH} - insinto ${DATAPATH}/man/man1 - local skips manpage - # ar brings an up-to-date manpage with it - skips=( ar ) - for bin in *; do - for skip in ${skips[@]}; do - if [[ ${bin} == ${skip} ]]; then - continue 2; - fi - done - manpage=${S}/${CCTOOLS}/man/${bin}.1 - if [[ -f "${manpage}" ]]; then - doins "${manpage}" - fi - done - insinto ${DATAPATH}/man/man5 - doins "${S}"/${CCTOOLS}/man/*.5 -} - -src_test() { - if ! [[ -x "${EPREFIX}"/usr/bin/clang ]] ; then - einfo "Test suite only works properly with clang - please install" - return - fi - - einfo "Running unit tests" - cd "${S}"/${LD64}/unit-tests/test-cases - # provide the new ld as a symlink to clang so that -ccc-install-dir - # will pick it up - ln -sfn ../../src/ld64 ld - # use our arch command because the System's will report i386 even for an - # x86_64 prefix - perl ../bin/make-recursive.pl \ - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ - ARCH="$(arch)" \ - LD="${S}"/${LD64}/src/ld64 \ - CC="${CC} -ccc-install-dir $PWD" \ - CXX="${CXX} -ccc-install-dir $PWD" \ - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ - | perl ../bin/result-filter.pl -} - -src_install() { - install_ld64 - install_cctools - - docompress /usr/share/binutils-data/${CTARGET}/${PV}/man - - cd "${S}" - insinto /etc/env.d/binutils - cat <<-EOF > env.d - TARGET="${CHOST}" - VER="${PV}" - FAKE_TARGETS="${CHOST}" - EOF - newins env.d ${CHOST}-${PV} -} - -pkg_postinst() { - binutils-config ${CHOST}-${PV} -} diff --git a/sys-devel/binutils-config/binutils-config-5.5.2.ebuild b/sys-devel/binutils-config/binutils-config-5.5.2.ebuild index 5eac04325a1d..8823ea2268b9 100644 --- a/sys-devel/binutils-config/binutils-config-5.5.2.ebuild +++ b/sys-devel/binutils-config/binutils-config-5.5.2.ebuild @@ -8,7 +8,7 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 else SRC_URI="https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="Utility to change the binutils version being used" diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest index 2564051b856e..29777418ad0b 100644 --- a/sys-devel/binutils-hppa64/Manifest +++ b/sys-devel/binutils-hppa64/Manifest @@ -8,9 +8,8 @@ DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd24 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 -DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 -DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734 DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4 +DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild index 8e8b0a0d9ddc..73dc3ceeedb0 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild @@ -34,7 +34,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="-* ~hppa" + KEYWORDS="-* hppa" fi # diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild index fa9d8b2f4555..fa9d8b2f4555 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild deleted file mode 100644 index 5207151d0d71..000000000000 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild +++ /dev/null @@ -1,534 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -export CTARGET=hppa64-${CHOST#*-} - -inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" - -LICENSE="GPL-3+" -IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" - -# Variables that can be set here (ignored for live ebuilds) -# PATCH_VER - the patchset version -# Default: empty, no patching -# PATCH_BINUTILS_VER - the binutils version in the patchset name -# - Default: PV -# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... -# for the patchsets - -PATCH_VER=1 -PATCH_DEV=dilfridge - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 - SLOT=${PV} -else - PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} - PATCH_DEV=${PATCH_DEV:-dilfridge} - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" - [[ -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="-* ~hppa" -fi - -# -# The cross-compile logic -# -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -# -# The dependencies -# -RDEPEND=" - >=sys-devel/binutils-config-3 - sys-libs/zlib - debuginfod? ( - dev-libs/elfutils[debuginfod(-)] - ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - doc? ( sys-apps/texinfo ) - test? ( - dev-util/dejagnu - app-alternatives/bc - ) - nls? ( sys-devel/gettext ) - zstd? ( virtual/pkgconfig ) - app-alternatives/lex - app-alternatives/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR="${WORKDIR}"/build -S="${WORKDIR}"/${P/-hppa64/} - -src_unpack() { - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patch || die - - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P/-hppa64/}.tar.xz - - cd "${WORKDIR}" || die - unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz - - # _p patch versions are Gentoo specific tarballs ... - local dir=${P%_p?} - dir=${dir/-hppa64/} - - S=${WORKDIR}/${dir} - fi - - cd "${WORKDIR}" || die - mkdir -p "${MY_BUILDDIR}" || die -} - -src_prepare() { - local patchsetname - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" - fi - - if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then - if ! use vanilla; then - einfo "Applying binutils patchset ${patchsetname}" - eapply "${WORKDIR}/patch" - einfo "Done." - - # This is applied conditionally for now just out of caution. - # It should be okay on non-prefix systems though. See bug #892549. - if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then - eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.41-linker-prefix.patch - fi - fi - fi - - # Make sure our explicit libdir paths don't get clobbered, bug #562460 - sed -i \ - -e 's:@bfdlibdir@:@libdir@:g' \ - -e 's:@bfdincludedir@:@includedir@:g' \ - {bfd,opcodes}/Makefile.in || die - - # Apply things from PATCHES and user dirs - default - - # Run misc portage update scripts - gnuconfig_update - elibtoolize --portage --no-uclibc -} - -toolchain-binutils_bugurl() { - printf "https://bugs.gentoo.org/" -} -toolchain-binutils_pkgversion() { - printf "Gentoo ${PV}" - [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" -} - -src_configure() { - # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html - # Avoid really confusing logs from subconfigure spam, makes logs far - # more legible. - MAKEOPTS="--output-sync=line ${MAKEOPTS}" - - # Setup some paths - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} - INCPATH=${LIBPATH}/include - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} - if is_cross ; then - TOOLPATH=/usr/${CHOST}/${CTARGET} - else - TOOLPATH=/usr/${CTARGET} - fi - BINPATH=${TOOLPATH}/binutils-bin/${PV} - - # Make sure we filter $LINGUAS so that only ones that - # actually work make it through, bug #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - use cet && filter-flags -mindirect-branch -mindirect-branch=* - use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - local x - echo - for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do - einfo "$(printf '%10s' ${x}:) ${!x}" - done - echo - - cd "${MY_BUILDDIR}" || die - local myconf=() - - if use plugins ; then - myconf+=( --enable-plugins ) - fi - # enable gold (installed as ld.gold) and ld's plugin architecture - if use gold ; then - myconf+=( --enable-gold ) - fi - - if use nls ; then - myconf+=( --without-included-gettext ) - else - myconf+=( --disable-nls ) - fi - - myconf+=( --with-system-zlib ) - - # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch - # logic in toolchain.eclass. bug #446946 - # - # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 - case $(tc-arch) in - ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; - esac - - use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) - - [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) - - is_cross && myconf+=( - --with-sysroot="${EPREFIX}"/usr/${CTARGET} - --enable-poison-system-directories - ) - - myconf+=( --enable-secureplt ) - - # mips can't do hash-style=gnu ... - if [[ $(tc-arch) != mips ]] ; then - myconf+=( --enable-default-hash-style=gnu ) - fi - - myconf+=( - --prefix="${EPREFIX}"/usr - --host=${CHOST} - --target=${CTARGET} - --datadir="${EPREFIX}"${DATAPATH} - --datarootdir="${EPREFIX}"${DATAPATH} - --infodir="${EPREFIX}"${DATAPATH}/info - --mandir="${EPREFIX}"${DATAPATH}/man - --bindir="${EPREFIX}"${BINPATH} - --libdir="${EPREFIX}"${LIBPATH} - --libexecdir="${EPREFIX}"${LIBPATH} - --includedir="${EPREFIX}"${INCPATH} - # portage's econf() does not detect presence of --d-d-t - # because it greps only top-level ./configure. But not - # libiberty's or bfd's configure. - --disable-dependency-tracking - --disable-silent-rules - --enable-obsolete - --enable-shared - --enable-threads - --enable-relro - --enable-install-libiberty - --enable-textrel-check=$(usex hardened error warning) - # Things to think about - #--enable-deterministic-archives - --enable-new-dtags - --disable-jansson - --disable-werror - --with-bugurl="$(toolchain-binutils_bugurl)" - --with-pkgversion="$(toolchain-binutils_pkgversion)" - $(use_enable static-libs static) - $(use_with zstd) - - # Disable modules that are in a combined binutils/gdb tree, bug #490566 - --disable-{gdb,libdecnumber,readline,sim} - # Strip out broken static link flags: https://gcc.gnu.org/PR56750 - --without-stage1-ldflags - # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 - --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) - - $(use_with debuginfod) - - # Avoid automagic dev-libs/msgpack dep, bug #865875 - --without-msgpack - - # Allow user to opt into CET for host libraries. - # Ideally we would like automagic-or-disabled here. - # But the check does not quite work on i686: bug #760926. - $(use_enable cet) - - # We can enable this by default in future, but it's brand new - # in 2.39 with several bugs: - # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) - # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) - # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) - # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) - $(use_enable gprofng) - ) - - case ${CTARGET} in - x86_64-*|aarch64*|arm64*|i[3456]*) - # These hardening options are available from 2.39+ but - # they unconditionally enable the behaviour even on arches - # where e.g. execstacks can't be avoided. - # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. - # - # TODO: Get the logic for this fixed upstream so it doesn't - # create impossible broken combinations on some arches, like mips. - # - # TODO: Get the logic for this fixed upstream so --disable-* works - # as expected. - myconf+=( - --enable-warn-execstack=yes - --enable-warn-rwx-segments=yes - ) - - if use hardened ; then - myconf+=( - # TOOD: breaks glibc test suite - #--enable-error-execstack=yes - #--enable-error-rwx-segments=yes - --enable-default-execstack=no - ) - fi - ;; - *) - ;; - esac - - if use elibc_musl ; then - # Override our earlier setting for musl, as textrels don't - # work there at all. See bug #707660. - myconf+=( - --enable-textrel-check=error - ) - fi - - if ! is_cross ; then - # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support. - myconf+=( $(use_enable pgo pgo-build) ) - - if use pgo ; then - export BUILD_CFLAGS="${CFLAGS}" - fi - fi - - ECONF_SOURCE="${S}" econf "${myconf[@]}" - - # Prevent makeinfo from running if doc is unset. - if ! use doc ; then - sed -i \ - -e '/^MAKEINFO/s:=.*:= true:' \ - Makefile || die - fi -} - -src_compile() { - cd "${MY_BUILDDIR}" || die - - # see Note [tooldir hack for ldscripts] - # see linker prefix patch - emake \ - tooldir="${EPREFIX}${TOOLPATH}" \ - gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ - all - - # only build info pages if the user wants them - if use doc ; then - emake info - fi - - # we nuke the manpages when we're left with junk - # (like when we bootstrap, no perl -> no manpages) - find . -name '*.1' -a -size 0 -delete -} - -src_test() { - cd "${MY_BUILDDIR}" || die - - # bug #637066 - filter-flags -Wall -Wreturn-type - - emake -k check -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" || die - - # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install - rm -rf "${ED}"/${LIBPATH}/bin || die - use static-libs || find "${ED}" -name '*.la' -delete - - # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 - cd "${ED}"/${LIBPATH} || die - for d in ../* ; do - [[ ${d} == ../${PV} ]] && continue - mv ${d}/* . || die - rmdir ${d} || die - done - - # Now we collect everything intp the proper SLOT-ed dirs - # When something is built to cross-compile, it installs into - # /usr/$CHOST/ by default ... we have to 'fix' that :) - if is_cross ; then - cd "${ED}"/${BINPATH} || die - for x in * ; do - mv ${x} ${x/${CTARGET}-} || die - done - - if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then - # No die for now, dies on hppa? - mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} - mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/usr/${CHOST}/{include,lib} - fi - fi - - insinto ${INCPATH} - local libiberty_headers=( - # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. - demangle.h - dyn-string.h - fibheap.h - hashtab.h - libiberty.h - objalloc.h - splay-tree.h - ) - doins "${libiberty_headers[@]/#/${S}/include/}" - if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - # TODO: add || die here, fails on hppa? - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/${LIBPATH}/lib - fi - - # Generate an env.d entry for this binutils - insinto /etc/env.d/binutils - cat <<-EOF > "${T}"/env.d - TARGET="${CTARGET}" - VER="${PV}" - LIBPATH="${EPREFIX}${LIBPATH}" - EOF - newins "${T}"/env.d ${CTARGET}-${PV} - - # Handle documentation - if ! is_cross ; then - cd "${S}" || die - dodoc README - - docinto bfd - dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO - - docinto binutils - dodoc binutils/ChangeLog binutils/NEWS binutils/README - - docinto gas - dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* - - docinto gprof - dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl - - docinto ld - dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO - - docinto libiberty - dodoc libiberty/ChangeLog* libiberty/README - - docinto opcodes - dodoc opcodes/ChangeLog* - fi - - # Remove shared info pages - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} - - docompress "${DATAPATH}"/{info,man} - - # Trim all empty dirs - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null - - # the hppa64 hack; this should go into 9999 as a PN-conditional - # tweak the default fake list a little bit - cd "${D}"/etc/env.d/binutils - sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die -} - -pkg_postinst() { - # Make sure this ${CTARGET} has a binutils version selected - [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 - binutils-config ${CTARGET}-${PV} -} - -pkg_postrm() { - local current_profile=$(binutils-config -c ${CTARGET}) - - # If no other versions exist, then uninstall for this - # target ... otherwise, switch to the newest version - # Note: only do this if this version is unmerged. We - # rerun binutils-config if this is a remerge, as - # we want the mtimes on the symlinks updated (if - # it is the same as the current selected profile) - if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then - local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') - choice=${choice//$'\n'/ } - choice=${choice/* } - if [[ -z ${choice} ]] ; then - binutils-config -u ${CTARGET} - else - binutils-config ${choice} - fi - elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then - binutils-config ${CTARGET}-${PV} - fi -} - -# Note [slotting support] -# ----------------------- -# Gentoo's layout for binutils files is non-standard as Gentoo -# supports slotted installation for binutils. Many tools -# still expect binutils to reside in known locations. -# binutils-config package restores symlinks into known locations, -# like: -# /usr/bin/${CTARGET}-<tool> -# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips -# /usr/include/ -# -# Note [tooldir hack for ldscripts] -# --------------------------------- -# Build system does not allow ./configure to tweak every location -# we need for slotting binutils hence all the shuffling in -# src_install(). This note is about SCRIPTDIR define handling. -# -# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value -# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' -# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. -# Thus we can't just move files around after compilation finished. -# -# Our goal is the following: -# - at build-time set scriptdir to point to symlinked location: -# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) -# - at install-time set scriptdir to point to slotted location: -# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index f7eb20a2c600..b72d306765dc 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -18,9 +18,8 @@ DIST binutils-2.40-patches-7.tar.xz 299188 BLAKE2B 170cd2432e0458889b240c3603461 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 -DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 -DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734 DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4 +DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild b/sys-devel/binutils/binutils-2.32-r2.ebuild index 3b4528435b01..981114f63ae6 100644 --- a/sys-devel/binutils/binutils-2.32-r2.ebuild +++ b/sys-devel/binutils/binutils-2.32-r2.ebuild @@ -151,6 +151,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sys-devel/binutils/binutils-2.33.1-r1.ebuild index 573a527570c2..ef4f96d1c23b 100644 --- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild @@ -144,6 +144,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.34-r2.ebuild index 48ce464c3296..838444a48934 100644 --- a/sys-devel/binutils/binutils-2.34-r2.ebuild +++ b/sys-devel/binutils/binutils-2.34-r2.ebuild @@ -141,6 +141,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild index ffef3022e99f..25e560a72d51 100644 --- a/sys-devel/binutils/binutils-2.35.2.ebuild +++ b/sys-devel/binutils/binutils-2.35.2.ebuild @@ -158,6 +158,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.36.1-r2.ebuild b/sys-devel/binutils/binutils-2.36.1-r2.ebuild index 16544c47a238..f438a8a055f9 100644 --- a/sys-devel/binutils/binutils-2.36.1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild @@ -153,6 +153,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild index 884eaa5ad132..5254d5d12949 100644 --- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild @@ -159,6 +159,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild index 7b86a922666e..d6f4757e7ec5 100644 --- a/sys-devel/binutils/binutils-2.38-r2.ebuild +++ b/sys-devel/binutils/binutils-2.38-r2.ebuild @@ -164,6 +164,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.39-r5.ebuild b/sys-devel/binutils/binutils-2.39-r5.ebuild index 25b4c34511a8..fa391ee75111 100644 --- a/sys-devel/binutils/binutils-2.39-r5.ebuild +++ b/sys-devel/binutils/binutils-2.39-r5.ebuild @@ -160,6 +160,8 @@ src_configure() { # Keep things sane strip-flags + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 diff --git a/sys-devel/binutils/binutils-2.40-r9.ebuild b/sys-devel/binutils/binutils-2.40-r9.ebuild index 3157e859ad3b..97c83d3ad4ec 100644 --- a/sys-devel/binutils/binutils-2.40-r9.ebuild +++ b/sys-devel/binutils/binutils-2.40-r9.ebuild @@ -172,6 +172,8 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.41-r5.ebuild b/sys-devel/binutils/binutils-2.41-r5.ebuild index 93bf607238ea..84e272108b8b 100644 --- a/sys-devel/binutils/binutils-2.41-r5.ebuild +++ b/sys-devel/binutils/binutils-2.41-r5.ebuild @@ -173,6 +173,8 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.42-r1.ebuild b/sys-devel/binutils/binutils-2.42-r1.ebuild deleted file mode 100644 index 1f784c1459a6..000000000000 --- a/sys-devel/binutils/binutils-2.42-r1.ebuild +++ /dev/null @@ -1,555 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" - -LICENSE="GPL-3+" -IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" - -# Variables that can be set here (ignored for live ebuilds) -# PATCH_VER - the patchset version -# Default: empty, no patching -# PATCH_BINUTILS_VER - the binutils version in the patchset name -# - Default: PV -# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... -# for the patchsets - -PATCH_VER=3 -PATCH_DEV=dilfridge - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 - SLOT=${PV} -else - PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} - PATCH_DEV=${PATCH_DEV:-dilfridge} - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" - [[ -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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -# -# The cross-compile logic -# -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -# -# The dependencies -# -RDEPEND=" - >=sys-devel/binutils-config-3 - sys-libs/zlib - debuginfod? ( - dev-libs/elfutils[debuginfod(-)] - ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - doc? ( sys-apps/texinfo ) - pgo? ( - dev-util/dejagnu - app-alternatives/bc - ) - test? ( - dev-util/dejagnu - app-alternatives/bc - ) - nls? ( sys-devel/gettext ) - zstd? ( virtual/pkgconfig ) - app-alternatives/lex - app-alternatives/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR=${WORKDIR}/build - -src_unpack() { - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patch || die - - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P/-hppa64/}.tar.xz - - cd "${WORKDIR}" || die - unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz - - # _p patch versions are Gentoo specific tarballs ... - local dir=${P%_p?} - dir=${dir/-hppa64/} - - S=${WORKDIR}/${dir} - fi - - cd "${WORKDIR}" || die - mkdir -p "${MY_BUILDDIR}" || die -} - -src_prepare() { - local patchsetname - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" - fi - - if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then - if ! use vanilla; then - einfo "Applying binutils patchset ${patchsetname}" - eapply "${WORKDIR}/patch" - einfo "Done." - - # This is applied conditionally for now just out of caution. - # It should be okay on non-prefix systems though. See bug #892549. - if is_cross || use prefix; then - eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.41-linker-prefix.patch - fi - fi - fi - - # Make sure our explicit libdir paths don't get clobbered, bug #562460 - sed -i \ - -e 's:@bfdlibdir@:@libdir@:g' \ - -e 's:@bfdincludedir@:@includedir@:g' \ - {bfd,opcodes}/Makefile.in || die - - # Apply things from PATCHES and user dirs - default - - # Run misc portage update scripts - gnuconfig_update - elibtoolize --portage --no-uclibc -} - -toolchain-binutils_bugurl() { - printf "https://bugs.gentoo.org/" -} -toolchain-binutils_pkgversion() { - printf "Gentoo ${PV}" - [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" -} - -src_configure() { - # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html - # Avoid really confusing logs from subconfigure spam, makes logs far - # more legible. - MAKEOPTS="--output-sync=line ${MAKEOPTS}" - - # Setup some paths - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} - INCPATH=${LIBPATH}/include - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} - if is_cross ; then - TOOLPATH=/usr/${CHOST}/${CTARGET} - else - TOOLPATH=/usr/${CTARGET} - fi - BINPATH=${TOOLPATH}/binutils-bin/${PV} - - # Make sure we filter $LINGUAS so that only ones that - # actually work make it through, bug #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - use cet && filter-flags -mindirect-branch -mindirect-branch=* - use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - local x - echo - for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do - einfo "$(printf '%10s' ${x}:) ${!x}" - done - echo - - cd "${MY_BUILDDIR}" || die - local myconf=() - - if use plugins ; then - myconf+=( --enable-plugins ) - fi - # enable gold (installed as ld.gold) and ld's plugin architecture - if use gold ; then - myconf+=( --enable-gold ) - fi - - if use nls ; then - myconf+=( --without-included-gettext ) - else - myconf+=( --disable-nls ) - fi - - myconf+=( --with-system-zlib ) - - # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch - # logic in toolchain.eclass. bug #446946 - # - # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 - case $(tc-arch) in - ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; - esac - - use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) - - [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) - - is_cross && myconf+=( - --with-sysroot="${EPREFIX}"/usr/${CTARGET} - --enable-poison-system-directories - ) - - myconf+=( --enable-secureplt ) - - # mips can't do hash-style=gnu ... - if [[ $(tc-arch) != mips ]] ; then - myconf+=( --enable-default-hash-style=gnu ) - fi - - myconf+=( - --prefix="${EPREFIX}"/usr - --host=${CHOST} - --target=${CTARGET} - --datadir="${EPREFIX}"${DATAPATH} - --datarootdir="${EPREFIX}"${DATAPATH} - --infodir="${EPREFIX}"${DATAPATH}/info - --mandir="${EPREFIX}"${DATAPATH}/man - --bindir="${EPREFIX}"${BINPATH} - --libdir="${EPREFIX}"${LIBPATH} - --libexecdir="${EPREFIX}"${LIBPATH} - --includedir="${EPREFIX}"${INCPATH} - # portage's econf() does not detect presence of --d-d-t - # because it greps only top-level ./configure. But not - # libiberty's or bfd's configure. - --disable-dependency-tracking - --disable-silent-rules - --enable-obsolete - --enable-shared - --enable-threads - --enable-relro - --enable-install-libiberty - --enable-textrel-check=$(usex hardened error warning) - # Things to think about - #--enable-deterministic-archives - --enable-new-dtags - --disable-jansson - --disable-werror - --with-bugurl="$(toolchain-binutils_bugurl)" - --with-pkgversion="$(toolchain-binutils_pkgversion)" - $(use_enable static-libs static) - $(use_with zstd) - - # Disable modules that are in a combined binutils/gdb tree, bug #490566 - --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim} - # Strip out broken static link flags: https://gcc.gnu.org/PR56750 - --without-stage1-ldflags - # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 - --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) - - $(use_with debuginfod) - - # Avoid automagic dev-libs/msgpack dep, bug #865875 - --without-msgpack - - # Allow user to opt into CET for host libraries. - # Ideally we would like automagic-or-disabled here. - # But the check does not quite work on i686: bug #760926. - $(use_enable cet) - - # We can enable this by default in future, but it's brand new - # in 2.39 with several bugs: - # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) - # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) - # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) - # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) - $(use_enable gprofng) - ) - - case ${CTARGET} in - x86_64-*|aarch64*|arm64*|i[3456]*) - # These hardening options are available from 2.39+ but - # they unconditionally enable the behaviour even on arches - # where e.g. execstacks can't be avoided. - # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. - # - # TODO: Get the logic for this fixed upstream so it doesn't - # create impossible broken combinations on some arches, like mips. - # - # TODO: Get the logic for this fixed upstream so --disable-* works - # as expected. - myconf+=( - --enable-warn-execstack=yes - --enable-warn-rwx-segments=yes - ) - - if use hardened ; then - myconf+=( - # TOOD: breaks glibc test suite - #--enable-error-execstack=yes - #--enable-error-rwx-segments=yes - --enable-default-execstack=no - ) - fi - ;; - *) - ;; - esac - - if use elibc_musl ; then - # Override our earlier setting for musl, as textrels don't - # work there at all. See bug #707660. - myconf+=( - --enable-textrel-check=error - ) - fi - - if use test || { use pgo && tc-is-lto ; } ; then - # -Wa,* needs to be consistent everywhere or lto-wrapper will complain - filter-flags '-Wa,*' - fi - - if ! is_cross ; then - myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) - - if use pgo ; then - # We let configure handle it for us because it has to run - # the testsuite later on for profiling, and LTO isn't compatible - # with the testsuite. - filter-lto - - export BUILD_CFLAGS="${CFLAGS}" - fi - fi - - ECONF_SOURCE="${S}" econf "${myconf[@]}" - - # Prevent makeinfo from running if doc is unset. - if ! use doc ; then - sed -i \ - -e '/^MAKEINFO/s:=.*:= true:' \ - Makefile || die - fi -} - -src_compile() { - cd "${MY_BUILDDIR}" || die - - # see Note [tooldir hack for ldscripts] - # see linker prefix patch - emake \ - tooldir="${EPREFIX}${TOOLPATH}" \ - gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ - all - - # only build info pages if the user wants them - if use doc ; then - emake info - fi - - # we nuke the manpages when we're left with junk - # (like when we bootstrap, no perl -> no manpages) - find . -name '*.1' -a -size 0 -delete -} - -src_test() { - cd "${MY_BUILDDIR}" || die - - # https://sourceware.org/PR31327 - local -x XZ_OPT="-T1" - local -x XZ_DEFAULTS="-T1" - - ( - # Tests don't expect LTO - filter-lto - - # lto-wrapper warnings which confuse tests - filter-flags '-Wa,*' - - # bug #637066 - filter-flags -Wall -Wreturn-type - - emake -k check \ - CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ - CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ - LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - LDFLAGS="${LDFLAGS}" - ) -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" || die - - # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install - rm -rf "${ED}"/${LIBPATH}/bin || die - use static-libs || find "${ED}" -name '*.la' -delete - - # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 - cd "${ED}"/${LIBPATH} || die - for d in ../* ; do - [[ ${d} == ../${PV} ]] && continue - mv ${d}/* . || die - rmdir ${d} || die - done - - # Now we collect everything intp the proper SLOT-ed dirs - # When something is built to cross-compile, it installs into - # /usr/$CHOST/ by default ... we have to 'fix' that :) - if is_cross ; then - cd "${ED}"/${BINPATH} || die - for x in * ; do - mv ${x} ${x/${CTARGET}-} || die - done - - if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then - mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} - mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/usr/${CHOST}/{include,lib} - fi - fi - - insinto ${INCPATH} - local libiberty_headers=( - # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. - demangle.h - dyn-string.h - fibheap.h - hashtab.h - libiberty.h - objalloc.h - splay-tree.h - ) - doins "${libiberty_headers[@]/#/${S}/include/}" - if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die - rm -r "${ED}"/${LIBPATH}/lib || die - fi - - # Generate an env.d entry for this binutils - insinto /etc/env.d/binutils - cat <<-EOF > "${T}"/env.d - TARGET="${CTARGET}" - VER="${PV}" - LIBPATH="${EPREFIX}${LIBPATH}" - EOF - newins "${T}"/env.d ${CTARGET}-${PV} - - # Handle documentation - if ! is_cross ; then - cd "${S}" || die - dodoc README - - docinto bfd - dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO - - docinto binutils - dodoc binutils/ChangeLog binutils/NEWS binutils/README - - docinto gas - dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* - - docinto gprof - dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl - - docinto ld - dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO - - docinto libiberty - dodoc libiberty/ChangeLog* libiberty/README - - docinto opcodes - dodoc opcodes/ChangeLog* - fi - - # Remove shared info pages - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} - - docompress "${DATAPATH}"/{info,man} - - # Trim all empty dirs - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null -} - -pkg_postinst() { - # Make sure this ${CTARGET} has a binutils version selected - [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 - binutils-config ${CTARGET}-${PV} -} - -pkg_postrm() { - local current_profile=$(binutils-config -c ${CTARGET}) - - # If no other versions exist, then uninstall for this - # target ... otherwise, switch to the newest version - # Note: only do this if this version is unmerged. We - # rerun binutils-config if this is a remerge, as - # we want the mtimes on the symlinks updated (if - # it is the same as the current selected profile) - if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then - local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') - choice=${choice//$'\n'/ } - choice=${choice/* } - if [[ -z ${choice} ]] ; then - binutils-config -u ${CTARGET} - else - binutils-config ${choice} - fi - elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then - binutils-config ${CTARGET}-${PV} - fi -} - -# Note [slotting support] -# ----------------------- -# Gentoo's layout for binutils files is non-standard as Gentoo -# supports slotted installation for binutils. Many tools -# still expect binutils to reside in known locations. -# binutils-config package restores symlinks into known locations, -# like: -# /usr/bin/${CTARGET}-<tool> -# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips -# /usr/include/ -# -# Note [tooldir hack for ldscripts] -# --------------------------------- -# Build system does not allow ./configure to tweak every location -# we need for slotting binutils hence all the shuffling in -# src_install(). This note is about SCRIPTDIR define handling. -# -# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value -# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' -# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. -# Thus we can't just move files around after compilation finished. -# -# Our goal is the following: -# - at build-time set scriptdir to point to symlinked location: -# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) -# - at install-time set scriptdir to point to slotted location: -# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sys-devel/binutils/binutils-2.42-r2.ebuild b/sys-devel/binutils/binutils-2.42-r2.ebuild index 14fb7491d92f..267d2d3fd4b8 100644 --- a/sys-devel/binutils/binutils-2.42-r2.ebuild +++ b/sys-devel/binutils/binutils-2.42-r2.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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi # @@ -177,6 +177,8 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x diff --git a/sys-devel/binutils/binutils-2.43-r1.ebuild b/sys-devel/binutils/binutils-2.43-r1.ebuild index d55fbb138802..65d4e3c31f14 100644 --- a/sys-devel/binutils/binutils-2.43-r1.ebuild +++ b/sys-devel/binutils/binutils-2.43-r1.ebuild @@ -185,6 +185,9 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do diff --git a/sys-devel/binutils/binutils-2.43.ebuild b/sys-devel/binutils/binutils-2.43-r2.ebuild index c5fc0b22c353..ec5d17d21413 100644 --- a/sys-devel/binutils/binutils-2.43.ebuild +++ b/sys-devel/binutils/binutils-2.43-r2.ebuild @@ -19,7 +19,7 @@ IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins sta # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=1 +PATCH_VER=3 PATCH_DEV=dilfridge if [[ ${PV} == 9999 ]]; then @@ -35,7 +35,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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi # @@ -131,8 +131,8 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. if is_cross || use prefix; then - eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.43-linker-prefix.patch + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch fi fi fi @@ -185,6 +185,9 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do diff --git a/sys-devel/binutils/binutils-2.43.9999.ebuild b/sys-devel/binutils/binutils-2.43.9999.ebuild index 06e1d7caa397..a2146d703da6 100644 --- a/sys-devel/binutils/binutils-2.43.9999.ebuild +++ b/sys-devel/binutils/binutils-2.43.9999.ebuild @@ -83,7 +83,10 @@ MY_BUILDDIR=${WORKDIR}/build src_unpack() { if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git + https://github.com/gentoo/binutils-patches + " EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git git-r3_src_unpack mv patches-git/9999 patch || die @@ -91,7 +94,11 @@ src_unpack() { if [[ ${PV} != 9999 ]] ; then EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch fi - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + EGIT_REPO_URI=" + https://sourceware.org/git/binutils-gdb.git + https://git.sr.ht/~sourceware/binutils-gdb + https://gitlab.com/x86-binutils/binutils-gdb.git + " S=${WORKDIR}/binutils EGIT_CHECKOUT_DIR=${S} git-r3_src_unpack @@ -185,6 +192,9 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + # https://sourceware.org/PR32372 + append-cflags $(test-flags-CC -std=gnu17) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index 1a0501350ebe..b262083b7c2f 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -94,7 +94,11 @@ src_unpack() { if [[ ${PV} != 9999 ]] ; then EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch fi - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + EGIT_REPO_URI=" + https://sourceware.org/git/binutils-gdb.git + https://git.sr.ht/~sourceware/binutils-gdb + https://gitlab.com/x86-binutils/binutils-gdb.git + " S=${WORKDIR}/binutils EGIT_CHECKOUT_DIR=${S} git-r3_src_unpack diff --git a/sys-devel/bison/metadata.xml b/sys-devel/bison/metadata.xml index 2e9f3654b407..559217028b18 100644 --- a/sys-devel/bison/metadata.xml +++ b/sys-devel/bison/metadata.xml @@ -8,5 +8,6 @@ <upstream> <remote-id type="cpe">cpe:/a:gnu:bison</remote-id> <remote-id type="github">akimd/bison</remote-id> + <remote-id type="savannah">bison</remote-id> </upstream> </pkgmetadata> diff --git a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0_p1.ebuild b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0_p1.ebuild index 0c5d3500faa2..a166f045908d 100644 --- a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0_p1.ebuild +++ b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0_p1.ebuild @@ -40,7 +40,7 @@ LICENSE=" LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) " SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~mips ~ppc ppc64 ~riscv ~s390 sparc ~x86" +KEYWORDS="amd64 ~arm arm64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="+bin-symlinks custom-cflags +strip" RDEPEND=" diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest deleted file mode 100644 index 840b7c21a102..000000000000 --- a/sys-devel/clang-common/Manifest +++ /dev/null @@ -1,13 +0,0 @@ -DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 -DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 -DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 -DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 -DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 -DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db -DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b -DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 -DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 -DIST llvm-project-b837c9e289dab93c7f8a06876e3f70b6864f40ab.tar.gz 219631219 BLAKE2B d8a5d7de537ad91e94fc85dc0f624eba92f31cab2a345706250a66ad424fff151d5b86c430d993a35fd938095774411080cee4cab47a8258af348743dc145b56 SHA512 fe23f72b73553e3755af335a2a2a2225eafdcf2ed93191c9f4ac7bcf7b5b5391f73c2dccbb082279e0c7389a8f12b889a8d061389785cf9219ca861a8d4b41cc -DIST llvm-project-cde7b30268a85a3e7900a31534a97e7eb4de9236.tar.gz 219048549 BLAKE2B 53bdfea814b2cdf60bfdd27f6135b9f9d5156bdc78d22a361214399c5101b6fafaaefb9109377c1d977c67ebcb1feed69d6aaee0f2e38881480d68ac8be9b3d9 SHA512 0def6da5c2443753f37ba40a893b41dd5c7676b7be57102a5a6e820fe4fe235cad1da9a1c0eff1abc4c4ed5cc188522cae23afeddeee1876ea8ffde5c4f33b9f -DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf diff --git a/sys-devel/clang-common/clang-common-15.0.7-r10.ebuild b/sys-devel/clang-common/clang-common-15.0.7-r10.ebuild deleted file mode 100644 index d724729a628b..000000000000 --- a/sys-devel/clang-common/clang-common-15.0.7-r10.ebuild +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit bash-completion-r1 llvm.org - -DESCRIPTION="Common files shared between multiple slots of clang" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind - hardened stricter -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${PV}[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 -} - -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 - - # Baseline hardening (bug #851111) - # (-fstack-clash-protection is omitted because of a possible Clang bug, - # see bug #892537 and bug #865339.) - 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-protector-strong - -fPIE - -include "${EPREFIX}/usr/include/gentoo/fortify.h" - EOF - - 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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) && __OPTIMIZE__ > 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 - #endif - EOF - - if use hardened ; then - cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - -D_LIBCPP_ENABLE_ASSERTIONS=1 - EOF - fi - - if use stricter; then - newins - gentoo-stricter.cfg <<-EOF - # This file increases the strictness of older clang versions - # to match the newest upstream version. - - # clang-16 defaults - -Werror=implicit-function-declaration - -Werror=implicit-int - -Werror=incompatible-function-pointer-types - EOF - - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - @gentoo-stricter.cfg - EOF - fi - - local tool - for tool in clang{,++,-cpp}; do - newins - "${tool}.cfg" <<-EOF - # This configuration file is used by ${tool} driver. - @gentoo-common.cfg - EOF - done -} - -pkg_preinst() { - if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc - then - local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) - if [[ -n ${gcc_path} ]]; then - cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF - --gcc-install-dir="${gcc_path%%:*}" - EOF - fi - fi -} diff --git a/sys-devel/clang-common/clang-common-16.0.6-r6.ebuild b/sys-devel/clang-common/clang-common-16.0.6-r6.ebuild deleted file mode 100644 index e6b8345426e7..000000000000 --- a/sys-devel/clang-common/clang-common-16.0.6-r6.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit bash-completion-r1 llvm.org - -DESCRIPTION="Common files shared between multiple slots of clang" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix hardened llvm-libunwind -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 -} - -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 - - # 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 - - 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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) && __OPTIMIZE__ > 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 - #endif - EOF - - if use hardened ; then - cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - -D_LIBCPP_ENABLE_ASSERTIONS=1 - EOF - fi - - local tool - for tool in clang{,++,-cpp}; do - newins - "${tool}.cfg" <<-EOF - # This configuration file is used by ${tool} driver. - @gentoo-common.cfg - EOF - done - - 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 - cat >> "${ED}/etc/clang/clang++.cfg" <<-EOF || die - -lc++abi - EOF - 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-common/clang-common-17.0.6-r10.ebuild b/sys-devel/clang-common/clang-common-17.0.6-r10.ebuild deleted file mode 100644 index 0770e0337cbd..000000000000 --- a/sys-devel/clang-common/clang-common-17.0.6-r10.ebuild +++ /dev/null @@ -1,302 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix cet hardened llvm-libunwind -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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 - - if use hardened ; then - cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -D_LIBCPP_ENABLE_ASSERTIONS=1 - 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-common/clang-common-17.0.6-r9.ebuild b/sys-devel/clang-common/clang-common-17.0.6-r9.ebuild deleted file mode 100644 index 5f634ac72ad7..000000000000 --- a/sys-devel/clang-common/clang-common-17.0.6-r9.ebuild +++ /dev/null @@ -1,302 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix cet hardened llvm-libunwind -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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 - - 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_ENABLE_ASSERTIONS=1 - 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-common/clang-common-18.1.8-r3.ebuild b/sys-devel/clang-common/clang-common-18.1.8-r3.ebuild deleted file mode 100644 index bd5543518470..000000000000 --- a/sys-devel/clang-common/clang-common-18.1.8-r3.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix cet hardened llvm-libunwind -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/clang-common-19.1.1.ebuild b/sys-devel/clang-common/clang-common-19.1.1.ebuild deleted file mode 100644 index 96be6fb619b1..000000000000 --- a/sys-devel/clang-common/clang-common-19.1.1.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix cet hardened llvm-libunwind -" - -PDEPEND=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/clang-common-20.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild deleted file mode 100644 index 6eb8b79a8c99..000000000000 --- a/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) || __OPTIMIZE__ == 0 - # elif !defined(__STDC_HOSTED__) || __STDC_HOSTED__ != 1 - # elif defined(__SANITIZE_ADDRESS__) - # elif __GENTOO_HAS_FEATURE(address_sanitizer) - # elif __GENTOO_HAS_FEATURE(hwaddress_sanitizer) - # elif __GENTOO_HAS_FEATURE(memory_sanitizer) - # elif __GENTOO_HAS_FEATURE(numerical_stability_sanitizer) - # elif __GENTOO_HAS_FEATURE(realtime_sanitizer) - # elif __GENTOO_HAS_FEATURE(thread_sanitizer) - # else - # define _FORTIFY_SOURCE ${fortify_level} - # endif - # - # undef __GENTOO_HAS_FEATURE - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/clang-common-20.0.0_pre20240924.ebuild b/sys-devel/clang-common/clang-common-20.0.0_pre20240924.ebuild deleted file mode 100644 index 6eb8b79a8c99..000000000000 --- a/sys-devel/clang-common/clang-common-20.0.0_pre20240924.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) || __OPTIMIZE__ == 0 - # elif !defined(__STDC_HOSTED__) || __STDC_HOSTED__ != 1 - # elif defined(__SANITIZE_ADDRESS__) - # elif __GENTOO_HAS_FEATURE(address_sanitizer) - # elif __GENTOO_HAS_FEATURE(hwaddress_sanitizer) - # elif __GENTOO_HAS_FEATURE(memory_sanitizer) - # elif __GENTOO_HAS_FEATURE(numerical_stability_sanitizer) - # elif __GENTOO_HAS_FEATURE(realtime_sanitizer) - # elif __GENTOO_HAS_FEATURE(thread_sanitizer) - # else - # define _FORTIFY_SOURCE ${fortify_level} - # endif - # - # undef __GENTOO_HAS_FEATURE - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/clang-common-20.0.0_pre20241004.ebuild b/sys-devel/clang-common/clang-common-20.0.0_pre20241004.ebuild deleted file mode 100644 index 6eb8b79a8c99..000000000000 --- a/sys-devel/clang-common/clang-common-20.0.0_pre20241004.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) || __OPTIMIZE__ == 0 - # elif !defined(__STDC_HOSTED__) || __STDC_HOSTED__ != 1 - # elif defined(__SANITIZE_ADDRESS__) - # elif __GENTOO_HAS_FEATURE(address_sanitizer) - # elif __GENTOO_HAS_FEATURE(hwaddress_sanitizer) - # elif __GENTOO_HAS_FEATURE(memory_sanitizer) - # elif __GENTOO_HAS_FEATURE(numerical_stability_sanitizer) - # elif __GENTOO_HAS_FEATURE(realtime_sanitizer) - # elif __GENTOO_HAS_FEATURE(thread_sanitizer) - # else - # define _FORTIFY_SOURCE ${fortify_level} - # endif - # - # undef __GENTOO_HAS_FEATURE - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/clang-common-20.0.0_pre20241009.ebuild b/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild deleted file mode 100644 index 6eb8b79a8c99..000000000000 --- a/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# 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=" - default-compiler-rt? ( - sys-devel/clang-runtime:${LLVM_MAJOR}[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 (<stdc-predef.h>) && !defined(__GLIBC__) - # include <stdc-predef.h> - #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(__OPTIMIZE__) || __OPTIMIZE__ == 0 - # elif !defined(__STDC_HOSTED__) || __STDC_HOSTED__ != 1 - # elif defined(__SANITIZE_ADDRESS__) - # elif __GENTOO_HAS_FEATURE(address_sanitizer) - # elif __GENTOO_HAS_FEATURE(hwaddress_sanitizer) - # elif __GENTOO_HAS_FEATURE(memory_sanitizer) - # elif __GENTOO_HAS_FEATURE(numerical_stability_sanitizer) - # elif __GENTOO_HAS_FEATURE(realtime_sanitizer) - # elif __GENTOO_HAS_FEATURE(thread_sanitizer) - # else - # define _FORTIFY_SOURCE ${fortify_level} - # endif - # - # undef __GENTOO_HAS_FEATURE - #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. - -Xarch_host -D_GLIBCXX_ASSERTIONS - - # Analogue to GLIBCXX_ASSERTIONS - # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode - # https://libcxx.llvm.org/Hardening.html#using-hardened-mode - -Xarch_host -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-common/metadata.xml b/sys-devel/clang-common/metadata.xml deleted file mode 100644 index da45c87b0e27..000000000000 --- a/sys-devel/clang-common/metadata.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <upstream> - <remote-id type="github">llvm/llvm-project</remote-id> - </upstream> - <use> - <flag name="bootstrap-prefix">!!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for bootstrapping Gentoo Prefix</flag> - <flag name="cet"> - Enable support for control flow hijacking protection. - - On amd64, this provides Intel Control Flow Enforcement Technology (CET). - - Only provides benefits on newer CPUs. For Intel, the CPU - must be at least as new as Tiger Lake. For AMD, it must be - at least as new as Zen 3. This is harmless on older CPUs, - but provides no benefit either. - </flag> - <flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag> - <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag> - <flag name="default-lld">Use lld as the default linker for clang</flag> - <flag name="stricter">Default to stricter behavior known from newer clang versions, turning more warnings into errors</flag> - </use> -</pkgmetadata> diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild index 88ae3f07ac85..8c956f0568fa 100644 --- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild @@ -15,8 +15,8 @@ SLOT="${PV}" KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" RDEPEND=" - sys-devel/clang:${SLOT} - sys-devel/lld:${SLOT} + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} " src_install() { diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild index 88ae3f07ac85..8c956f0568fa 100644 --- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild @@ -15,8 +15,8 @@ SLOT="${PV}" KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" RDEPEND=" - sys-devel/clang:${SLOT} - sys-devel/lld:${SLOT} + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} " src_install() { diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild index 8777be3e96c1..344337caf896 100644 --- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild @@ -15,8 +15,8 @@ SLOT="${PV}" KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos" RDEPEND=" - sys-devel/clang:${SLOT} - sys-devel/lld:${SLOT} + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} " src_install() { diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild index 7604a7a58de0..0681adeb8455 100644 --- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild @@ -16,8 +16,8 @@ KEYWORDS="" PROPERTIES="live" RDEPEND=" - sys-devel/clang:${SLOT} - sys-devel/lld:${SLOT} + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} " src_install() { diff --git a/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild deleted file mode 100644 index c4f7620e1212..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib-build - -DESCRIPTION="Meta-ebuild for clang runtime libraries" -HOMEPAGE="https://clang.llvm.org/" - -LICENSE="metapackage" -SLOT="$(ver_cut 1-3)" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -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}] ) -" diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild deleted file mode 100644 index 25889f60d661..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# 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%%.*}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-runtime/clang-runtime-17.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild deleted file mode 100644 index 25889f60d661..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# 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%%.*}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-runtime/clang-runtime-18.1.8.ebuild b/sys-devel/clang-runtime/clang-runtime-18.1.8.ebuild deleted file mode 100644 index e95d8a0af7dc..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-18.1.8.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# 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%%.*}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-runtime/clang-runtime-19.1.1.ebuild b/sys-devel/clang-runtime/clang-runtime-19.1.1.ebuild deleted file mode 100644 index 8ded193c919c..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-19.1.1.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# 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%%.*}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-runtime/clang-runtime-20.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-20.0.0.9999.ebuild deleted file mode 100644 index 323c0b62c062..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-20.0.0.9999.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# 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-runtime/clang-runtime-20.0.0_pre20240924.ebuild b/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20240924.ebuild deleted file mode 100644 index 323c0b62c062..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20240924.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# 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-runtime/clang-runtime-20.0.0_pre20241004.ebuild b/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241004.ebuild deleted file mode 100644 index 323c0b62c062..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241004.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# 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-runtime/clang-runtime-20.0.0_pre20241009.ebuild b/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241009.ebuild deleted file mode 100644 index 323c0b62c062..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241009.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# 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-runtime/metadata.xml b/sys-devel/clang-runtime/metadata.xml deleted file mode 100644 index 83929061543f..000000000000 --- a/sys-devel/clang-runtime/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <use> - <flag name="compiler-rt">Install <pkg>sys-libs/compiler-rt</pkg> for -rtlib=compiler-rt</flag> - <flag name="libcxx">Install <pkg>sys-libs/libcxx</pkg> for -stdlib=libc++</flag> - <flag name="openmp">Install <pkg>sys-libs/libomp</pkg> for -fopenmp support</flag> - <flag name="sanitize">Enable compiler-rt sanitizer (-fsanitize*) support</flag> - </use> - <upstream> - <remote-id type="github">llvm/llvm-project</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild deleted file mode 100644 index 988214f580c9..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild deleted file mode 100644 index 436e2673639f..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild deleted file mode 100644 index 436e2673639f..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild deleted file mode 100644 index 18d3e444c0e2..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild deleted file mode 100644 index 5da14bc07f7a..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-20.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-20.ebuild deleted file mode 100644 index 3496a0f89b67..000000000000 --- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-20.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use Clang on GCC-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -IUSE="gcc-symlinks multilib-symlinks +native-symlinks" - -# Blocker for bug #872416 -RDEPEND=" - !<sys-devel/gcc-config-2.6 - sys-devel/clang:${SLOT} -" - -src_install() { - local tools=() - - if use native-symlinks; then - tools+=( - cc:clang - cpp:clang-cpp - c++:clang++ - ) - fi - if use gcc-symlinks; then - tools+=( - gcc:clang - g++:clang++ - ) - fi - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${t%:*}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "${t#*:}" "${dest}/${chost}-${t%:*}" - done - done -} diff --git a/sys-devel/clang-toolchain-symlinks/metadata.xml b/sys-devel/clang-toolchain-symlinks/metadata.xml deleted file mode 100644 index bf4e9fc6a6ca..000000000000 --- a/sys-devel/clang-toolchain-symlinks/metadata.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <use> - <flag name="gcc-symlinks"> - Install symlinks for 'gcc' and 'g++' for extra - compatibility. - </flag> - <flag name="multilib-symlinks"> - Install symlinks for all ABI CHOSTs. Note that this can - result in gcc being overrode for native builds, as well - as conflict with crossdev if used for the same targets. - </flag> - <flag name="native-symlinks"> - Install generic tool symlinks like 'cc' and 'c++', - as well as ${CTARGET}-*. These symlinks are installed - into slotted LLVM bindir, so they should not take precedence - over symlinks installed into /usr/bin - by <pkg>sys-devel/gcc-config</pkg> but they can be helpful - for GCC-free setups. - </flag> - </use> -</pkgmetadata> diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest deleted file mode 100644 index 5d3af711ce3b..000000000000 --- a/sys-devel/clang/Manifest +++ /dev/null @@ -1,21 +0,0 @@ -DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49 -DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b -DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb -DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc -DIST llvm-19.1.0-manpages.tar.bz2 286165 BLAKE2B d96df2e748d2d52af2e8b7023f59af9ab53a9e59480ff228726bf629f1ecd813af80f3ba4126919092beb7ad8214193e828f997d300c705b0d8b90d6aedb22ee SHA512 aed63dee6629fe9116a9ce21e8bfb0e2c0b80ad276c6551f445ef01c71e130fef1615679adba8386ab57cac5104a153919e0b0df6bd66e023c5f0398081d2374 -DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df -DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825 -DIST llvm-gentoo-patchset-17.0.6-r1.tar.xz 2792 BLAKE2B b4e9014179edd96add0c932b16d3a95a5d7a905298052164ff668590108c83cd4f938d42b6d801efedae28a959b03b2bc3c7cd2a4cad20ef2b3c7aa9a3d0c15d SHA512 73a46aa9f6f2ac6334a073733aa082a12f97fb6a2750d5930af4eb1639cd192f3a17ea87c2f17947f04c68a5f60e37d9bc27ede8bab75531599edfb4c3aa8ffe -DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 -DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 -DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 -DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 -DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 -DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db -DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b -DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 -DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 -DIST llvm-project-b837c9e289dab93c7f8a06876e3f70b6864f40ab.tar.gz 219631219 BLAKE2B d8a5d7de537ad91e94fc85dc0f624eba92f31cab2a345706250a66ad424fff151d5b86c430d993a35fd938095774411080cee4cab47a8258af348743dc145b56 SHA512 fe23f72b73553e3755af335a2a2a2225eafdcf2ed93191c9f4ac7bcf7b5b5391f73c2dccbb082279e0c7389a8f12b889a8d061389785cf9219ca861a8d4b41cc -DIST llvm-project-cde7b30268a85a3e7900a31534a97e7eb4de9236.tar.gz 219048549 BLAKE2B 53bdfea814b2cdf60bfdd27f6135b9f9d5156bdc78d22a361214399c5101b6fafaaefb9109377c1d977c67ebcb1feed69d6aaee0f2e38881480d68ac8be9b3d9 SHA512 0def6da5c2443753f37ba40a893b41dd5c7676b7be57102a5a6e820fe4fe235cad1da9a1c0eff1abc4c4ed5cc188522cae23afeddeee1876ea8ffde5c4f33b9f -DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf diff --git a/sys-devel/clang/clang-15.0.7-r3.ebuild b/sys-devel/clang/clang-15.0.7-r3.ebuild deleted file mode 100644 index 0d07b49a63ac..000000000000 --- a/sys-devel/clang/clang-15.0.7-r3.ebuild +++ /dev/null @@ -1,482 +0,0 @@ -# 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 llvm.org multilib multilib-minimal \ - 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}g1" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos" -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} - doc? ( $(python_gen_cond_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - xml? ( virtual/pkgconfig ) -" -PDEPEND=" - sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} - ~sys-devel/clang-runtime-${PV} -" - -LLVM_COMPONENTS=( - clang clang-tools-extra cmake - llvm/lib/Transforms/Hello -) -LLVM_MANPAGES=1 -LLVM_TEST_COMPONENTS=( - llvm/lib/Testing/Support - llvm/utils/{lit,llvm-lit,unittest} - llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} -) -LLVM_PATCHSET=${PV/_/-}-r3 -LLVM_USE_TARGETS=llvm -llvm.org_set_globals - -# Multilib notes: -# 1. ABI_* flags control ABIs libclang* is built for only. -# 2. clang is always capable of compiling code for all ABIs for enabled -# target. However, you will need appropriate crt* files (installed -# e.g. by sys-devel/gcc and sys-libs/glibc). -# 3. ${CHOST}-clang wrappers are always installed for all ABIs included -# in the current profile (i.e. alike supported by sys-devel/gcc). -# -# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need -# multilib clang* libraries (not runtime, not wrappers). - -pkg_setup() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - python-single-r1_pkg_setup -} - -src_prepare() { - # create extra parent dir for relative CLANG_RESOURCE_DIR access - mkdir -p x/y || die - BUILD_DIR=${WORKDIR}/x/y/clang - - llvm.org_src_prepare - - # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) - eprefixify \ - lib/Lex/InitHeaderSearch.cpp \ - lib/Driver/ToolChains/Darwin.cpp || die - - if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then - sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die - fi -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # meta-targets - clang-libraries|distribution) - continue - ;; - # tools - clang|clangd|clang-*) - ;; - # static libraries - clang*|findAllSymbols) - continue - ;; - # conditional to USE=doc - docs-clang-html|docs-clang-tools-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(${NINJA} -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # common stuff - clang-cmake-exports - clang-headers - clang-resource-headers - libclang-headers - - aarch64-resource-headers - arm-common-resource-headers - arm-resource-headers - core-resource-headers - cuda-resource-headers - hexagon-resource-headers - hip-resource-headers - hlsl-resource-headers - mips-resource-headers - opencl-resource-headers - openmp-resource-headers - ppc-htm-resource-headers - ppc-resource-headers - riscv-resource-headers - systemz-resource-headers - utility-resource-headers - ve-resource-headers - webassembly-resource-headers - windows-resource-headers - x86-resource-headers - - # libs - clang-cpp - libclang - ) - - if multilib_is_native_abi; then - out+=( - # common stuff - bash-autocomplete - libclang-python-bindings - - # tools - c-index-test - clang - clang-format - clang-offload-bundler - clang-offload-packager - clang-offload-wrapper - clang-refactor - clang-repl - clang-rename - clang-scan-deps - diagtool - hmaptool - - # needed for cross-compiling Clang - clang-tblgen - ) - - if use extra; then - out+=( - # extra tools - clang-apply-replacements - clang-change-namespace - clang-doc - 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() { - 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_VERSION}" - - -DBUILD_SHARED_LIBS=OFF - -DCLANG_LINK_CLANG_DYLIB=ON - -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) - - -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - -DLLVM_BUILD_TESTS=$(usex test) - - # these are not propagated reliably, so redefine them - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - - -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) - # libgomp support fails to find headers without explicit -I - # furthermore, it provides only syntax checking - -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp - - # disable using CUDA to autodetect GPU, just build for all - -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON - - -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) - - -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) - -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) - - -DPython3_EXECUTABLE="${PYTHON}" - ) - - if ! use elibc_musl; then - mycmakeargs+=( - -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) - ) - fi - - use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" - -DLLVM_LIT_ARGS="$(get_lit_flags)" - ) - - if multilib_is_native_abi; then - local build_docs=OFF - if llvm_are_manpages_built; then - build_docs=ON - mycmakeargs+=( - -DLLVM_BUILD_DOCS=ON - -DLLVM_ENABLE_SPHINX=ON - -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - if use extra; then - mycmakeargs+=( - -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" - ) - fi - fi - mycmakeargs+=( - -DCLANG_INCLUDE_DOCS=${build_docs} - ) - fi - if multilib_native_use extra; then - mycmakeargs+=( - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra - -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} - ) - else - mycmakeargs+=( - -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF - ) - fi - - if [[ -n ${EPREFIX} ]]; then - mycmakeargs+=( - -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" - ) - fi - - if tc-is-cross-compiler; then - has_version -b sys-devel/clang:${LLVM_MAJOR} || - die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." - local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin - mycmakeargs+=( - -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" - -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen - ) - fi - - # LLVM can have very high memory consumption while linking, - # exhausting the limit on 32-bit linker executable - use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake_src_configure - - multilib_is_native_abi && check_distribution_components -} - -multilib_src_compile() { - cmake_build distribution - - # provide a symlink for tests - if [[ ! -L ${WORKDIR}/lib/clang ]]; then - mkdir -p "${WORKDIR}"/lib || die - ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - local test_targets=( check-clang ) - if multilib_native_use extra; then - test_targets+=( - check-clang-tools - check-clangd - ) - fi - cmake_build "${test_targets[@]}" -} - -src_install() { - MULTILIB_WRAPPED_HEADERS=( - /usr/include/clang/Config/config.h - ) - - multilib-minimal_src_install - - # Move runtime headers to /usr/lib/clang, where they belong - mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die - # move (remaining) wrapped headers back - if use extra; then - mv "${T}"/clang-tidy "${ED}"/usr/include/ || die - fi - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die - - # Apply CHOST and version suffix to clang tools - local clang_tools=( clang clang++ clang-cl clang-cpp ) - local abi i - - # cmake gives us: - # - clang-X - # - clang -> clang-X - # - clang++, clang-cl, clang-cpp -> clang - # we want to have: - # - clang-X - # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X - # - clang, clang++, clang-cl, clang-cpp -> clang*-X - # also in CHOST variant - for i in "${clang_tools[@]:1}"; do - rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die - dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" - dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" - done - - # now create target symlinks for all supported ABIs - for abi in $(get_all_abis); do - local abi_chost=$(get_abi_CHOST "${abi}") - for i in "${clang_tools[@]}"; do - dosym "${i}-${LLVM_MAJOR}" \ - "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" - dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ - "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" - done - done -} - -multilib_src_install() { - DESTDIR=${D} cmake_build install-distribution - - if multilib_is_native_abi; then - # install clang-*-wrapper tools - # https://bugs.gentoo.org/904143 - exeinto "/usr/lib/llvm/${LLVM_MAJOR}/bin" - doexe "${BUILD_DIR}"/bin/clang-{linker,nvlink}-wrapper - fi - - # move headers to /usr/include for wrapping & ABI mismatch checks - # (also drop the version suffix from runtime headers) - rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die - if multilib_native_use extra; then - # don't wrap clang-tidy headers, the list is too long - # (they're fine for non-native ABI but enabling the targets is problematic) - mv "${ED}"/usr/include/clang-tidy "${T}/" || die - fi -} - -multilib_src_install_all() { - python_fix_shebang "${ED}" - if use static-analyzer; then - python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view - fi - - docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" - llvm_install_manpages - # match 'html' non-compression - use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" - # +x for some reason; TODO: investigate - use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" -} - -pkg_postinst() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow update all - fi - - elog "You can find additional utility scripts in:" - elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" - if use extra; then - elog "Some of them are vim integration scripts (with instructions inside)." - elog "The run-clang-tidy.py script requires the following additional package:" - elog " dev-python/pyyaml" - fi -} - -pkg_postrm() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow clean all - fi -} diff --git a/sys-devel/clang/clang-16.0.6.ebuild b/sys-devel/clang/clang-16.0.6.ebuild deleted file mode 100644 index bd1e86a5edd7..000000000000 --- a/sys-devel/clang/clang-16.0.6.ebuild +++ /dev/null @@ -1,483 +0,0 @@ -# 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 llvm.org 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}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -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} - doc? ( $(python_gen_cond_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - xml? ( virtual/pkgconfig ) -" -PDEPEND=" - ~sys-devel/clang-runtime-${PV} - sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} -" - -LLVM_COMPONENTS=( - clang clang-tools-extra cmake - llvm/lib/Transforms/Hello -) -LLVM_MANPAGES=1 -LLVM_TEST_COMPONENTS=( - llvm/lib/Testing - llvm/utils - third-party -) -LLVM_PATCHSET=${PV} -LLVM_USE_TARGETS=llvm -llvm.org_set_globals - -# Multilib notes: -# 1. ABI_* flags control ABIs libclang* is built for only. -# 2. clang is always capable of compiling code for all ABIs for enabled -# target. However, you will need appropriate crt* files (installed -# e.g. by sys-devel/gcc and sys-libs/glibc). -# 3. ${CHOST}-clang wrappers are always installed for all ABIs included -# in the current profile (i.e. alike supported by sys-devel/gcc). -# -# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need -# multilib clang* libraries (not runtime, not wrappers). - -pkg_setup() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - python-single-r1_pkg_setup -} - -src_prepare() { - # create extra parent dir for relative CLANG_RESOURCE_DIR access - mkdir -p x/y || die - BUILD_DIR=${WORKDIR}/x/y/clang - - llvm.org_src_prepare - - # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) - eprefixify \ - lib/Lex/InitHeaderSearch.cpp \ - lib/Driver/ToolChains/Darwin.cpp || die - - if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then - sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die - fi -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # meta-targets - clang-libraries|distribution) - continue - ;; - # tools - clang|clangd|clang-*) - ;; - # static libraries - clang*|findAllSymbols) - continue - ;; - # conditional to USE=doc - docs-clang-html|docs-clang-tools-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(${NINJA} -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # common stuff - clang-cmake-exports - clang-headers - clang-resource-headers - libclang-headers - - aarch64-resource-headers - arm-common-resource-headers - arm-resource-headers - core-resource-headers - cuda-resource-headers - hexagon-resource-headers - hip-resource-headers - hlsl-resource-headers - mips-resource-headers - opencl-resource-headers - openmp-resource-headers - ppc-htm-resource-headers - ppc-resource-headers - riscv-resource-headers - systemz-resource-headers - utility-resource-headers - ve-resource-headers - webassembly-resource-headers - windows-resource-headers - x86-resource-headers - - # libs - clang-cpp - libclang - ) - - if multilib_is_native_abi; then - out+=( - # common stuff - bash-autocomplete - libclang-python-bindings - - # tools - amdgpu-arch - c-index-test - clang - clang-format - clang-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() { - tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 - - local mycmakeargs=( - -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" - -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" - # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" - - -DBUILD_SHARED_LIBS=OFF - -DCLANG_LINK_CLANG_DYLIB=ON - -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) - -DCLANG_INCLUDE_TESTS=$(usex test) - - -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - - # these are not propagated reliably, so redefine them - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - - -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) - # libgomp support fails to find headers without explicit -I - # furthermore, it provides only syntax checking - -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp - - # disable using CUDA to autodetect GPU, just build for all - -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON - # disable linking to HSA to avoid automagic dep, - # load it dynamically instead - -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON - - -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) - - -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) - -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) - - -DPython3_EXECUTABLE="${PYTHON}" - ) - - if ! use elibc_musl; then - mycmakeargs+=( - -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) - ) - fi - - use test && mycmakeargs+=( - -DLLVM_BUILD_TESTS=ON - -DLLVM_LIT_ARGS="$(get_lit_flags)" - ) - - if multilib_is_native_abi; then - local build_docs=OFF - if llvm_are_manpages_built; then - build_docs=ON - mycmakeargs+=( - -DLLVM_BUILD_DOCS=ON - -DLLVM_ENABLE_SPHINX=ON - -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - if use extra; then - mycmakeargs+=( - -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" - ) - fi - fi - mycmakeargs+=( - -DCLANG_INCLUDE_DOCS=${build_docs} - ) - fi - if multilib_native_use extra; then - mycmakeargs+=( - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra - -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} - ) - else - mycmakeargs+=( - -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF - ) - fi - - if [[ -n ${EPREFIX} ]]; then - mycmakeargs+=( - -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" - ) - fi - - if tc-is-cross-compiler; then - has_version -b sys-devel/clang:${LLVM_MAJOR} || - die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." - local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin - mycmakeargs+=( - -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" - -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen - ) - fi - - # LLVM can have very high memory consumption while linking, - # exhausting the limit on 32-bit linker executable - use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake_src_configure - - multilib_is_native_abi && check_distribution_components -} - -multilib_src_compile() { - cmake_build distribution - - # provide a symlink for tests - if [[ ! -L ${WORKDIR}/lib/clang ]]; then - mkdir -p "${WORKDIR}"/lib || die - ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - local test_targets=( check-clang ) - if multilib_native_use extra; then - test_targets+=( - check-clang-tools - check-clangd - ) - fi - cmake_build "${test_targets[@]}" -} - -src_install() { - MULTILIB_WRAPPED_HEADERS=( - /usr/include/clang/Config/config.h - ) - - multilib-minimal_src_install - - # Move runtime headers to /usr/lib/clang, where they belong - mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die - # move (remaining) wrapped headers back - if use extra; then - mv "${T}"/clang-tidy "${ED}"/usr/include/ || die - fi - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die - - # Apply CHOST and version suffix to clang tools - local clang_tools=( clang clang++ clang-cl clang-cpp ) - local abi i - - # cmake gives us: - # - clang-X - # - clang -> clang-X - # - clang++, clang-cl, clang-cpp -> clang - # we want to have: - # - clang-X - # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X - # - clang, clang++, clang-cl, clang-cpp -> clang*-X - # also in CHOST variant - for i in "${clang_tools[@]:1}"; do - rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die - dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" - dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" - done - - # now create target symlinks for all supported ABIs - for abi in $(get_all_abis); do - local abi_chost=$(get_abi_CHOST "${abi}") - for i in "${clang_tools[@]}"; do - dosym "${i}-${LLVM_MAJOR}" \ - "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" - dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ - "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" - done - done -} - -multilib_src_install() { - DESTDIR=${D} cmake_build install-distribution - - # move headers to /usr/include for wrapping & ABI mismatch checks - # (also drop the version suffix from runtime headers) - rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die - if multilib_native_use extra; then - # don't wrap clang-tidy headers, the list is too long - # (they're fine for non-native ABI but enabling the targets is problematic) - mv "${ED}"/usr/include/clang-tidy "${T}/" || die - fi -} - -multilib_src_install_all() { - python_fix_shebang "${ED}" - if use static-analyzer; then - python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view - fi - - docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" - llvm_install_manpages - # match 'html' non-compression - use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" - # +x for some reason; TODO: investigate - use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" -} - -pkg_postinst() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow update all - fi - - elog "You can find additional utility scripts in:" - elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" - if use extra; then - elog "Some of them are vim integration scripts (with instructions inside)." - elog "The run-clang-tidy.py script requires the following additional package:" - elog " dev-python/pyyaml" - fi -} - -pkg_postrm() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow clean all - fi -} diff --git a/sys-devel/clang/clang-17.0.6.ebuild b/sys-devel/clang/clang-17.0.6.ebuild deleted file mode 100644 index 71d4d04a4823..000000000000 --- a/sys-devel/clang/clang-17.0.6.ebuild +++ /dev/null @@ -1,474 +0,0 @@ -# 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 llvm.org 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}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -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} - doc? ( $(python_gen_cond_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - xml? ( virtual/pkgconfig ) -" -PDEPEND=" - ~sys-devel/clang-runtime-${PV} - sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} -" - -LLVM_COMPONENTS=( - clang clang-tools-extra cmake - llvm/lib/Transforms/Hello -) -LLVM_MANPAGES=1 -LLVM_PATCHSET=${PV}-r1 -LLVM_TEST_COMPONENTS=( - llvm/utils -) -LLVM_USE_TARGETS=llvm -llvm.org_set_globals - -# Multilib notes: -# 1. ABI_* flags control ABIs libclang* is built for only. -# 2. clang is always capable of compiling code for all ABIs for enabled -# target. However, you will need appropriate crt* files (installed -# e.g. by sys-devel/gcc and sys-libs/glibc). -# 3. ${CHOST}-clang wrappers are always installed for all ABIs included -# in the current profile (i.e. alike supported by sys-devel/gcc). -# -# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need -# multilib clang* libraries (not runtime, not wrappers). - -pkg_setup() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - python-single-r1_pkg_setup -} - -src_prepare() { - # create extra parent dir for relative CLANG_RESOURCE_DIR access - mkdir -p x/y || die - BUILD_DIR=${WORKDIR}/x/y/clang - - llvm.org_src_prepare - - # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) - eprefixify \ - lib/Lex/InitHeaderSearch.cpp \ - lib/Driver/ToolChains/Darwin.cpp || die - - if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then - sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die - fi -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # meta-targets - clang-libraries|distribution) - continue - ;; - # tools - clang|clangd|clang-*) - ;; - # static libraries - clang*|findAllSymbols) - continue - ;; - # conditional to USE=doc - docs-clang-html|docs-clang-tools-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(${NINJA} -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # common stuff - clang-cmake-exports - clang-headers - clang-resource-headers - libclang-headers - - aarch64-resource-headers - arm-common-resource-headers - arm-resource-headers - core-resource-headers - cuda-resource-headers - hexagon-resource-headers - hip-resource-headers - hlsl-resource-headers - mips-resource-headers - opencl-resource-headers - openmp-resource-headers - ppc-htm-resource-headers - ppc-resource-headers - riscv-resource-headers - systemz-resource-headers - utility-resource-headers - ve-resource-headers - webassembly-resource-headers - windows-resource-headers - x86-resource-headers - - # libs - clang-cpp - libclang - ) - - if multilib_is_native_abi; then - out+=( - # common stuff - bash-autocomplete - libclang-python-bindings - - # tools - amdgpu-arch - c-index-test - clang - clang-format - clang-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() { - 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/clang/clang-18.1.8.ebuild b/sys-devel/clang/clang-18.1.8.ebuild deleted file mode 100644 index 0dad629e1672..000000000000 --- a/sys-devel/clang/clang-18.1.8.ebuild +++ /dev/null @@ -1,476 +0,0 @@ -# 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}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" -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/clang/clang-19.1.1.ebuild b/sys-devel/clang/clang-19.1.1.ebuild deleted file mode 100644 index 2d7aae85f170..000000000000 --- a/sys-devel/clang/clang-19.1.1.ebuild +++ /dev/null @@ -1,465 +0,0 @@ -# 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}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos" -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-nvlink-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 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/clang/clang-20.0.0.9999.ebuild b/sys-devel/clang/clang-20.0.0.9999.ebuild deleted file mode 100644 index cad701817a80..000000000000 --- a/sys-devel/clang/clang-20.0.0.9999.ebuild +++ /dev/null @@ -1,463 +0,0 @@ -# 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 - eerror "get_distribution_components() is outdated!" - eerror " Add: ${add[*]}" - eerror "Remove: ${remove[*]}" - die "Update get_distribution_components()!" - 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-nvlink-wrapper - clang-offload-bundler - clang-offload-packager - clang-refactor - clang-repl - 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-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 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/clang/clang-20.0.0_pre20240924.ebuild b/sys-devel/clang/clang-20.0.0_pre20240924.ebuild deleted file mode 100644 index e0aabafeccdc..000000000000 --- a/sys-devel/clang/clang-20.0.0_pre20240924.ebuild +++ /dev/null @@ -1,466 +0,0 @@ -# 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 - - # https://github.com/llvm/llvm-project/pull/109306#issuecomment-2370570394 - sed -i -e '/vt_gen/d' lib/CodeGen/CMakeLists.txt || die -} - -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 - eerror "get_distribution_components() is outdated!" - eerror " Add: ${add[*]}" - eerror "Remove: ${remove[*]}" - die "Update get_distribution_components()!" - 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-nvlink-wrapper - clang-offload-bundler - clang-offload-packager - clang-refactor - clang-repl - 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-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 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/clang/clang-20.0.0_pre20241004.ebuild b/sys-devel/clang/clang-20.0.0_pre20241004.ebuild deleted file mode 100644 index cad701817a80..000000000000 --- a/sys-devel/clang/clang-20.0.0_pre20241004.ebuild +++ /dev/null @@ -1,463 +0,0 @@ -# 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 - eerror "get_distribution_components() is outdated!" - eerror " Add: ${add[*]}" - eerror "Remove: ${remove[*]}" - die "Update get_distribution_components()!" - 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-nvlink-wrapper - clang-offload-bundler - clang-offload-packager - clang-refactor - clang-repl - 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-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 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/clang/clang-20.0.0_pre20241009.ebuild b/sys-devel/clang/clang-20.0.0_pre20241009.ebuild deleted file mode 100644 index cad701817a80..000000000000 --- a/sys-devel/clang/clang-20.0.0_pre20241009.ebuild +++ /dev/null @@ -1,463 +0,0 @@ -# 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 - eerror "get_distribution_components() is outdated!" - eerror " Add: ${add[*]}" - eerror "Remove: ${remove[*]}" - die "Update get_distribution_components()!" - 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-nvlink-wrapper - clang-offload-bundler - clang-offload-packager - clang-refactor - clang-repl - 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-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 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/clang/metadata.xml b/sys-devel/clang/metadata.xml deleted file mode 100644 index 07d06647c9a6..000000000000 --- a/sys-devel/clang/metadata.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <longdescription>The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler. - -Features and Goals - -Some of the goals for the project include the following: - -End-User Features: -Fast compiles and low memory use -Expressive diagnostics -GCC compatibility -Utility and Applications: - -Modular library based architecture -Support diverse clients (refactoring, static analysis, code generation, etc) -Allow tight integration with IDEs -Use the LLVM BSD License -Internal Design and Implementation: - -A real-world, production quality compiler -A simple and hackable code base -A single unified parser for C, Objective C, C++, and Objective C++ -Conformance with C/C++/ObjC and their variants</longdescription> - <use> - <flag name="extra">Build extra tools (clangd, clang-tidy and a few more)</flag> - <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag> - <flag name="static-analyzer">Install the Clang static analyzer</flag> - </use> - <upstream> - <remote-id type="github">llvm/llvm-project</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/cproc/metadata.xml b/sys-devel/cproc/metadata.xml index 507ef71566c5..346739892492 100644 --- a/sys-devel/cproc/metadata.xml +++ b/sys-devel/cproc/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> <email>contact@hacktivis.me</email> diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest index 24194323ded0..14cb96bf2262 100644 --- a/sys-devel/crossdev/Manifest +++ b/sys-devel/crossdev/Manifest @@ -1,3 +1,2 @@ -DIST crossdev-20240209.tar.xz 30904 BLAKE2B b23c6c86796ce37968ce23a9399b068ecb78d6beb8e9b02ac11cd9e8b2f1c82f8905e615417525aa94d51f5da763841a8b9fc7cdc9b64d087a52b077adc92635 SHA512 5834cad934707f173529d7258f8230222e8d18903dea723b0051e06a8d974cab92f6aa7bbeef3a64aec0efd2d0b01f80b63503e78e30ddc1ba7e9a6a4ff08977 -DIST crossdev-20240702.tar.xz 31072 BLAKE2B a8c847490a89f86016adc0b33551ecdb91776e495c1b8fa03dccf70a35164b44b4a948cd9d7166ea1650207e71462633118b02da80cda403798e96b606faf10e SHA512 c9a836a2ce8e82c383693bc71e3094a2586577dc725f05092272023a6c70b5ded315055dc5961cbe0935ed0f4307e08e8551dda595f27b1ff34aa10a3b8bf3eb DIST crossdev-20240921.tar.xz 31008 BLAKE2B 9daeabcbeefa32624d71b86c5ddeb1f6bf6ccdf4e6f590bf7517388d4d68b73ae2651ca09d122f128f002568127bd5d7d767db9d6c043e5330b62c3104929848 SHA512 6b7f0bce309d2b0a8fdf9b28cf72098de9dafaf7f338a8308e94e2068cefc15cd2407eee39a9eeb0ea0a1bc46569cedc69a51bb01f140faebe374b660cb1cdf6 +DIST crossdev-20241202.tar.xz 33032 BLAKE2B 74ec859e1ae5f816397349c18f8bd98d8fae2f4de471112d70621767733a6c91dfffaabb33afc4bdabf5bed31b83a0cdf8afaffaba3e0df95f70d43cf249fb94 SHA512 c6a8c534135aa15b2005546d3f006953570de1e54ae3d3170c71bed62f044c2db79412ecde3b91fd85fca92e7c996762ba086db29c6132f6f1d9e9a48f1e79ea diff --git a/sys-devel/crossdev/crossdev-20240702.ebuild b/sys-devel/crossdev/crossdev-20240702.ebuild deleted file mode 100644 index 9716da6e3bad..000000000000 --- a/sys-devel/crossdev/crossdev-20240702.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -if [[ ${PV} == "99999999" ]] ; then - inherit git-r3 - EGIT_REPO_URI=" - https://anongit.gentoo.org/git/proj/crossdev.git - https://github.com/gentoo/crossdev - " -else - SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -DESCRIPTION="Gentoo Cross-toolchain generator" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev" - -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=" - >=sys-apps/portage-2.1 - app-shells/bash - sys-apps/gentoo-functions - sys-apps/config-site -" -BDEPEND="app-arch/xz-utils" - -src_install() { - default - - if [[ ${PV} == "99999999" ]] ; then - sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die - fi - - dodir /usr/share/config.site.d - mv "${ED}"/usr/share/config.site{,.d/80crossdev.conf} || die -} diff --git a/sys-devel/crossdev/crossdev-20240921.ebuild b/sys-devel/crossdev/crossdev-20240921.ebuild index ed64781cb1ab..b30e03973fbc 100644 --- a/sys-devel/crossdev/crossdev-20240921.ebuild +++ b/sys-devel/crossdev/crossdev-20240921.ebuild @@ -11,7 +11,7 @@ if [[ ${PV} == "99999999" ]] ; then " else SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="Gentoo Cross-toolchain generator" diff --git a/sys-devel/crossdev/crossdev-20240209.ebuild b/sys-devel/crossdev/crossdev-20241202.ebuild index 0816efdb99d9..6b9cf4e9bc85 100644 --- a/sys-devel/crossdev/crossdev-20240209.ebuild +++ b/sys-devel/crossdev/crossdev-20241202.ebuild @@ -11,7 +11,7 @@ if [[ ${PV} == "99999999" ]] ; then " else SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="Gentoo Cross-toolchain generator" diff --git a/sys-devel/distcc/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild deleted file mode 100644 index f5a660195bc6..000000000000 --- a/sys-devel/distcc/distcc-3.4-r1.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit autotools flag-o-matic prefix python-single-r1 systemd - -DESCRIPTION="Distribute compilation of C code across several machines on a network" -HOMEPAGE="https://github.com/distcc/distcc" -SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - dev-libs/popt - gssapi? ( net-libs/libgssglue ) - gtk? ( x11-libs/gtk+:3 ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) -" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" -BDEPEND=" - dev-build/autoconf-archive - virtual/pkgconfig" -RDEPEND+=" - acct-user/distcc - dev-util/shadowman - >=sys-devel/gcc-config-1.4.1 - selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" - -src_prepare() { - eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" - # SOCKSv5 support needed for Portage, bug #537616 - eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" - eapply_user - - # Bugs #120001, #167844 and probably more. See patch for description. - use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - - sed \ - -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die - - # TODO: gdb tests fail due to gdb failing to find .c file - sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die - - hprefixify update-distcc-symlinks.py src/{serve,daemon}.c - python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" - eautoreconf -} - -src_configure() { - # https://github.com/distcc/distcc/issues/454 - append-cppflags -DPY_SSIZE_T_CLEAN - - local myconf=( - --disable-Werror - --libdir="${EPREFIX}"/usr/lib - $(use_enable ipv6 rfc2553) - $(use_with gtk) - --without-gnome - $(use_with gssapi auth) - $(use_with zeroconf avahi) - ) - - econf "${myconf[@]}" -} - -src_test() { - # sandbox breaks some tests, and hangs some too - # retest once #590084 is fixed - local -x SANDBOX_ON=0 - emake -j1 check -} - -src_install() { - # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install - python_optimize - - newinitd "${FILESDIR}/distccd.initd" distccd - systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service - systemd_install_serviced "${FILESDIR}/distccd.service.conf" - - cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die - if use zeroconf; then - cat >> "${T}/distccd" <<-EOF || die - - # Enable zeroconf support in distccd - DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" - EOF - - sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die - fi - doconfd "${T}/distccd" - - newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" - EOF - - keepdir /usr/lib/distcc - - dobin "${T}/distcc-config" - - if use gtk; then - einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui" - einfo "This is to have a little sensability in naming schemes between distccmon programs" - mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die - dosym distccmon-gui /usr/bin/distccmon-gnome - fi - - if use xinetd; then - insinto /etc/xinetd.d - newins "doc/example/xinetd" distcc - fi - - insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - newins - distccd <<<"${EPREFIX}/usr/lib/distcc" - - rm -r "${ED}/etc/default" || die - rm "${ED}/etc/distcc/clients.allow" || die - rm "${ED}/etc/distcc/commands.allow.sh" || die -} - -pkg_postinst() { - # remove the old paths when switching from libXX to lib - if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ - -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then - rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die - fi - - if [[ -z ${ROOT} ]]; then - eselect compiler-shadow update distcc - eselect compiler-shadow update distccd - fi - - elog - elog "Tips on using distcc with Gentoo can be found at" - elog "https://wiki.gentoo.org/wiki/Distcc" - elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." - elog - elog "To use the distccmon programs with Gentoo you should use this command:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" - - if use gtk; then - elog "Or:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" - fi -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then - eselect compiler-shadow remove distcc - fi -} diff --git a/sys-devel/distcc/distcc-3.4-r2.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild deleted file mode 100644 index a0a3b7ca7ef5..000000000000 --- a/sys-devel/distcc/distcc-3.4-r2.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit autotools flag-o-matic prefix python-single-r1 systemd - -DESCRIPTION="Distribute compilation of C code across several machines on a network" -HOMEPAGE="https://github.com/distcc/distcc" -SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - dev-libs/popt - gssapi? ( net-libs/libgssglue ) - gtk? ( x11-libs/gtk+:3 ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) -" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" -BDEPEND=" - dev-build/autoconf-archive - virtual/pkgconfig" -RDEPEND+=" - acct-user/distcc - dev-util/shadowman - >=sys-devel/gcc-config-1.4.1 - selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" - -src_prepare() { - eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" - # SOCKSv5 support needed for Portage, bug #537616 - eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" - eapply "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch" - eapply_user - - # Bugs #120001, #167844 and probably more. See patch for description. - use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - - sed \ - -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die - - # TODO: gdb tests fail due to gdb failing to find .c file - sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die - - hprefixify update-distcc-symlinks.py src/{serve,daemon}.c - python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" - eautoreconf -} - -src_configure() { - # https://github.com/distcc/distcc/issues/454 - append-cppflags -DPY_SSIZE_T_CLEAN - - local myconf=( - --disable-Werror - --libdir="${EPREFIX}"/usr/lib - $(use_enable ipv6 rfc2553) - $(use_with gtk) - --without-gnome - $(use_with gssapi auth) - $(use_with zeroconf avahi) - ) - - econf "${myconf[@]}" -} - -src_test() { - # sandbox breaks some tests, and hangs some too - # retest once #590084 is fixed - local -x SANDBOX_ON=0 - emake -j1 check -} - -src_install() { - # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install - python_optimize - - newinitd "${FILESDIR}/distccd.initd" distccd - systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service - systemd_install_serviced "${FILESDIR}/distccd.service.conf" - - cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die - if use zeroconf; then - cat >> "${T}/distccd" <<-EOF || die - - # Enable zeroconf support in distccd - DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" - EOF - - sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die - fi - doconfd "${T}/distccd" - - newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" - EOF - - keepdir /usr/lib/distcc - - dobin "${T}/distcc-config" - - if use gtk; then - einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui" - einfo "This is to have a little sensability in naming schemes between distccmon programs" - mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die - dosym distccmon-gui /usr/bin/distccmon-gnome - fi - - if use xinetd; then - insinto /etc/xinetd.d - newins "doc/example/xinetd" distcc - fi - - insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - newins - distccd <<<"${EPREFIX}/usr/lib/distcc" - - rm -r "${ED}/etc/default" || die - rm "${ED}/etc/distcc/clients.allow" || die - rm "${ED}/etc/distcc/commands.allow.sh" || die -} - -pkg_postinst() { - # remove the old paths when switching from libXX to lib - if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ - -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then - rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die - fi - - if [[ -z ${ROOT} ]]; then - eselect compiler-shadow update distcc - eselect compiler-shadow update distccd - fi - - elog - elog "Tips on using distcc with Gentoo can be found at" - elog "https://wiki.gentoo.org/wiki/Distcc" - elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." - elog - elog "To use the distccmon programs with Gentoo you should use this command:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" - - if use gtk; then - elog "Or:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" - fi -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then - eselect compiler-shadow remove distcc - fi -} diff --git a/sys-devel/distcc/distcc-3.4-r3.ebuild b/sys-devel/distcc/distcc-3.4-r6.ebuild index d00fc2bed616..0fd22a9a78e8 100644 --- a/sys-devel/distcc/distcc-3.4-r3.ebuild +++ b/sys-devel/distcc/distcc-3.4-r6.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit autotools flag-o-matic prefix python-single-r1 systemd @@ -17,29 +17,34 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~ IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RDEPEND="${PYTHON_DEPS} +RDEPEND=" + ${PYTHON_DEPS} dev-libs/popt gssapi? ( net-libs/libgssglue ) gtk? ( x11-libs/gtk+:3 ) zeroconf? ( >=net-dns/avahi-0.6[dbus] ) " -DEPEND="${RDEPEND} - sys-libs/binutils-libs" +DEPEND=" + ${RDEPEND} + sys-libs/binutils-libs +" BDEPEND=" + ${PYTHON_DEPS} dev-build/autoconf-archive - virtual/pkgconfig" + virtual/pkgconfig +" RDEPEND+=" acct-user/distcc - dev-util/shadowman + >=dev-util/shadowman-4 >=sys-devel/gcc-config-1.4.1 selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" + xinetd? ( sys-apps/xinetd ) +" PATCHES=( "${FILESDIR}/${PN}-3.0-xinetd.patch" # SOCKSv5 support needed for Portage, bug #537616 "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - "${FILESDIR}/${PN}-3.4-pump-tests.patch" "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch" "${FILESDIR}/${P}-rewrite-chost.patch" ) @@ -50,15 +55,9 @@ src_prepare() { # Bugs #120001, #167844 and probably more. See patch for description. use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - sed \ -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die + "${FILESDIR}/distcc-config-r1" > "${T}/distcc-config" || die # TODO: gdb tests fail due to gdb failing to find .c file sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die @@ -80,21 +79,30 @@ src_configure() { --without-gnome $(use_with gssapi auth) $(use_with zeroconf avahi) + + # NB: we can't pass --disable-pump-mode as it disables Python + # detection; we instead hack it out below ) econf "${myconf[@]}" } +src_compile() { + # override PYTHON= to prevent setup.py from running + emake PYTHON= +} + src_test() { # sandbox breaks some tests, and hangs some too # retest once #590084 is fixed local -x SANDBOX_ON=0 - emake -j1 check + # run the main test suite directly to skip pump tests + emake -j1 distcc-maintainer-check } src_install() { # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install + emake -j1 DESTDIR="${D}" GZIP_BIN=false PYTHON= install python_optimize newinitd "${FILESDIR}/distccd.initd" distccd @@ -114,16 +122,16 @@ src_install() { doconfd "${T}/distccd" newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" + # This file is managed by distcc-config; use it to change these settings. + # DISTCC_LOG and DISTCC_DIR should not be set. + DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" + DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" + DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" + DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" + DISTCC_SSH="${DISTCC_SSH}" + UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" + DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" + DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" EOF keepdir /usr/lib/distcc @@ -143,14 +151,21 @@ src_install() { fi insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - newins - distccd <<<"${EPREFIX}/usr/lib/distcc" + newins - distcc <<<"${EPREFIX}/usr/lib/distcc" rm -r "${ED}/etc/default" || die rm "${ED}/etc/distcc/clients.allow" || die rm "${ED}/etc/distcc/commands.allow.sh" || die } +pkg_preinst() { + # Compatibility symlink for Portage + dosym . /usr/lib/distcc/bin + if [[ -e ${EROOT}/usr/lib/distcc/bin && ! -L ${EROOT}/usr/lib/distcc/bin ]]; then + rm -rf "${EROOT}"/usr/lib/distcc/bin || die + fi +} + pkg_postinst() { # remove the old paths when switching from libXX to lib if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ @@ -160,15 +175,13 @@ pkg_postinst() { if [[ -z ${ROOT} ]]; then eselect compiler-shadow update distcc - eselect compiler-shadow update distccd fi elog elog "Tips on using distcc with Gentoo can be found at" elog "https://wiki.gentoo.org/wiki/Distcc" elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." + elog "distcc-pump is broken and no longer installed." elog elog "To use the distccmon programs with Gentoo you should use this command:" elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" diff --git a/sys-devel/distcc/files/distcc-3.4-pump-tests.patch b/sys-devel/distcc/files/distcc-3.4-pump-tests.patch deleted file mode 100644 index db392b7f3632..000000000000 --- a/sys-devel/distcc/files/distcc-3.4-pump-tests.patch +++ /dev/null @@ -1,153 +0,0 @@ -https://github.com/distcc/distcc/pull/460 - -From 45d9c4a1ef66451ed45a6afdec7098ed02082390 Mon Sep 17 00:00:00 2001 -From: Rosen Matev <rosen.matev@cern.ch> -Date: Fri, 29 Apr 2022 15:42:28 +0200 -Subject: [PATCH] Fix tests in pump mode - -`make check` is also running tests for the pump mode -(`pump-maintainer-check` target) but they were all falling back to -the usual preprocessor mode as the include server was not started. - -This is solved by prepending `pump` to the distcc invocations and -also some trivially failing tests are fixed or disabled when they -make no sense in pump mode. ---- - Makefile.in | 2 +- - pump.in | 13 +++++++++++-- - test/testdistcc.py | 28 ++++++++++++++++++++++++---- - 3 files changed, 36 insertions(+), 7 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index f240ca6f..79e28380 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -583,7 +583,7 @@ distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj) - # the distcc version, the source location, the CPP flags (for location of the - # includes), and the build location. - include-server: -- if test -z "$(PYTHON)"; then \ -+ @if test -z "$(PYTHON)"; then \ - echo "Not building $@: No suitable python found"; \ - else \ - mkdir -p "$(include_server_builddir)" && \ -diff --git a/pump.in b/pump.in -index 8e46f458..08a32c0e 100755 ---- a/pump.in -+++ b/pump.in -@@ -218,7 +218,9 @@ PrintIncludeServerStatusMessage() { - } - - Announce() { -- echo "__________Using distcc-pump from $DISTCC_LOCATION" -+ if [ "$verbose" = 1 ]; then -+ echo "__________Using distcc-pump from $DISTCC_LOCATION" -+ fi - } - - # Starts up the include server. Sets $socket, $socket_dir, and -@@ -359,7 +361,9 @@ ShutDown() { - # Always -- at exit -- shut down include_server and remove $socket_dir - if [ -n "$include_server_pid" ] && \ - ps -p "$include_server_pid" > /dev/null; then -- echo '__________Shutting down distcc-pump include server' -+ if [ "$verbose" = 1 ]; then -+ echo '__________Shutting down distcc-pump include server' -+ fi - kill $include_server_pid - # Wait until it's really dead. We need to do this because the - # include server may produce output after receiving SIGTERM. -@@ -508,6 +512,11 @@ Main() { - - Initialize - -+ # Do not write on stdout if we're testing pump mode -+ if [ "0$DISTCC_TESTING_INCLUDE_SERVER" -ne "0" ]; then -+ verbose=0 -+ fi -+ - case "$*" in - --startup) - # Don't put ordinary progress messages on stdout, -diff --git a/test/testdistcc.py b/test/testdistcc.py -index dfdf2f13..6377d0b6 100755 ---- a/test/testdistcc.py -+++ b/test/testdistcc.py -@@ -258,7 +258,11 @@ def valgrind(self): - return _valgrind_command; - - def distcc(self): -- return self.valgrind() + "distcc " -+ if "cpp" not in _server_options: -+ return self.valgrind() + "distcc " -+ else: -+ return "DISTCC_TESTING_INCLUDE_SERVER=1 " + self.valgrind() + "pump distcc " -+ - - def distccd(self): - return self.valgrind() + "distccd " -@@ -422,6 +426,11 @@ class BogusOption_Case(SimpleDistCC_Case): - Now that we support implicit compilers, this is passed to gcc, - which returns a non-zero status.""" - def runtest(self): -+ # Disable the test in pump mode since the pump wrapper fails -+ # before we can run distcc. -+ if "cpp" in _server_options: -+ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') -+ - error_rc, _, _ = self.runcmd_unchecked(self._cc + " --bogus-option") - assert error_rc != 0 - self.runcmd(self.distcc() + self._cc + " --bogus-option", error_rc) -@@ -432,7 +441,7 @@ def runtest(self): - class CompilerOptionsPassed_Case(SimpleDistCC_Case): - """Test that options following the compiler name are passed to the compiler.""" - def runtest(self): -- out, err = self.runcmd("DISTCC_HOSTS=localhost " -+ out, err = self.runcmd("DISTCC_HOSTS=localhost%s " % _server_options - + self.distcc() - + self._cc + " --help") - if re.search('distcc', out): -@@ -1422,7 +1431,8 @@ def source(self): - - def setupEnv(self): - Compilation_Case.setupEnv(self) -- os.environ['DISTCC_HOSTS'] = '127.0.0.1:%d,lzo' % self.server_port -+ os.environ['DISTCC_HOSTS'] = ( -+ '127.0.0.1:%d,lzo' % self.server_port + _server_options) - - class DashONoSpace_Case(CompileHello_Case): - def compileCmd(self): -@@ -1525,6 +1535,11 @@ def source(self): - """ - - def runtest(self): -+ # Disable the test in pump mode since the pump wrapper fails -+ # before we can run distcc. -+ if "cpp" in _server_options: -+ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') -+ - # -P means not to emit linemarkers - self.runcmd(self.distcc() - + self._cc + " -E testtmp.c -o testtmp.out") -@@ -1828,7 +1843,7 @@ class NoServer_Case(CompileHello_Case): - """Invalid server name""" - def setup(self): - self.stripEnvironment() -- os.environ['DISTCC_HOSTS'] = 'no.such.host.here' -+ os.environ['DISTCC_HOSTS'] = 'no.such.host.here' + _server_options - self.distcc_log = 'distcc.log' - os.environ['DISTCC_LOG'] = self.distcc_log - self.createSource() -@@ -1874,6 +1889,11 @@ class NoHosts_Case(CompileHello_Case): - We expect compilation to succeed, but with a warning that it was - run locally.""" - def runtest(self): -+ # Disable the test in pump mode since the pump wrapper fails -+ # before we can run distcc. -+ if "cpp" in _server_options: -+ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') -+ - # WithDaemon_Case sets this to point to the local host, but we - # don't want that. Note that you cannot delete environment - # keys in Python1.5, so we need to just set them to the empty - diff --git a/sys-devel/distcc/files/distcc-config-r1 b/sys-devel/distcc/files/distcc-config-r1 new file mode 100644 index 000000000000..e58a173f9d2e --- /dev/null +++ b/sys-devel/distcc/files/distcc-config-r1 @@ -0,0 +1,180 @@ +#!/usr/bin/env python +# Copyright 2003-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +import os, re, signal, subprocess, sys + +options=[ + '--get-hosts', + '--set-hosts', + '--get-verbose', + '--set-verbose', + '--get-log', + '--set-log', + '--update-masquerade', + '--update-masquerade-with-crossdev', + '--help', + '--get-env', + '--set-env' +] + +tmpcmdline=sys.argv[1:] +cmdline=[] + +eprefix = '@EPREFIX@' +bindir = os.path.join(eprefix, 'usr', 'bin') +sbindir = os.path.join(eprefix, 'usr', 'sbin') +libdir = os.path.join(eprefix, 'usr', 'lib') +sysconfdir = os.path.join(eprefix, 'etc') + +gcc_config = os.path.join(bindir, 'gcc-config') +env_update = os.path.join(sbindir, 'env-update') +envfile = os.path.join(sysconfdir, 'env.d', '02distcc') +default_distcc_dir = os.path.join(sysconfdir, 'distcc') +hostfile = os.path.join(default_distcc_dir, 'hosts') +distcc_path = os.path.join(bindir, 'distcc') +dccc_dir = os.path.join(libdir, 'distcc') + +def exithandler(foo,bar): + os.kill(0,signal.SIGKILL) + sys.exit(1) + +signal.signal(signal.SIGINT,exithandler) + +def isroot(ret=0): + if os.getuid() != 0: + if ret == 0: + print('!!! %s %s must be run as root' % (sys.argv[:1][0],tmpcmdline[0])) + sys.exit(1) + else: + retval = 0 + else: + retval = 1 + return retval + +def writeenv(var,value): + isroot() + distcc_env = [] + distcc_env = open(envfile, 'r').readlines() + distcc_env_new = open(envfile, 'w') + for i in range(len(distcc_env)): + if re.compile(var+'="(.*)"').match(distcc_env[i]): + distcc_env[i] = var+'="'+value+'"\n' + distcc_env_new.write(distcc_env[i]) + #print('Set %s to: %s ' % (var,value)) + subprocess.Popen(env_update, shell=True) + print('If you want to use these new settings in an existing shell,') + print('you need to "source /etc/profile" to get the changes.') + +def readenv(var): + distcc_env = open(envfile, 'r').read() + match = re.compile(var+'="(.*)"').search(distcc_env) + if match: + print(var+'='+match.group(1)) + else: + print(var,'not set.') + +def installlink(chost='', version=''): + for file in ['gcc', 'cc', 'c++', 'g++']: + if not chost == '': + file = '%s-%s' % (chost,file) + if not version == '': + file = '%s-%s' % (file,version) + path = os.path.join(dccc_dir,file) + if os.path.exists(os.path.join(bindir,file)): + if not os.path.exists(path): + print('Creating %s symlink...' % (path)) + os.symlink(distcc_path,path) + #else: + # print('Already exists. Skipping...') + +def installlinks(): + p = subprocess.Popen([gcc_config+" -C -l"], shell=True, stdout=subprocess.PIPE) + lines = p.stdout.read().decode().rstrip().split('\n') + for line in lines: + columns = line.split() + if len(columns) >= 2: + matches = re.match("(.*)-(.*)", columns[1]) + chost = matches.group(1) + version = matches.group(2) + installlink(chost) + installlink(chost, version) + +def uninstalllinks(): + for root, dirs, files in os.walk(dccc_dir): + for file in files: + os.remove(os.path.join(root, file)) + +def createdistccdir(dir): + if not os.path.exists(dir): + os.mkdir(dir) + os.chmod(dir, 0o755) + +for x in tmpcmdline: + if not x: + continue + if x[0:2]=="--": + if not x in options: + print("!!! Error: %s is an invalid option." % (x)) + sys.exit(1) + else: + cmdline = x + +if '--get-hosts' in tmpcmdline: + HOSTS_ENV = os.environ.get('DISTCC_HOSTS') + HOSTS_HOME = os.path.join(os.environ.get('HOME'), '.distcc', 'hosts') + if HOSTS_ENV: + print(HOSTS_ENV) + elif os.path.isfile(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0: + print(HOSTS_HOME) + elif os.path.exists(hostfile): + print(open(hostfile, 'r').read().rstrip()) + else: + print('No configuration file found. Setup your hosts with --set-hosts.') +elif '--set-hosts' in tmpcmdline: + if isroot(1): + PATH = default_distcc_dir + else: + PATH = os.path.join(os.environ.get('HOME'), '.distcc') + createdistccdir(PATH) + open(os.path.join(PATH, 'hosts'), 'w').write(cmdline + '\n') +elif '--get-verbose' in tmpcmdline: + readenv('DISTCC_VERBOSE') +elif '--set-verbose' in tmpcmdline: + writeenv('DISTCC_VERBOSE',tmpcmdline[1]) +elif '--get-log' in tmpcmdline: + readenv('DISTCC_LOG') +elif '--set-log' in tmpcmdline: + writeenv('DISTCC_LOG',tmpcmdline[1]) +elif '--update-masquerade' in tmpcmdline: + isroot() + uninstalllinks() + print('Creating symlinks...') + installlink() + installlinks() +elif '--update-masquerade-with-crossdev' in tmpcmdline: + isroot() + uninstalllinks() + print('Creating symlinks...') + installlinks() +elif '--get-env' in tmpcmdline: + if len(tmpcmdline) == 1: + print(open(envfile, 'r').read().rstrip()) + elif len(tmpcmdline) == 2: + readenv(tmpcmdline[1]) + else: + print('!!! Error: Specify only one variable.') +elif '--set-env' in tmpcmdline: + if len(tmpcmdline) > 2 and len(tmpcmdline) <= 3: + isroot() + writeenv(tmpcmdline[1],tmpcmdline[2]) + else: + print('!!! Error: Awaiting two parameters.') +else: + cmd = sys.argv[:1][0] + print('Usage: %s --set-hosts DISTCC_HOSTS | --get-hosts' % (cmd)) + print(' %s --set-verbose { 0 | 1 } | --get-verbose' % (cmd)) + print(' %s --set-log FILE | --get-log' % (cmd)) + print(' %s --set-env VARIABLE VALUE | --get-env [VARIABLE]' % (cmd)) + print(' %s --update-masquerade' % (cmd)) + print(' %s --update-masquerade-with-crossdev' % (cmd)) diff --git a/sys-devel/dwz/dwz-0.15-r2.ebuild b/sys-devel/dwz/dwz-0.15-r2.ebuild new file mode 100644 index 000000000000..09e446237df4 --- /dev/null +++ b/sys-devel/dwz/dwz-0.15-r2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="DWARF optimization and duplicate removal tool" +HOMEPAGE="https://sourceware.org/dwz" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://sourceware.org/git/dwz.git" + inherit git-r3 +else + SRC_URI="https://sourceware.org/ftp/dwz/releases/${P}.tar.xz" + S="${WORKDIR}/${PN}" + + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="GPL-2+ GPL-3+" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/elfutils + dev-libs/xxhash +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-debug/gdb + dev-libs/elfutils[utils] + dev-util/dejagnu + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-gdb-15.patch +) + +src_prepare() { + default + tc-export CC +} + +src_compile() { + emake CFLAGS="${CFLAGS}" srcdir="${S}" +} + +src_test() { + emake CFLAGS="${CFLAGS}" srcdir="${S}" check +} + +src_install() { + emake DESTDIR="${D}" CFLAGS="${CFLAGS}" srcdir="${S}" install +} diff --git a/sys-devel/dwz/dwz-0.15-r3.ebuild b/sys-devel/dwz/dwz-0.15-r3.ebuild new file mode 100644 index 000000000000..c3edf6b147e7 --- /dev/null +++ b/sys-devel/dwz/dwz-0.15-r3.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="DWARF optimization and duplicate removal tool" +HOMEPAGE="https://sourceware.org/dwz" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://sourceware.org/git/dwz.git" + inherit git-r3 +else + SRC_URI="https://sourceware.org/ftp/dwz/releases/${P}.tar.xz" + S="${WORKDIR}/${PN}" + + #KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +fi + +LICENSE="GPL-2+ GPL-3+" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/elfutils + dev-libs/xxhash + elibc_musl? ( + sys-libs/error-standalone + sys-libs/obstack-standalone + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-debug/gdb + dev-libs/elfutils[utils] + dev-util/dejagnu + ) + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-gdb-15.patch + "${FILESDIR}"/${P}-readelf.patch +) + +src_prepare() { + default + tc-export CC +} + +src_compile() { + tc-export PKG_CONFIG + + export LIBS="-lelf" + if use elibc_musl; then + export CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags obstack-standalone)" + export LIBS="${LIBS} $(${PKG_CONFIG} --libs obstack-standalone)" + fi + + emake CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}" +} + +src_test() { + emake CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}" check +} + +src_install() { + emake DESTDIR="${D}" CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}" install +} diff --git a/sys-devel/dwz/files/dwz-0.15-gdb-15.patch b/sys-devel/dwz/files/dwz-0.15-gdb-15.patch new file mode 100644 index 000000000000..3d1754f37ddc --- /dev/null +++ b/sys-devel/dwz/files/dwz-0.15-gdb-15.patch @@ -0,0 +1,369 @@ +https://sourceware.org/git/?p=dwz.git;a=commit;h=1ae37f476bc6c9f7a756fee4830766f03600866c + +From 1ae37f476bc6c9f7a756fee4830766f03600866c Mon Sep 17 00:00:00 2001 +From: Mark Wielaard <mark@klomp.org> +Date: Wed, 2 Oct 2024 23:20:57 +0200 +Subject: [PATCH] Add support for version 9 .gdb_index + +Version 9 .gdb_index adds a new shortcut table. The table itself is +just two offset_type values (2 * 4 bytes) describing the language of +the main function expresses as an DW_LANG_ constant and the offset of +the main function's name in the constant pool. + +The offset to the shortcut table in the header is between the symbol +table and constant pool offsets. + +write_gdb_index explicitly copies the function's name into the new +constant pool (if lang is not zero) because it might not be an offset +to an existing name of a symbol. + +Some extra checks and warnings have been added to let the user know +when parsing the .gdb_index fails. Add a const char *file argument to +write_gdb_index for better error reporting. + +Add -D_GNU_SOURCE to Makefile CFLAGS_COMMON to use memrchr. + +This fixes the gdb-add-index.sh testcase with gdb 15+. + +https://sourceware.org/PR32146 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ CFLAGS = -O2 -g + DWZ_VERSION := $(shell cat $(srcdir)/VERSION) + CFLAGS_VERSION = -DDWZ_VERSION='"$(DWZ_VERSION)"' + CFLAGS_COPYRIGHT = $(shell cat $(srcdir)/COPYRIGHT_YEARS) +-CFLAGS_COMMON = -Wall -W -D_FILE_OFFSET_BITS=64 ++CFLAGS_COMMON = -Wall -W -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + XXH_PROG = "\#define XXH_INLINE_ALL 1\n\#include <xxhash.h>\n" + XXH_INLINE_ALL_WORKS = $(shell printf $(XXH_PROG) \ + | $(CC) -xc -c - -o /dev/null 2>/dev/null \ +--- a/dwz.c ++++ b/dwz.c +@@ -1,6 +1,7 @@ + /* Copyright (C) 2001-2021 Red Hat, Inc. + Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2019-2021 SUSE LLC. ++ Copyright (C) 2024 Mark J. Wielaard <mark@klomp.org> + Written by Jakub Jelinek <jakub@redhat.com>, 2012. + + This program is free software; you can redistribute it and/or modify +@@ -13222,12 +13223,13 @@ gdb_index_tu_cmp (const void *p, const void *q) + /* Construct new .gdb_index section in malloced memory + if it needs adjustment. */ + static void +-write_gdb_index (void) ++write_gdb_index (const char *file) + { + dw_cu_ref cu, cu_next, first_tu = NULL; +- unsigned char *gdb_index, *ptr, *inptr, *end; ++ unsigned char *gdb_index, *ptr, *inptr, *end, *conststart; + unsigned int ncus = 0, npus = 0, ntus = 0, ndelcus = 0, ver; + unsigned int culistoff, cutypesoff, addressoff, symboloff, constoff; ++ unsigned int headersize, shortcutoff, nextoff; + unsigned int *tuindices = NULL, tuidx = 0, *cumap = NULL, i, j, k; + bool fail = false; + +@@ -13235,14 +13237,27 @@ write_gdb_index (void) + if (likely (!op_multifile) + && (debug_sections[GDB_INDEX].data == NULL + || debug_sections[GDB_INDEX].size < 0x18)) +- return; ++ { ++ if (file && debug_sections[GDB_INDEX].data != NULL) ++ error (0, 0, "%s: .gdb_index too small 0x%zx", file, ++ debug_sections[GDB_INDEX].size); ++ return; ++ } + inptr = (unsigned char *) debug_sections[GDB_INDEX].data; + if (unlikely (op_multifile)) + ver = multi_gdb_index_ver; + else + ver = buf_read_ule32 (inptr); +- if (ver < 4 || ver > 8) +- return; ++ if (ver < 4 || ver > 9) ++ { ++ if (file) ++ error (0, 0, "%s: Unknown .gdb_index section version 0x%x", file, ver); ++ return; ++ } ++ ++ /* Version 9 added a shortcut table offset (4 bytes) between the ++ address and symbol table offsets. */ ++ headersize = ver < 9 ? 0x18 : 0x1c; + + for (cu = first_cu; cu; cu = cu->cu_next) + if (cu->cu_kind == CU_PU) +@@ -13259,25 +13274,38 @@ write_gdb_index (void) + /* Starting with version 7 CU indexes are limited to 24 bits, + so if we have more CUs, give up. */ + if (npus + ncus + ntus - ndelcus >= (1U << 24)) +- return; ++ { ++ if (file) ++ error (0, 0, "%s: Cannot write %u CUs to .gdb_index", ++ file, npus + ncus + ntus - ndelcus); ++ return; ++ } + + if (unlikely (op_multifile)) + { + assert (ncus == 0 && ntus == 0); ++ /* Version 9 index contain an (empty) shortcut table of 2 32bit ++ entries (8 byte). */ + debug_sections[GDB_INDEX].new_size +- = 0x18 + npus * 16 + 16; ++ = headersize + npus * 16 + 16 + (ver >= 9 ? 8 : 0); + gdb_index = malloc (debug_sections[GDB_INDEX].new_size); + if (gdb_index == NULL) + dwz_oom (); + debug_sections[GDB_INDEX].new_data = gdb_index; + /* Write new header. */ + buf_write_le32 (gdb_index + 0x00, ver); +- buf_write_le32 (gdb_index + 0x04, 0x18); +- buf_write_le32 (gdb_index + 0x08, 0x18 + npus * 16); +- buf_write_le32 (gdb_index + 0x0c, 0x18 + npus * 16); +- buf_write_le32 (gdb_index + 0x10, 0x18 + npus * 16); +- buf_write_le32 (gdb_index + 0x14, 0x18 + npus * 16 + 16); +- ptr = gdb_index + 0x18; ++ buf_write_le32 (gdb_index + 0x04, headersize); ++ buf_write_le32 (gdb_index + 0x08, headersize + npus * 16); ++ buf_write_le32 (gdb_index + 0x0c, headersize + npus * 16); ++ buf_write_le32 (gdb_index + 0x10, headersize + npus * 16); ++ if (ver >= 9) ++ { ++ buf_write_le32 (gdb_index + 0x14, headersize + npus * 16 + 16); ++ buf_write_le32 (gdb_index + 0x18, headersize + npus * 16 + 16 + 8); ++ } ++ else ++ buf_write_le32 (gdb_index + 0x14, headersize + npus * 16 + 16); ++ ptr = gdb_index + headersize; + /* Write new CU list. */ + for (cu = first_cu; cu; cu = cu->cu_next) + { +@@ -13290,6 +13318,10 @@ write_gdb_index (void) + } + /* Write an empty hash table (with two entries). */ + memset (ptr, '\0', 16); ++ /* Write an empty shortcut table (two zero offset types, ++ indicating no main function or language). */ ++ if (ver >= 9) ++ memset (ptr + 16, '\0', 8); + return; + } + +@@ -13297,18 +13329,34 @@ write_gdb_index (void) + cutypesoff = buf_read_ule32 (inptr + 0x08); + addressoff = buf_read_ule32 (inptr + 0x0c); + symboloff = buf_read_ule32 (inptr + 0x10); +- constoff = buf_read_ule32 (inptr + 0x14); +- if (culistoff != 0x18 +- || cutypesoff != 0x18 + ncus * 16 ++ if (ver >= 9) ++ { ++ shortcutoff = buf_read_ule32 (inptr + 0x14); ++ constoff = buf_read_ule32 (inptr + 0x18); ++ nextoff = shortcutoff; ++ } ++ else ++ { ++ shortcutoff = 0; ++ constoff = buf_read_ule32 (inptr + 0x14); ++ nextoff = constoff; ++ } ++ ++ if (culistoff != headersize ++ || cutypesoff != headersize + ncus * 16 + || addressoff != cutypesoff + ntus * 24 + || symboloff < addressoff + || ((symboloff - addressoff) % 20) != 0 +- || constoff < symboloff +- || ((constoff - symboloff) & (constoff - symboloff - 1)) != 0 +- || ((constoff - symboloff) & 7) != 0 ++ || nextoff < symboloff ++ || ((nextoff - symboloff) & (nextoff - symboloff - 1)) != 0 ++ || ((nextoff - symboloff) & 7) != 0 + || debug_sections[GDB_INDEX].size < constoff) +- return; +- inptr += 0x18; ++ { ++ if (file) ++ error (0, 0, "%s: Unexpected offsets in .gdb_index", file); ++ return; ++ } ++ inptr += headersize; + if (ndelcus) + cumap = (unsigned int *) + obstack_alloc (&ob2, ncus * sizeof (unsigned int)); +@@ -13319,6 +13367,8 @@ write_gdb_index (void) + { + if (cumap) + obstack_free (&ob2, (void *) cumap); ++ if (file) ++ error (0, 0, "%s: unexpected cu cu_offset in .gdb_index", file); + return; + } + inptr += 16; +@@ -13353,6 +13403,8 @@ write_gdb_index (void) + obstack_free (&ob2, (void *) cumap); + else + obstack_free (&ob2, (void *) tuindices); ++ if (file) ++ error (0, 0, "%s: unexpected tui cu_offset in .gdb_index", file); + return; + } + } +@@ -13375,8 +13427,16 @@ write_gdb_index (void) + buf_write_le32 (gdb_index + 0x08, cutypesoff + npus * 16 - ndelcus * 16); + buf_write_le32 (gdb_index + 0x0c, addressoff + npus * 16 - ndelcus * 16); + buf_write_le32 (gdb_index + 0x10, symboloff + npus * 16 - ndelcus * 16); +- buf_write_le32 (gdb_index + 0x14, constoff + npus * 16 - ndelcus * 16); +- ptr = gdb_index + 0x18; ++ if (ver >= 9) ++ { ++ buf_write_le32 (gdb_index + 0x14, ++ shortcutoff + npus * 16 - ndelcus * 16); ++ buf_write_le32 (gdb_index + 0x18, ++ constoff + npus * 16 - ndelcus * 16); ++ } ++ else ++ buf_write_le32 (gdb_index + 0x14, constoff + npus * 16 - ndelcus * 16); ++ ptr = gdb_index + headersize; + /* Write new CU list. */ + for (cu = first_cu; cu; cu = cu_next) + { +@@ -13434,12 +13494,43 @@ write_gdb_index (void) + inptr += 20; + } + /* Copy the symbol hash table. */ +- memcpy (ptr, inptr, constoff - symboloff); ++ memcpy (ptr, inptr, nextoff - symboloff); + /* Clear the const pool initially. */ +- memset (ptr + (constoff - symboloff), '\0', ++ memset (ptr + (nextoff - symboloff) + (ver < 9 ? 0 : 8), '\0', + debug_sections[GDB_INDEX].size - constoff); ++ /* Copy the shortcut table. */ ++ if (ver >= 9) ++ { ++ unsigned char *inscptr = inptr + (nextoff - symboloff); ++ unsigned char *scptr = ptr + (nextoff - symboloff); ++ uint32_t lang = buf_read_ule32 (inscptr); ++ uint32_t name = buf_read_ule32 (inscptr + 4); ++ buf_write_le32 (scptr, lang); ++ buf_write_le32 (scptr + 4, name); ++ ++ /* If lang is not zero then put the name in the const table, it ++ might not be an offset to the name of a symbol. */ ++ if (lang != 0) ++ { ++ if (name > debug_sections[GDB_INDEX].size - constoff - 1 ++ || memrchr (debug_sections[GDB_INDEX].data ++ + debug_sections[GDB_INDEX].size, '\0', ++ debug_sections[GDB_INDEX].size ++ - constoff - name) == NULL) ++ { ++ error (0, 0, "%s: bad shortcut table name in .gdb_index", file); ++ goto fail; ++ } ++ strcpy ((char *) ptr + (constoff - symboloff) + name, ++ (char *) inptr + (constoff - symboloff) + name); ++ } ++ } + ptr = ptr + (constoff - symboloff); +- end = inptr + (constoff - symboloff); ++ end = inptr + (nextoff - symboloff); ++ if (ver >= 9) ++ conststart = end + (constoff - nextoff); ++ else ++ conststart = end; + /* Finally copy over const objects into the const pool, strings as is, + CU vectors with CU indexes adjusted. */ + while (inptr < end) +@@ -13450,9 +13541,11 @@ write_gdb_index (void) + inptr += 8; + if (name == 0 && cuvec == 0) + continue; +- if (name > debug_sections[GDB_INDEX].size - constoff - 1 +- || cuvec > debug_sections[GDB_INDEX].size - constoff - 4) ++ if (name > debug_sections[GDB_INDEX].size - nextoff - 1 ++ || cuvec > debug_sections[GDB_INDEX].size - nextoff - 4) + { ++ if (file) ++ error (0, 0, "%s: name or cuvec too large in .gdb_index", file); + fail: + free (gdb_index); + debug_sections[GDB_INDEX].new_size = 0; +@@ -13460,26 +13553,36 @@ write_gdb_index (void) + } + if (ptr[name] == '\0') + { +- unsigned char *strend = end + name; ++ unsigned char *strend = conststart + name; + while (*strend != '\0') + { + if (strend + 1 +- == end + (debug_sections[GDB_INDEX].size - constoff)) +- goto fail; ++ == conststart + (debug_sections[GDB_INDEX].size - constoff)) ++ { ++ if (file) ++ error (0, 0, "%s: name too large in .gdb_index", file); ++ goto fail; ++ } + strend++; + } +- memcpy (ptr + name, end + name, strend + 1 - (end + name)); ++ memcpy (ptr + name, conststart + name, ++ strend + 1 - (conststart + name)); + } + if (buf_read_ule32 (ptr + cuvec) == 0) + { +- unsigned int count = buf_read_ule32 (end + cuvec); ++ unsigned int count = buf_read_ule32 (conststart + cuvec); + if (count * 4 + > debug_sections[GDB_INDEX].size - constoff - cuvec - 4) +- goto fail; ++ { ++ if (file) ++ error (0, 0, "%s: count (%u) too large in .gdb_index", ++ file, count); ++ goto fail; ++ } + buf_write_le32 (ptr + cuvec, count); + for (i = 0; i < count; i++) + { +- j = buf_read_ule32 (end + cuvec + (i + 1) * 4); ++ j = buf_read_ule32 (conststart + cuvec + (i + 1) * 4); + if (ver >= 7) + k = j & ((1U << 24) - 1); + else +@@ -13506,6 +13609,9 @@ write_gdb_index (void) + obstack_free (&ob2, (void *) tuindices); + if (fail) + { ++ if (file) ++ error (0, 0, "%s: fail in .gdb_index", file); ++ + free (debug_sections[GDB_INDEX].new_data); + debug_sections[GDB_INDEX].new_data = NULL; + debug_sections[GDB_INDEX].new_size = 0; +@@ -15549,7 +15655,7 @@ dwz (const char *file, const char *outfile, struct file_result *res) + report_progress (); + fprintf (stderr, "write_gdb_index\n"); + } +- write_gdb_index (); ++ write_gdb_index (file); + /* These sections are optional and it is unclear + how to adjust them. Just remove them. */ + debug_sections[DEBUG_PUBNAMES].new_data = NULL; +@@ -15808,7 +15914,7 @@ optimize_multifile (unsigned int *die_count) + + write_abbrev (); + write_info (die_count); +- write_gdb_index (); ++ write_gdb_index (NULL); + if (write_multifile_line ()) + goto fail; + } +-- +2.43.5 diff --git a/sys-devel/dwz/files/dwz-0.15-readelf.patch b/sys-devel/dwz/files/dwz-0.15-readelf.patch new file mode 100644 index 000000000000..038c832e3950 --- /dev/null +++ b/sys-devel/dwz/files/dwz-0.15-readelf.patch @@ -0,0 +1,43 @@ +From 2ae1b0ee518ba40fe985aa644d3a66ebca1165e4 Mon Sep 17 00:00:00 2001 +From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> +Upstream: https://sourceware.org/pipermail/dwz/2024q4/001435.html +Date: Fri, 22 Nov 2024 07:33:09 +0100 +Subject: [PATCH 2/2] Makefile: use $READELF variable instead of hardcoding + 'readelf' + +--- + Makefile | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 3dc6c6f..f0841aa 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,6 +19,8 @@ endif + + override CFLAGS += $(CFLAGS_COMMON) $(CFLAGS_VERSION) $(CFLAGS_COPYRIGHT) + ++READELF ?= $(CROSS_COMPILE)readelf ++ + prefix = /usr + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin +@@ -35,13 +37,13 @@ args.o: native.o + args.o: CFLAGS_FOR_SOURCE = \ + -DNATIVE_ENDIAN_VAL=$(NATIVE_ENDIAN_VAL) \ + -DNATIVE_POINTER_SIZE=$(NATIVE_POINTER_SIZE) +-NATIVE_ENDIAN=$(shell readelf -h native.o \ ++NATIVE_ENDIAN=$(shell ${READELF} -h native.o \ + | grep Data \ + | sed 's/.*, //;s/ endian//') + NATIVE_ENDIAN_LITTLE=$(findstring $(NATIVE_ENDIAN),$(findstring little,$(NATIVE_ENDIAN))) + NATIVE_ENDIAN_BIG=$(findstring $(NATIVE_ENDIAN),$(findstring big,$(NATIVE_ENDIAN))) + NATIVE_ENDIAN_VAL=$(if $(NATIVE_ENDIAN_LITTLE),ELFDATA2LSB,$(if $(NATIVE_ENDIAN_BIG),ELFDATA2MSB,ELFDATANONE)) +-NATIVE_POINTER_SIZE=$(shell readelf -wi native.o \ ++NATIVE_POINTER_SIZE=$(shell ${READELF} -wi native.o \ + | grep "Pointer Size:" \ + | sed 's/.*: *//') + %.o: %.c +-- +2.45.2 + diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest index d36547d79ebd..84a94db50cc2 100644 --- a/sys-devel/gcc-config/Manifest +++ b/sys-devel/gcc-config/Manifest @@ -1 +1,2 @@ DIST gcc-config-2.11.tar.xz 18068 BLAKE2B 0d76321adea9eff545e042ad847b70a5b3d8ecb8c248fdf58f71c88a7b03c0aca39f7d39e332808b89c3f6d0fb3fc3114bc2d8dfa1ade6460c0b12c3420d876f SHA512 38ea52c2d16287fc2c8efa0ee76e24563851b4fa1ee7dce601507df1530e7a867281f178ad4228505eb2aaf46164024a18825cd6771d847ff1a60a85d6e96d3e +DIST gcc-config-2.12.1.tar.xz 18328 BLAKE2B 349c4614ea349d03f445cdda5d87ccb5e54b4faa802c8997f3bc088a78bf4ff92ec75c91d986ff3e26ab7f098e3af70dd9f85efda77ed64315d2e59b4b11a925 SHA512 abd7fe4ee79269b1003ffe2fb24884751e94e7777814ac123e51db0c059d105b312aed08726fbda2342504738f7055ca803f0ddd006e57110f49d7f3db574183 diff --git a/sys-devel/gcc-config/gcc-config-2.12.1.ebuild b/sys-devel/gcc-config/gcc-config-2.12.1.ebuild new file mode 100644 index 000000000000..7574d6b5745a --- /dev/null +++ b/sys-devel/gcc-config/gcc-config-2.12.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +DESCRIPTION="Utility to manage compilers" +HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/" + +LICENSE="GPL-2 GPL-2+" +SLOT="0" +IUSE="+cc-wrappers +native-symlinks" + +RDEPEND=">=sys-apps/gentoo-functions-0.10" + +_emake() { + emake \ + PV="${PVR}" \ + SUBLIBDIR="$(get_libdir)" \ + USE_CC_WRAPPERS="$(usex cc-wrappers)" \ + USE_NATIVE_LINKS="$(usex native-symlinks)" \ + TOOLCHAIN_PREFIX="${CHOST}-" \ + "$@" +} + +src_compile() { + _emake +} + +src_install() { + _emake DESTDIR="${D}" install +} + +pkg_postinst() { + # Do we have a valid multi ver setup ? + local x + for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do + gcc-config ${x} + done + + # USE flag change can add or delete files in /usr/bin worth recaching + if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow update all + fi + + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then + # Warn about obsolete /usr/bin/gcj for bug #804178 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!" + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)." + ewarn "If you have no idea what this means, please delete the file:" + ewarn " rm ${EROOT}/usr/bin/gcj" + fi +} diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index d3bbcb948972..34f5f96d61dc 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -4,34 +4,45 @@ DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac38 DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61 DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e2cac92a13cc7e285d08191dd4a117f41a8faac2359c0e2a16f954c7fef354dda9df8c63bff1c5cefda82602c SHA512 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8 -DIST gcc-12-20240919.tar.xz 79901284 BLAKE2B cac209e466ccdffd84610e22961bfbdcd70f6bdd838fe595aa5157670f2a3b9d7db688ffe700e4e7f643a1d3dd806686531e519b2a750b942be63a7dbd7dcb42 SHA512 b032e85be5720ea66b6183f3a5d9f2cc8505c21a0fbdb44d292d8143e37b3ec6e8c3417cb8fc7a18e7cbc961d61c51f681b3ea724086d325c05e7918f7949063 -DIST gcc-12-20240926.tar.xz 79903576 BLAKE2B 704ee10a6e0c358ab4e5ebf9849c2c77f0576ddfc7698f3a5ceab5ada41b201bff3b0ea3f476c3fac7e16dbc606a1885d5042335ef207250f21106286b2587d9 SHA512 259ade01b6d8583bb7bca28b883c9bb1a6929ab7f16d67c14e264dd6118d791ea3bf29c07afa72856cd0612b5e1c1a4ae9224b0e332519956a3642115cb2d592 -DIST gcc-12-20241003.tar.xz 79908436 BLAKE2B 8a07f081c0497d011fe14e9a56eaee2397dabab342b39fb7ca1144006be05ab5fcc599343cf14d7b235a5e3769d0e0883d7678fa263963041012fe4a5814eb14 SHA512 d13f43c85057b5f1f01f26255531675ebb98744e6ca2f3de81924976d3a67f5ce2e462751e1b830da2218e7947d1c8da5e736fc5527b9aa204b497a237e9f9f3 -DIST gcc-12-20241010.tar.xz 79917636 BLAKE2B 514fa1370c1fcacce5afd9ee50278915976346aa2ae102679ebf27f28d752eca67d93d0a637a38b010100dd6cc909584d179edd98b42199fdf059b1d9c094fe2 SHA512 33b8133cf686cf72fd468df2fd55b6ec92e740feb21ae29cf5b451e13faf73687b871bb7092140b87925780c77cf227738d10e799b43da91f62ca7b863e6779d +DIST gcc-12-20241031.tar.xz 79916212 BLAKE2B 924acf7048858a5e45fb835e405b7517fd0029e0fd3a565a34c9be9828360449568110bf0844bd29c7de214d62641ec8e8f10211d69560741311fbd0127041b1 SHA512 412b5f24d99a03c045e6ad083be142fcae2e28629ccd755c0eadef40524bd9e8b83ca605112d405cd911cf14a9fc2939449cc8a9403525bd82168aaba66fbc0f +DIST gcc-12-20241114.tar.xz 79902476 BLAKE2B 0d72464116862319513330c00d680658fd70a3a1b38c88defa0f087651bcff050ea128b15c95de06f2d2aa89488f09347cebbc4d13d3438b75f7f88ba1afa2ad SHA512 dc0af29c2454a7bcdd1b52b61de13845dc49fef3f86d87e0eea876dc5a55d93924e3af8cad58fd89725094520290c3183a4385f988aa556d658225ceb15a37ff +DIST gcc-12-20241121.tar.xz 79909252 BLAKE2B c0ee7abfa350dd8bf3bb763b167eb8d869d0fdf142dc2a06ec447bee6c5721c26f3492d65d383080e2a1fba69a29b72adda68e7c2d3686bd730fd1b7e4f98c47 SHA512 3338652173254f16f7867c6dd2cdb25b20506ce94cd725dc60c630bfe04fad007e2e7b169d0018d7610f57527ed4aa29c191223edc666a9c2006d21ee508a4c2 +DIST gcc-12-20241128.tar.xz 79904116 BLAKE2B 74b4aa14d85656e64cacf0036e7662eae7b45dbf84eb17a5bdbecc02e54a6c32aa5d0ae7c591c2259202598c7a486c6a07197ff5f6cfcbb008129c2cfcca7f26 SHA512 158372f20ebf61618e829ac285e43e9aac55c7f98eebb5034a47bd024dd73d593cac703093752e695e4516478aaec7e7a95c352603df22b547b37bcde55ff307 +DIST gcc-12-20241205.tar.xz 79911996 BLAKE2B fa4f78fd356920c8a6a1b7618e24fef95acf7b1c6b6e5fff71b66cdab5de25c32374f732ce8df8f97590f84409ae74e5aadc4b7fa10480da662266adeeec7db8 SHA512 e22b8f03504e26a5fb385d626485f18abcbffc449d5ad8d0d3796d588ff2a888d3698af706f833c7a59d01e9988ffabf7d316d7609abb8b7a3f197ec931bb09f DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62 DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec +DIST gcc-12.4.0-patches-2.tar.xz 14876 BLAKE2B 6bf5abbb2abba4b9fe9fa153ac4112fe5f563e97cd4e1b885ccd0d88abf1124fa91f20d6be972e2242410447be73bca60014785f8551b8087ed0d4cc3e868225 SHA512 dfd5f02d4c1076fad4ee998b2f620171dd3eb65a1160312def9dae89b18327a06db853f569e0e3c049e5ab06c61488bb6faecec52bafe737fddeb43628c54a1f DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 DIST gcc-13-20240614.tar.xz 84463660 BLAKE2B a1b551ff633c31d6972fed173f248ba5f6696eb1566801e180b78a7c7e20933b1aaae40839b4f1529d61166de55125395d4f9a812511c088e73f975bf1d2167f SHA512 1a543ddfb56e793367a43895a7ce4f97daeca6ffd5234ce50e8a7ae0f8db1071e01bdd653fda40d00eb7a680faead8f1d8d1295f983086a33a4c75e4affa2ea5 -DIST gcc-13-20240920.tar.xz 84477260 BLAKE2B f9f0c376d2849a55a61ac5bbbdb456d160e861e8f0acb34651960aa680ec5e8e6d6bdbdeab94c02e51ad1766bd24e5f2dba3a386f6735ea103181dbc1348a943 SHA512 5b7304ea0032a3bd6f111c8da0a9f12958f45e9f117d408e02e8b4892157462c5643891bcedbded7386f5f9987d16a922bd21bd05ad33167379e1579b7baf1aa -DIST gcc-13-20240927.tar.xz 84487900 BLAKE2B 7b04a3749f4f34cb4b25cce2e02e16422d143f214618468a571f7c0d505ae69928b3dc5b9c95696750a03247934e69816731445613abb9333d7b6b0e65ad5cdc SHA512 532f094e416c151fe80dcd61c64c78398cadea785bf6bd05428d39ff3da5472323cf1c8199ac6aad87abd2893996d18c29b1a2e50dc94286821564e888730d32 -DIST gcc-13-20241004.tar.xz 84474832 BLAKE2B 641d14af692557d47f182d6f53254afcfb4d15181e013b7f720ce9305b79f1969f69a4fda567f369ef49b8d5d8d77d870fbfb82a1d47cb479056b931a08a22be SHA512 5d8fe656965d2af442524d5247ef4f803f3da36f46edfca6a6b1ad66d2f3007a0e71104ef0beae08af10c7c7b060dfc60b3e4fc9117de3bbe107ae2b0869367e +DIST gcc-13-20241025.tar.xz 84501292 BLAKE2B f5ba0a429a43d1936fe717850c81c847c90670204de33261fd476396336a1e1cc34c55d5487ac1871a4019c8a3aff59b6c8fdea3f1b7a161a73dbec8679c4d3a SHA512 a921afd451cdad55ee68bdb36861ca0c525de038d247f6e0ff59dbbdb3b41f03d139e7c2939a0999feb8b2f820f9267171a2c657683df0c86b38f0cb379eb0af +DIST gcc-13-20241115.tar.xz 84481880 BLAKE2B 451c7f74a95889683944617c7d38daa77db9afd7e7877bfa6a380a148b12e2aa813fbda73d6866f207d27600c265b44ce471f9f6bfef40eda2a2e56710820d14 SHA512 db0db01cd3918ec563037c70d3e67243c7c38c3878574047cd7a0aab1e7f13476940b2af4d54f1a20416d9e4e02f79a0722da361ce45ed34244f205cbedb1d37 +DIST gcc-13-20241122.tar.xz 84515040 BLAKE2B 50f64a0d202cbcf27e1c3e31e9fa5eb39238d1247e7b0104ff45d653f7edbffd51404f0bdc1ae9abc2091398c31326cde680e9beb265e54318c92ee99db8b5bd SHA512 f6a304f5c500c28b237a3e423a420689c8c683dc7267040704c639fdd62e0a93a8be25f933b772238aead38b643ae08e4ac275a96212cf132d3141808acab5b0 +DIST gcc-13-20241129.tar.xz 84510968 BLAKE2B 7342df790d49e82d075bff2df94a5f78455bdabc9c376449091cb06197dd98cb7db6d8cb1fcccc3efef224e273c443248f1183f8bdb21f676640ebd8646d76c0 SHA512 c7a3d4c331324527cc2ff9ccce45e01a19ede413c391b9ca564149456e69d778c5d7d729da33097a2b572e5f5d61f56a81200a0cf6f3cf79be62227078b63604 +DIST gcc-13-20241206.tar.xz 84526612 BLAKE2B 5b599a93082519c6535ea8cfe14648f28c3868236fee35ea75f9aba60a0601eaa8459ac8bdceda2f6994dc860b63fc82e9da8255ab6772ea0775d1a923900905 SHA512 217aeca85d4a9945c859bb4d036b3add5e3ded24a07f36e1f9ac450ef1a3dc44e93f1d976abcac660e49930ec473c8fc9db5b84187ffb5f6c0caa62adf54beab DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 DIST gcc-13.2.0-patches-16.tar.xz 44792 BLAKE2B 0b6b584d68e69685638695596b780249ca0119ad362747a82d886fd10f77ceb05d02e033e906a090c67f44b1977f40df6a95206d81a32dd15e2f5413c6c92496 SHA512 324d9e63d16c35d55edde20de049162c01b0d487b4548d06c49f0da04a761ec255bc5e020cc2e7f60d12f5d129768afdcf7c86a59126f71f388ab375c34be6de DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2 DIST gcc-13.3.0-patches-1.tar.xz 45084 BLAKE2B 4a4b2db25de2f17115e08b50d67449bb16de3296e78c165e2540beda7f84c28f6f3e909856c8b864b378f5e050ed149a60adc580faaf08351b81f4c460656493 SHA512 20e820a3e61f792d380651bb2e40b9c18ce7085962bd9302488ebdad1fff41d3742aea40d712daa5862276ca16d0081de722bf1191e86dcf065af5084271f632 -DIST gcc-14-20240817.tar.xz 88024252 BLAKE2B 994b3e263246e344c6898943a17feb63f07b3de02777a77c689e001343119bd451e1ed5c6958f368077f10b4778c65fa492c55d164e2a0b1bbd65b275aae3cd1 SHA512 31de06694efeb2be49b64e9e8314a766d36c3d5f5f2d52d1e0419ba69262b7c344ef0700957eff11007ba5b81bd5e74dea2a2c0286990cb33927bac4a7db9756 -DIST gcc-14-20240921.tar.xz 88149220 BLAKE2B d92a5a92f24a6f4ace3d1e321e7c9149e8a25222669998c8de010be596a18cc161f288e78ce358ce44fd29f28e56bc678a7c8c775a66ffb71a57c642a7f5af75 SHA512 6a50a6af4a5e661d636b6a7b13b0fe36a66e3be3e20ce97b62c4e9878c974396b9066dfccc108f0bf7f3b28b19e57535a415528b0f0ede1de13a4007625012db -DIST gcc-14-20240928.tar.xz 88163000 BLAKE2B 1340373a6b0a47ad11d4d09153df432e70a7ae57600db5da32f962790962e252b4b81e74122d8f50a7457a339cae5d713fd75b8ed2637b5c3bf3cf57dbb8573b SHA512 5120b9c42c0f2a44703aac9891bd729f979768689c666f1b208c23604597dd5f0e2062f261a1fe4b69b3dce6ccb3de90a1e3e9af78df6fd543756de507beefa5 -DIST gcc-14-20241005.tar.xz 88173364 BLAKE2B 2aec7ce7aaee879be2ce0758e6eeaf664989e0257f5f0b1b94ef05f455729d9a6f5fb6710f4ac88320d0ecba68d12e0e46a074cb233984fd733d10b952bba6bd SHA512 f7d6302126a20906dab90a0b00d3c8bbec4948aec8024103578bb62f1dcad49d6a44f6b18792d18e32837d4aa764052d08a73bd4df546fa719c28fcdb9024f55 +DIST gcc-13.3.0-patches-2.tar.xz 44440 BLAKE2B ebde73f6c3cd1a5fdc5bbce36414a59dda0925cba9d422d3689fc9c14fece44ee2391982a674411aa99bf47ffd49200f3ce51cc908beb8298adfff78e709a84c SHA512 eb56e0d7e69b5c3cca21f4cbff21c1204cf64ede7e66d689f45cf5ff37de8a59f24eb1f4b30d9c4222fd4126654fe4ffc146851f504761014995553c1202e8fd +DIST gcc-14-20241116.tar.xz 88185956 BLAKE2B 490972004d93d8f44f8d5751674105fca8c37aaaf6a87f42d665e3a2f8b1091e31ddbe827c6b6c54951feb0e45fa180c91d805fb82c7de584c01081bb4c1d529 SHA512 65b85c23083fd07e4d216480f1e0d2e1343bcef38dfdd181f6d0086103a626736d299387e1b06f634155d32b45678d72587b340d85c57c3b5ed9d7f20613edff +DIST gcc-14-20241123.tar.xz 88234244 BLAKE2B 3975c6f6e5adbf8506136c58678a9d136386f6c89f54312ebdcd60b2709fc8502b0969e4f3e80f189ba7934f47bd0738be2d5e6d68a40ea955d5ee7c775ee530 SHA512 bf7d416382c697410cf9358ecfc5c8ff2045f8e3f8b4e5fc41e02fe211aba057c8dc4c660b05b3a57bc113845c85332d588b67dff30e05efeb5d756d401eb8c1 +DIST gcc-14-20241130.tar.xz 88209220 BLAKE2B 86cc5b455ca7a3ba53fb7c16785b7c23762c66dbc3ce27b6067cd834514464fa7057be3ebc780d909122e0220734106aeab5389eca4c372e25e7d6d52de9d3f9 SHA512 cf6ce7d4beca717637ace8fc285d771f9deb2db44dbd446b7a7ea45e1c1cf59b165d4054ea480f2e59f19af465f027cc0862f66c8088fd8fb1199e90d8486052 +DIST gcc-14-20241207.tar.xz 88216972 BLAKE2B 0dab2b33486d435ebcb2f116834aafac9c35fa3b1659ccea3596ef648fb344cb0138d07810055399ea87ae357647c08515ac33178d4fad5bf47ab539910097b0 SHA512 df264c7ecc22aaa3d667757afc2afee7ac2010b6a32d28fecc5d9e9d0fb5bfe689117024f4a351569c3016321b28acd428ddb996ed01bae68d0d4b774f38d719 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 -DIST gcc-14.2.0-patches-1.tar.xz 13208 BLAKE2B 17247d5b8871d60a33175302b9657c70f161ae49cb1fea0f217c54d3644151c9cae705b6f88e440fc872597447dabe8c12d9f6c40cbc91fb5e161015e614b3ea SHA512 b7a6939894f48bb046e407bac50db15c9301552afa7d300794243dd139837fdb3a293e4d95259247dd3622e01affcc086393ee5422331bb3d796450a72d6d0fa -DIST gcc-15-20240929.tar.xz 89549712 BLAKE2B 90b22ddf10f3c7f36f8a19e3a4436fed73b89f84b3f0c837cc12ba8585da1a2e38fc46801213dd6f8e61b115cf0a9f3952caeae268a9f6814c97f7ad08507358 SHA512 f082b945639db38125019f923856874b7f2a937168853c6339d0d9fbc5f0aa146879f4147b06759653c374c4e063fd02585a0fe942e666bcbb07851a308a652c -DIST gcc-15-20241006.tar.xz 89582908 BLAKE2B d107d960db81e8e92c072ed5a25313b36b9e169575da00bc6bd4a0bfb74741ec162bbee0651db2b4e0d862bc87df0c53f5328863c082a32d29a7b786e93c11ef SHA512 5d220e95db5aff2e5a3c9487ae847e1c57224d9e4bcca3667b0e1f1e722766997348ed121837f099d177456d006adee9392fee3e10127b1b336b17f29aa84211 +DIST gcc-14.2.0-patches-3.tar.xz 13920 BLAKE2B 5b3efa54671581d97ae664e73629f247c776d84eea0b10f8d3223502582f1d1086fff86a6cde6c35b6b43d134af4dad3135d3de5531cfccb320a7fc884ab39ef SHA512 d47549e902055414142f650c7098f029410549741542553b1d0c0519f046a958561f92552e44f59663a7645d42316af5dab1462f54f50f2205257be6744c2fce +DIST gcc-14.2.0-patches-5.tar.xz 13532 BLAKE2B 0e594f00710f9ac4f8833092b74bc74ce82b54cea6047db654497ab216c45d593cce90a1a6f918ae7613628598f8037909e485ffb69ac06bae4a44d90f9a2ddb SHA512 18d7b3fbeb6b116b53b64ade636585f35e306bb49771b0f3a4a67d61edc7dcfda9e9bf9a3a9cbbec2512d35de4e235c397c044507e637387ede9b84070d0d666 +DIST gcc-14.2.0-patches-6.tar.xz 14256 BLAKE2B 2b6cea7c98a9f8b6f4eb383d5b11b361e86daf9ee0cf49f54e5e2771797d1150375cc4ca827332c5d4de812cfb5627b6e33faa10613f3ba5492891340f9154d1 SHA512 88efe8bc11a2c6df902c38c92c006ff678750c7780115e9810ae83816efe1efd8cbeeb3e4c8dd188af7f8695f3fa0db70eca338ccb48c7eca05d7baa1691b3c1 +DIST gcc-15-20241117.tar.xz 90065532 BLAKE2B 22ffd82f77871df3c90667d3fbc08ff721586c851aea6e79a34bf065468307c132d62581b7cceaf9b2bc6cc54be8d6ec1dbde241e01454a343e2c48c804a4cea SHA512 70fb8dbdf5a98e3216a5c64c544d9208dd153a71266312e12189ea8ef03abf8b4d29153e0550a556b93e47ef2315e60bf2f5e080db82ffb3c6bb3dc2a3c8aa10 +DIST gcc-15-20241124.tar.xz 90251704 BLAKE2B d9c2a4342ca2229e345e163a8781e7ea8f4682734f5b1f4c9783272e0a362bc4fb0c5b5042363d996ea0473836c53cbf437761389062d076ce5595c1cdb2bcf2 SHA512 36e30e658f45b3b6cd5968cdae15216d6d874349349dce30f7d8c7c7bda1eff841d4d1eb4471956acfab04300c7169872210d26a5d05dd1ae0167d601a2adeed +DIST gcc-15-20241201.tar.xz 90331368 BLAKE2B 883b9073ff5927acaf7f6e0d06c4ddd8d603b0168aba1609f476fce1a6ecd8b78b894b75c5cb7ebe383a0248afdeeb058f1221db3a4fdd4822df79a1ba29c816 SHA512 6d09f84ce609bfac816ac326f37475d61d9232aa502de9429d036a82b501370842dbb9b8c5b650b0e01f668dfb0e2a14e1f8af2d6f175b79d920f6208d596a8b +DIST gcc-15-20241208.tar.xz 90369108 BLAKE2B 83953dcb3fd42168fb0bdee6336698dda6758626499bb474da56a1eaf22f422825e743997290b9a3241ae6fc3582ebfa9c9e6e7d56df599be10412556e1af26b SHA512 64f92431c5714d598ecb7819eb30971c9b050dab53cee37401581e7587facc4c7f19312f8fa9be3b0847de55f7818defb82279a81d4c49c7fccbce9877b8846b DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de -DIST gcc-15.0.0-patches-13.tar.xz 16480 BLAKE2B b3d9637972ac3644ba0191cb26aa2c9f624ead14816a6358db81745ef984af9de3c0c1f5576edc3045d877b3907a97566b468734baa2e6b2a351187d3e9ff80e SHA512 da368e83643fe2312655654be2de4824c3b5e7efaafbf2dcf63aafa48580cfe74e5394707c577d82e22336dbadd52414e31a597dc3565d0378f3ead5323b9b3c -DIST gcc-15.0.0-patches-14.tar.xz 14764 BLAKE2B 3da7b4d81ea45ca1254ab9f290ca0c94cacb2d168aa0b3f6b0ef18193f911e204148b1790df9ddf7d1f6955777b3470030e73751fc7d1c0fd23bccfdee10fcbf SHA512 7133b5df5f07307f85a07b05fdc5f8166920aa93b13c1465812be572c7185b7fcf174cc36ddb2bc9fd2323dd010db9a42d35df9871f185794cd22bff57c43eb9 -DIST gcc-15.0.0-patches-15.tar.xz 13116 BLAKE2B ec558b7ddf5907f63c4cde12a5a2b2d563d4db127b6da55682d066db12c5556ab2e70ef62cf019f20479cfd3d6c76a0f7da17dd5e729506b1abc0fad55ed82c4 SHA512 9fcf9f3e5f9d070061b9c636147f8b43fc8254314b51dce52a7a59d525309160da9fc950b64cac04644027a2b66b675bcc741c5883ade2d630cf2d4286b35d5b +DIST gcc-15.0.0-patches-26.tar.xz 18864 BLAKE2B dc11d5a4d292ae53558601a59a34a619f6e0bbe223e6645a82a04fcd3b83b5788a3a7fdd14ac6fc2fde079302355dbef1a94c283725807425e1ce8d67e28f416 SHA512 14721dffb4dac9394239a82c52e3cbf47094dadc1b310b55a71101ca7ba1a5077fd137f39fbfb89896d324117f6a13c97dc8e8fa8cedecc5c2af4179de7e7f1f +DIST gcc-15.0.0-patches-28.tar.xz 19884 BLAKE2B 36e982dd8c98853e84d977c7be9e7b1decf2ac10f61bdd76d3aed3ba415345039539cb00e03c6f6d86573a890431a39539ca04c54489aa7a3c29cb4b48faa2af SHA512 d95ee81beff83d43f2a42d440c032535e31b9121868b9c18e825e0c0185f5c42173634286274c527668897333104e52137c4b1e0305fee5d86ac4c5be9601b94 +DIST gcc-15.0.0-patches-29.tar.xz 28048 BLAKE2B 592227c6ecf581d6670ad09e09a279c018796cd9709b9c45c8d28af5a8f8858b5e9c0739b395e96fe79fedc9a7a60e82011b78581a8acadd3ceaaaa3e9751527 SHA512 4fb9d34feb570ea5e56ebca6588d367840457cf36f7818327317ee417f90593178adcace042106cd639032cf526a4a05cfd86f9e01eade1827eb5a90f03a7cc7 +DIST gcc-15.0.0-patches-30.tar.xz 30564 BLAKE2B 3d99ddcd03bc6f6b71c599cf07873c8ba6baa1db3e763227bb88181f926d128dae98c8290cf165fe484950a7fba71a8fefa8e8230c293ad50cba06b945921ddd SHA512 1d5812775b667a46b88d0d4923dfacef163bf25301f769df0e461ae1e990b6d3cc0686bda40bb9d5adc0570b33aa7e9c537c793ad4a7757939856beb320cd399 +DIST gcc-15.0.0-patches-31.tar.xz 33844 BLAKE2B 90faa70090e4a4ee9f79d7a8ca43b17cf073d2a6d33cff701d3f726517b385ab52097d0513ce73a5b94e4f3d37525074bf19b2d189e75b2bd7cc7c452832a350 SHA512 6837bbef863a9ec95adb65afc076315f7d56b7861c5eff35b47722ed9726ccdb3ab578cc8b6bfbf2b7373fbf74d78cfb06bfe06398bf217be2e079132e44e6d7 DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf diff --git a/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch b/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch deleted file mode 100644 index 7dcf89df5228..000000000000 --- a/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch +++ /dev/null @@ -1,88 +0,0 @@ -https://inbox.sourceware.org/gcc-patches/patch-18806-tamar@arm.com/T/#u -https://gcc.gnu.org/PR116817 - -From 9a5d1eb943dcaf26551b534eb62cbf1dd8443335 Mon Sep 17 00:00:00 2001 -Message-ID: <9a5d1eb943dcaf26551b534eb62cbf1dd8443335.1727104663.git.sam@gentoo.org> -From: Tamar Christina <tamar.christina@arm.com> -Date: Mon, 23 Sep 2024 15:29:52 +0100 -Subject: [PATCH] middle-end: check explicitly for external or constants when - checking for loop invariant [PR116817] - -Hi All, - -The previous check if a value was external was checking -!vect_get_internal_def (vinfo, var) but this of course isn't completely right -as they could reductions etc. - -This changes the check to just explicitly look at externals and constants. -Note that reductions remain unhandled here, but we don't support codegen of -boolean reductions today anyway. - -So at the time we do then this would have the be handled as well in lowering. - -Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. - -Ok for master? - -Thanks, -Tamar - -gcc/ChangeLog: - - PR tree-optimization/116817 - * tree-vect-patterns.cc (vect_recog_bool_pattern): Check for const or - externals. - -gcc/testsuite/ChangeLog: - -PR tree-optimization/116817 - * g++.dg/vect/pr116817.cc: New test. ---- - gcc/testsuite/g++.dg/vect/pr116817.cc | 16 ++++++++++++++++ - gcc/tree-vect-patterns.cc | 5 ++++- - 2 files changed, 20 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/g++.dg/vect/pr116817.cc - -diff --git a/gcc/testsuite/g++.dg/vect/pr116817.cc b/gcc/testsuite/g++.dg/vect/pr116817.cc -new file mode 100644 -index 00000000000..7e28982fb13 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/vect/pr116817.cc -@@ -0,0 +1,16 @@ -+/* { dg-do compile } */ -+/* { dg-additional-options "-O3" } */ -+ -+int main_ulData0; -+unsigned *main_pSrcBuffer; -+int main(void) { -+ int iSrc = 0; -+ bool bData0; -+ for (; iSrc < 4; iSrc++) { -+ if (bData0) -+ main_pSrcBuffer[iSrc] = main_ulData0; -+ else -+ main_pSrcBuffer[iSrc] = 0; -+ bData0 = !bData0; -+ } -+} -diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc -index e7e877dd2adb55262822f1660f8d92b42d44e6d0..f0298b2ab97a1e7dd0d943340e1389c3c0fa796e 100644 ---- a/gcc/tree-vect-patterns.cc -+++ b/gcc/tree-vect-patterns.cc -@@ -6062,12 +6062,15 @@ vect_recog_bool_pattern (vec_info *vinfo, - if (get_vectype_for_scalar_type (vinfo, type) == NULL_TREE) - return NULL; - -+ stmt_vec_info var_def_info = vinfo->lookup_def (var); - if (check_bool_pattern (var, vinfo, bool_stmts)) - var = adjust_bool_stmts (vinfo, bool_stmts, type, stmt_vinfo); - else if (integer_type_for_mask (var, vinfo)) - return NULL; - else if (TREE_CODE (TREE_TYPE (var)) == BOOLEAN_TYPE -- && !vect_get_internal_def (vinfo, var)) -+ && (!var_def_info -+ || STMT_VINFO_DEF_TYPE (var_def_info) == vect_external_def -+ || STMT_VINFO_DEF_TYPE (var_def_info) == vect_constant_def)) - { - /* If the condition is already a boolean then manually convert it to a - mask of the given integer type but don't set a vectype. */ diff --git a/sys-devel/gcc/files/gcc-15.0.0_pre20241117-PR112556-c-Allow-bool-and-enum-null-pointer-constants.patch b/sys-devel/gcc/files/gcc-15.0.0_pre20241117-PR112556-c-Allow-bool-and-enum-null-pointer-constants.patch new file mode 100644 index 000000000000..b17c1e04998c --- /dev/null +++ b/sys-devel/gcc/files/gcc-15.0.0_pre20241117-PR112556-c-Allow-bool-and-enum-null-pointer-constants.patch @@ -0,0 +1,244 @@ +From 3d525fce70fa0ffa0b22af6e213643e1ceca5ab5 Mon Sep 17 00:00:00 2001 +Message-ID: <3d525fce70fa0ffa0b22af6e213643e1ceca5ab5.1731987909.git.sam@gentoo.org> +From: Joseph Myers <josmyers@redhat.com> +Date: Mon, 18 Nov 2024 22:24:48 +0000 +Subject: [PATCH] c: Allow bool and enum null pointer constants [PR112556] + +As reported in bug 112556, GCC wrongly rejects conversion of null +pointer constants with bool or enum type to pointers in +convert_for_assignment (assignment, initialization, argument passing, +return). Fix the code there to allow BOOLEAN_TYPE and ENUMERAL_TYPE; +it already allowed INTEGER_TYPE and BITINT_TYPE. + +This bug (together with -std=gnu23 meaning false has type bool rather +than int) has in turn resulted in people thinking they need to fix +code using false as a null pointer constant for C23 compatibility. +While such a usage is certainly questionable, it has nothing to do +with C23 compatibility and the right place for warnings about such +usage is -Wzero-as-null-pointer-constant. I think it would be +appropriate to extend -Wzero-as-null-pointer-constant to cover +BOOLEAN_TYPE, ENUMERAL_TYPE and BITINT_TYPE (in all the various +contexts in which that option generates warnings), though this patch +doesn't do anything about that option. + +Bootstrapped with no regressions for x86-64-pc-linux-gnu. + + PR c/112556 + +gcc/c/ + * c-typeck.cc (convert_for_assignment): Allow conversion of + ENUMERAL_TYPE and BOOLEAN_TYPE null pointer constants to pointers. + +gcc/testsuite/ + * gcc.dg/c11-null-pointer-constant-1.c, + gcc.dg/c23-null-pointer-constant-1.c: New tests. +--- + gcc/c/c-typeck.cc | 2 + + .../gcc.dg/c11-null-pointer-constant-1.c | 55 ++++++++ + .../gcc.dg/c23-null-pointer-constant-1.c | 120 ++++++++++++++++++ + 3 files changed, 177 insertions(+) + create mode 100644 gcc/testsuite/gcc.dg/c11-null-pointer-constant-1.c + create mode 100644 gcc/testsuite/gcc.dg/c23-null-pointer-constant-1.c + +diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc +index 26ee0ebf91f0..a701dd090fb8 100644 +--- a/gcc/c/c-typeck.cc ++++ b/gcc/c/c-typeck.cc +@@ -8457,6 +8457,8 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type, + } + else if (codel == POINTER_TYPE + && (coder == INTEGER_TYPE ++ || coder == ENUMERAL_TYPE ++ || coder == BOOLEAN_TYPE + || coder == NULLPTR_TYPE + || coder == BITINT_TYPE)) + { +diff --git a/gcc/testsuite/gcc.dg/c11-null-pointer-constant-1.c b/gcc/testsuite/gcc.dg/c11-null-pointer-constant-1.c +new file mode 100644 +index 000000000000..f463a1a59da3 +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/c11-null-pointer-constant-1.c +@@ -0,0 +1,55 @@ ++/* Test zero with different types as null pointer constant: bug 112556. */ ++/* { dg-do compile } */ ++/* { dg-options "-std=c11 -pedantic-errors -Wno-pointer-compare" } */ ++ ++enum e { ZERO }; ++ ++void *p1 = 0; ++void *p2 = 0LL; ++void *p3 = (char) 0; ++void *p4 = 0UL; ++void *p5 = (_Bool) 0; ++void *p6 = (enum e) ZERO; ++ ++void f (void *); ++ ++void * ++g (void) ++{ ++ p1 = 0; ++ p2 = 0LL; ++ p3 = (char) 0; ++ p4 = 0UL; ++ p5 = (_Bool) 0; ++ p6 = (enum e) ZERO; ++ f (0); ++ f (0ULL); ++ f (0L); ++ f ((char) 0); ++ f ((_Bool) 0); ++ f ((enum e) ZERO); ++ (1 ? p1 : 0); ++ (1 ? p1 : 0L); ++ (1 ? p1 : 0ULL); ++ (1 ? p1 : (char) 0); ++ (1 ? p1 : (_Bool) 0); ++ (1 ? p1 : (enum e) 0); ++ p1 == 0; ++ p1 == 0LL; ++ p1 == 0U; ++ p1 == (char) 0; ++ p1 == (_Bool) 0; ++ p1 == (enum e) 0; ++ p1 != 0; ++ p1 != 0LL; ++ p1 != 0U; ++ p1 != (char) 0; ++ p1 != (_Bool) 0; ++ p1 != (enum e) 0; ++ return 0; ++ return 0UL; ++ return 0LL; ++ return (char) 0; ++ return (_Bool) 0; ++ return (enum e) 0; ++} +diff --git a/gcc/testsuite/gcc.dg/c23-null-pointer-constant-1.c b/gcc/testsuite/gcc.dg/c23-null-pointer-constant-1.c +new file mode 100644 +index 000000000000..71b66cc35d6b +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/c23-null-pointer-constant-1.c +@@ -0,0 +1,120 @@ ++/* Test zero with different types as null pointer constant: bug 112556. */ ++/* { dg-do compile } */ ++/* { dg-options "-std=c23 -pedantic-errors -Wno-pointer-compare" } */ ++ ++enum e { ZERO }; ++enum e2 : bool { BZERO }; ++enum e3 : long { LZERO }; ++ ++void *p1 = 0; ++void *p2 = 0LL; ++void *p3 = (char) 0; ++void *p4 = 0UL; ++void *p5 = (bool) 0; ++void *p6 = (enum e) ZERO; ++void *p7 = false; ++void *p8 = BZERO; ++void *p9 = (enum e2) 0; ++void *p10 = LZERO; ++void *p11 = (enum e3) 0; ++#ifdef __BITINT_MAXWIDTH__ ++void *p12 = 0wb; ++void *p13 = 0uwb; ++#endif ++ ++void f (void *); ++ ++void * ++g (void) ++{ ++ p1 = 0; ++ p2 = 0LL; ++ p3 = (char) 0; ++ p4 = 0UL; ++ p5 = (bool) 0; ++ p6 = (enum e) ZERO; ++ p7 = false; ++ p8 = BZERO; ++ p9 = (enum e2) 0; ++ p10 = LZERO; ++ p11 = (enum e3) 0; ++#ifdef __BITINT_MAXWIDTH__ ++ p12 = 0wb; ++ p13 = 0uwb; ++#endif ++ f (0); ++ f (0ULL); ++ f (0L); ++ f ((char) 0); ++ f ((bool) 0); ++ f ((enum e) ZERO); ++ f (false); ++ f (BZERO); ++ f ((enum e2) 0); ++ f (LZERO); ++ f ((enum e3) 0); ++#ifdef __BITINT_MAXWIDTH__ ++ f (0wb); ++ f (0uwb); ++#endif ++ (1 ? p1 : 0); ++ (1 ? p1 : 0L); ++ (1 ? p1 : 0ULL); ++ (1 ? p1 : (char) 0); ++ (1 ? p1 : (bool) 0); ++ (1 ? p1 : (enum e) 0); ++ (1 ? p1 : false); ++ (1 ? p1 : BZERO); ++ (1 ? p1 : (enum e2) 0); ++ (1 ? p1 : LZERO); ++ (1 ? p1 : (enum e3) 0); ++#ifdef __BITINT_MAXWIDTH__ ++ (1 ? p1 : 0wb); ++ (1 ? p1 : 0uwb); ++#endif ++ p1 == 0; ++ p1 == 0LL; ++ p1 == 0U; ++ p1 == (char) 0; ++ p1 == (bool) 0; ++ p1 == (enum e) 0; ++ p1 == false; ++ p1 == BZERO; ++ p1 == (enum e2) 0; ++ p1 == LZERO; ++ p1 == (enum e3) 0; ++#ifdef __BITINT_MAXWIDTH__ ++ p1 == 0wb; ++ p1 == 0uwb; ++#endif ++ p1 != 0; ++ p1 != 0LL; ++ p1 != 0U; ++ p1 != (char) 0; ++ p1 != (bool) 0; ++ p1 != (enum e) 0; ++ p1 != false; ++ p1 != BZERO; ++ p1 != (enum e2) 0; ++ p1 != LZERO; ++ p1 != (enum e3) 0; ++#ifdef __BITINT_MAXWIDTH__ ++ p1 != 0wb; ++ p1 != 0uwb; ++#endif ++ return 0; ++ return 0UL; ++ return 0LL; ++ return (char) 0; ++ return (bool) 0; ++ return (enum e) 0; ++ return false; ++ return BZERO; ++ return (enum e2) 0; ++ return LZERO; ++ return (enum e3) 0; ++#ifdef __BITINT_MAXWIDTH__ ++ return 0wb; ++ return 0uwb; ++#endif ++} +-- +2.47.0 diff --git a/sys-devel/gcc/gcc-12.4.1_p20240919.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241031.ebuild index 5d493e9223cd..e3066d71350d 100644 --- a/sys-devel/gcc/gcc-12.4.1_p20240919.ebuild +++ b/sys-devel/gcc/gcc-12.4.1_p20241031.ebuild @@ -39,7 +39,7 @@ if tc_is_live ; then 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" :; fi diff --git a/sys-devel/gcc/gcc-12.4.1_p20241114.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241114.ebuild new file mode 100644 index 000000000000..e3066d71350d --- /dev/null +++ b/sys-devel/gcc/gcc-12.4.1_p20241114.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +TOOLCHAIN_HAS_TESTS=1 +PATCH_GCC_VER="12.4.0" +PATCH_VER="1" +MUSL_VER="1" +MUSL_GCC_VER="12.4.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 ~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}" +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.4.1_p20240926.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241121.ebuild index 5845745860b0..5845745860b0 100644 --- a/sys-devel/gcc/gcc-12.4.1_p20240926.ebuild +++ b/sys-devel/gcc/gcc-12.4.1_p20241121.ebuild diff --git a/sys-devel/gcc/gcc-12.4.1_p20241003.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241128.ebuild index 5845745860b0..e358f3fa9358 100644 --- a/sys-devel/gcc/gcc-12.4.1_p20241003.ebuild +++ b/sys-devel/gcc/gcc-12.4.1_p20241128.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="12.4.0" -PATCH_VER="1" +PATCH_VER="2" MUSL_VER="1" MUSL_GCC_VER="12.4.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-12.4.1_p20241010.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241205.ebuild index 5845745860b0..e358f3fa9358 100644 --- a/sys-devel/gcc/gcc-12.4.1_p20241010.ebuild +++ b/sys-devel/gcc/gcc-12.4.1_p20241205.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="12.4.0" -PATCH_VER="1" +PATCH_VER="2" MUSL_VER="1" MUSL_GCC_VER="12.4.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-13.3.1_p20240920.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241025.ebuild index de6b5b831fa5..98f9b64a624d 100644 --- a/sys-devel/gcc/gcc-13.3.1_p20240920.ebuild +++ b/sys-devel/gcc/gcc-13.3.1_p20241025.ebuild @@ -39,7 +39,7 @@ if tc_is_live ; then 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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" :; fi diff --git a/sys-devel/gcc/gcc-13.3.1_p20241115.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241115.ebuild new file mode 100644 index 000000000000..98f9b64a624d --- /dev/null +++ b/sys-devel/gcc/gcc-13.3.1_p20241115.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" +TOOLCHAIN_HAS_TESTS=1 +PATCH_GCC_VER="13.3.0" +MUSL_GCC_VER="13.2.0" +PATCH_VER="1" +MUSL_VER="2" +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 ~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}" +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-13.3.1_p20240927.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241122.ebuild index 6bff7d382179..6bff7d382179 100644 --- a/sys-devel/gcc/gcc-13.3.1_p20240927.ebuild +++ b/sys-devel/gcc/gcc-13.3.1_p20241122.ebuild diff --git a/sys-devel/gcc/gcc-13.3.1_p20241004.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241129.ebuild index 6bff7d382179..9267c223d8b5 100644 --- a/sys-devel/gcc/gcc-13.3.1_p20241004.ebuild +++ b/sys-devel/gcc/gcc-13.3.1_p20241129.ebuild @@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="13.3.0" MUSL_GCC_VER="13.2.0" -PATCH_VER="1" +PATCH_VER="2" MUSL_VER="2" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-13.3.1_p20241206.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241206.ebuild new file mode 100644 index 000000000000..9267c223d8b5 --- /dev/null +++ b/sys-devel/gcc/gcc-13.3.1_p20241206.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" +TOOLCHAIN_HAS_TESTS=1 +PATCH_GCC_VER="13.3.0" +MUSL_GCC_VER="13.2.0" +PATCH_VER="2" +MUSL_VER="2" +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 ~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}" +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.2.1_p20240921.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241116.ebuild index 265a890763e4..f10977e0f7be 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20240921.ebuild +++ b/sys-devel/gcc/gcc-14.2.1_p20241116.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="14.2.0" -PATCH_VER="1" +PATCH_VER="3" MUSL_VER="1" MUSL_GCC_VER="14.1.0" PYTHON_COMPAT=( python3_{10..12} ) @@ -27,7 +27,7 @@ if tc_is_live ; then EGIT_BRANCH=releases/gcc-$(ver_cut 1) elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then # m68k doesnt build (ICE, bug 932733) - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" :; fi diff --git a/sys-devel/gcc/gcc-14.2.1_p20240817.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241123.ebuild index 265a890763e4..f85c0a0e44df 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20240817.ebuild +++ b/sys-devel/gcc/gcc-14.2.1_p20241123.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="14.2.0" -PATCH_VER="1" +PATCH_VER="3" MUSL_VER="1" MUSL_GCC_VER="14.1.0" PYTHON_COMPAT=( python3_{10..12} ) @@ -27,7 +27,7 @@ if tc_is_live ; then EGIT_BRANCH=releases/gcc-$(ver_cut 1) elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then # m68k doesnt build (ICE, bug 932733) - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" :; fi @@ -42,6 +42,7 @@ fi src_prepare() { local p upstreamed_patches=( # add them here + 77_all_m2_docs_sandbox.patch ) for p in "${upstreamed_patches[@]}"; do rm -v "${WORKDIR}/patch/${p}" || die diff --git a/sys-devel/gcc/gcc-14.2.1_p20240928.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241130.ebuild index 5c623e22f08d..79cadacc1a28 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20240928.ebuild +++ b/sys-devel/gcc/gcc-14.2.1_p20241130.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="14.2.0" -PATCH_VER="1" +PATCH_VER="5" MUSL_VER="1" MUSL_GCC_VER="14.1.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-14.2.1_p20241005.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241207.ebuild index 5c623e22f08d..2120e54a5d65 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20241005.ebuild +++ b/sys-devel/gcc/gcc-14.2.1_p20241207.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="14.2.0" -PATCH_VER="1" +PATCH_VER="6" MUSL_VER="1" MUSL_GCC_VER="14.1.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild new file mode 100644 index 000000000000..ee327823124e --- /dev/null +++ b/sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +TOOLCHAIN_HAS_TESTS=1 +PATCH_GCC_VER="15.0.0" +PATCH_VER="26" +MUSL_VER="2" +MUSL_GCC_VER="15.0.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=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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}" +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}"/${P}-PR112556-c-Allow-bool-and-enum-null-pointer-constants.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-15.0.0_pre20240929-r1.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241124.ebuild index fe87c4b34719..75125b880bdc 100644 --- a/sys-devel/gcc/gcc-15.0.0_pre20240929-r1.ebuild +++ b/sys-devel/gcc/gcc-15.0.0_pre20241124.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="14" +PATCH_VER="28" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-15.0.0_pre20241006.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241201.ebuild index 9df1dbf6b88f..7c6295bee00e 100644 --- a/sys-devel/gcc/gcc-15.0.0_pre20241006.ebuild +++ b/sys-devel/gcc/gcc-15.0.0_pre20241201.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="15" +PATCH_VER="29" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-15.0.0_pre20240929.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241208-r1.ebuild index 32c163ef2ddc..4480a9356d92 100644 --- a/sys-devel/gcc/gcc-15.0.0_pre20240929.ebuild +++ b/sys-devel/gcc/gcc-15.0.0_pre20241208-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="13" +PATCH_VER="31" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sys-devel/gcc/gcc-15.0.0_pre20241208.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241208.ebuild new file mode 100644 index 000000000000..287aa403a70f --- /dev/null +++ b/sys-devel/gcc/gcc-15.0.0_pre20241208.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +TOOLCHAIN_HAS_TESTS=1 +PATCH_GCC_VER="15.0.0" +PATCH_VER="30" +MUSL_VER="2" +MUSL_GCC_VER="15.0.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=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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}" +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-8.5.0-r1.ebuild b/sys-devel/gcc/gcc-8.5.0-r2.ebuild index c1ae8df40177..bb2c7eb73ab8 100644 --- a/sys-devel/gcc/gcc-8.5.0-r1.ebuild +++ b/sys-devel/gcc/gcc-8.5.0-r2.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI="8" TOOLCHAIN_PATCH_SUFFIX="xz" TOOLCHAIN_PATCH_DEV="sam" diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index 853d96579504..9b51b891ae5e 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -77,6 +77,7 @@ <flag name="graphite">Add support for the framework for loop optimizations based on a polyhedral intermediate representation</flag> <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag> <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation.</flag> + <flag name="libgdiagnostics">Provide libgdiagnostics (https://gcc.gnu.org/wiki/libgdiagnostics). This also installs the 'sarif-replay' tool.</flag> <flag name="libssp">Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag> <flag name="lto"> Build using Link Time Optimizations (LTO). diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest index fe3a242e1a81..0104221a7a87 100644 --- a/sys-devel/gettext/Manifest +++ b/sys-devel/gettext/Manifest @@ -4,3 +4,5 @@ DIST gettext-0.22.4.tar.xz 10255384 BLAKE2B 3f93aa5aef8e40d2e01acaa5aeed11efefd0 DIST gettext-0.22.4.tar.xz.sig 833 BLAKE2B fbb00b53c807934a11263c120861971fffebbd39689eda1fae0fb956476e69c3fb6799440cbf3acfcf43ecea2c134ea4dadb95becbac98badb43e546f3c8e9fb SHA512 a774c98de643b1ea3df645e451878652c2baa5cd786642aa457e6d5f5c44787cb1231eb15ad4390acdf314822633acaffffaa853eb69cbbc72c3b79b547a8854 DIST gettext-0.22.5.tar.xz 10270724 BLAKE2B 18c383518f5a78b5c04cf76de976524da2a87a892a30d6386778bb4c7dd526ffc3f14f484906c5d3a513b7caf76ea560e53962b325e552182d6940055d798f24 SHA512 a60999bb9d09441f138214d87acb7e59aab81e765bb9253a77c54902681c5de164a5a04de2a9778dfb479dbdefaab2d5de1fbaf6095c555c43e7e9fd7a1c09bd DIST gettext-0.22.5.tar.xz.sig 833 BLAKE2B bb3e5ced34ab109f498347a3567103fe3491f69addb4a5ce25bf854fae1a11340eef1a9826b369d2416b53e5f7065aeebdb1609615f064cf7fb4151e82a5b4e5 SHA512 87f1df69206702be928b09a59a19ae4c23072cbc78ea16e76bfc4c929de76a3c0bb8e4eb2c3100c6e7b3b51d23e3b0e484c7e1d576ba7e25fd887934dc9ed8f7 +DIST gettext-0.23.tar.xz 11053572 BLAKE2B 208e5a73ed021c22357b1a1f0324dd7c9fa14b458b610c6f2fbd85f6541dd2bc23179c63dcd43000689482d8a6337f5255f501581d67ee2338ef3d50ec5e9c2e SHA512 1de09c0a83b1b4bb810abacbaf7c3e0fedbfbddea1cf7c89df3838c5f0a14cf58d686eb5876cfae302acb31c93beefb61a12c8a889a998fd235798699dc2c155 +DIST gettext-0.23.tar.xz.sig 833 BLAKE2B 5da93144e3d2eb745729b3f2d68e85ad508214b62694a22da7d37c6a3c9eaacd0d44339564b6373690dce29d9140a8af31ccea9e61726d2651ecc8234405b681 SHA512 25a6a2d1d9eb406b2be036b01f709a0badb84b70e23908c51fcbc1e26836510748f9623a075622271962d37bb859d4553755c6ed9832c1f39742ae1179b9292a diff --git a/sys-devel/gettext/files/gettext-0.23-libxml2-2.12.0.patch b/sys-devel/gettext/files/gettext-0.23-libxml2-2.12.0.patch new file mode 100644 index 000000000000..7a22f6e7ea90 --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.23-libxml2-2.12.0.patch @@ -0,0 +1,44 @@ +https://git.savannah.gnu.org/cgit/gettext.git/commit/?id=adfbe2ee7cd9b47a0465aa9a07d773fa290f46c1 + +From adfbe2ee7cd9b47a0465aa9a07d773fa290f46c1 Mon Sep 17 00:00:00 2001 +From: Bruno Haible <bruno@clisp.org> +Date: Sun, 1 Dec 2024 19:35:51 +0100 +Subject: Fix compilation error with libxml2 >= 2.12.0 and gcc >= 14. + +Reported by Sam James <sam@gentoo.org> +at <https://savannah.gnu.org/bugs/?66506>. + +* gettext-tools/src/its.c: Include <libxml/xmlversion.h>. +(structured_error): Adapt to API change. +--- + gettext-tools/src/its.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/gettext-tools/src/its.c b/gettext-tools/src/its.c +index 8ee7ab40f..3f28f8851 100644 +--- a/gettext-tools/src/its.c ++++ b/gettext-tools/src/its.c +@@ -28,6 +28,7 @@ + #include <stdint.h> + #include <stdlib.h> + ++#include <libxml/xmlversion.h> + #include <libxml/xmlerror.h> + #include <libxml/tree.h> + #include <libxml/parser.h> +@@ -82,7 +83,13 @@ + /* ----------------------------- Error handling ----------------------------- */ + + static void ++/* Adapt to API change in libxml 2.12.0. ++ See <https://gitlab.gnome.org/GNOME/libxml2/-/issues/622>. */ ++#if LIBXML_VERSION >= 21200 ++structured_error (void *data, const xmlError *err) ++#else + structured_error (void *data, xmlError *err) ++#endif + { + error (0, err->level == XML_ERR_FATAL ? EXIT_FAILURE : 0, + _("%s error: %s"), "libxml2", err->message); +-- +cgit v1.2.3-70-g09d2 diff --git a/sys-devel/gettext/files/gettext-0.23-no-nls.patch b/sys-devel/gettext/files/gettext-0.23-no-nls.patch new file mode 100644 index 000000000000..cade5e421e0b --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.23-no-nls.patch @@ -0,0 +1,163 @@ +https://bugs.gentoo.org/945817 +https://savannah.gnu.org/bugs/?66533 +https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4a2fe717080b34a2770a674235bb2b6e3e3dd86f + +-- +Patch from: +https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4a2fe717080b34a2770a674235bb2b6e3e3dd86f +Removed non-applying Changelog hunk & fixed patch prefix to match file path in the tarball. + +Bug: https://bugs.gentoo.org/945817 +Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> +--- a/gettext-tools/gnulib-m4/bison-i18n.m4 ++++ b/gettext-tools/gnulib-m4/bison-i18n.m4 +@@ -1,5 +1,5 @@ + # bison-i18n.m4 +-# serial 5 ++# serial 6 + dnl Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -57,27 +57,28 @@ AC_DEFUN([BISON_I18N], + fi + fi + AC_SUBST([BISON_LOCALEDIR]) ++ fi + +- dnl Define BISON_LOCALEDIR_c and BISON_LOCALEDIR_c_make. +- dnl Find the final value of BISON_LOCALEDIR. +- gl_saved_prefix="${prefix}" +- gl_saved_datarootdir="${datarootdir}" +- gl_saved_localedir="${localedir}" +- gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" +- dnl Unfortunately, prefix gets only finally determined at the end of +- dnl configure. +- if test "X$prefix" = "XNONE"; then +- prefix="$ac_default_prefix" +- fi +- eval datarootdir="$datarootdir" +- eval localedir="$localedir" +- eval BISON_LOCALEDIR="$BISON_LOCALEDIR" +- gl_BUILD_TO_HOST([BISON_LOCALEDIR]) +- BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" +- localedir="${gl_saved_localedir}" +- datarootdir="${gl_saved_datarootdir}" +- prefix="${gl_saved_prefix}" ++ dnl Define BISON_LOCALEDIR_c and BISON_LOCALEDIR_c_make. ++ dnl Find the final value of BISON_LOCALEDIR. ++ gl_saved_prefix="${prefix}" ++ gl_saved_datarootdir="${datarootdir}" ++ gl_saved_localedir="${localedir}" ++ gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" ++ dnl Unfortunately, prefix gets only finally determined at the end of ++ dnl configure. ++ if test "X$prefix" = "XNONE"; then ++ prefix="$ac_default_prefix" + fi ++ eval datarootdir="$datarootdir" ++ eval localedir="$localedir" ++ eval BISON_LOCALEDIR="$BISON_LOCALEDIR" ++ gl_BUILD_TO_HOST([BISON_LOCALEDIR]) ++ BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" ++ localedir="${gl_saved_localedir}" ++ datarootdir="${gl_saved_datarootdir}" ++ prefix="${gl_saved_prefix}" ++ + if test $BISON_USE_NLS = yes; then + AC_DEFINE([YYENABLE_NLS], [1], + [Define to 1 to internationalize bison runtime messages.]) + +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -29892,17 +29892,18 @@ fi + fi + fi + ++ fi + +- gl_saved_prefix="${prefix}" +- gl_saved_datarootdir="${datarootdir}" +- gl_saved_localedir="${localedir}" +- gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" +- if test "X$prefix" = "XNONE"; then +- prefix="$ac_default_prefix" +- fi +- eval datarootdir="$datarootdir" +- eval localedir="$localedir" +- eval BISON_LOCALEDIR="$BISON_LOCALEDIR" ++ gl_saved_prefix="${prefix}" ++ gl_saved_datarootdir="${datarootdir}" ++ gl_saved_localedir="${localedir}" ++ gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" ++ if test "X$prefix" = "XNONE"; then ++ prefix="$ac_default_prefix" ++ fi ++ eval datarootdir="$datarootdir" ++ eval localedir="$localedir" ++ eval BISON_LOCALEDIR="$BISON_LOCALEDIR" + + + +@@ -29927,11 +29928,11 @@ fi + fi + + +- BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" +- localedir="${gl_saved_localedir}" +- datarootdir="${gl_saved_datarootdir}" +- prefix="${gl_saved_prefix}" +- fi ++ BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" ++ localedir="${gl_saved_localedir}" ++ datarootdir="${gl_saved_datarootdir}" ++ prefix="${gl_saved_prefix}" ++ + if test $BISON_USE_NLS = yes; then + + printf "%s\n" "#define YYENABLE_NLS 1" >>confdefs.h +@@ -61062,17 +61063,18 @@ fi + fi + fi + ++ fi + +- gl_saved_prefix="${prefix}" +- gl_saved_datarootdir="${datarootdir}" +- gl_saved_localedir="${localedir}" +- gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" +- if test "X$prefix" = "XNONE"; then +- prefix="$ac_default_prefix" +- fi +- eval datarootdir="$datarootdir" +- eval localedir="$localedir" +- eval BISON_LOCALEDIR="$BISON_LOCALEDIR" ++ gl_saved_prefix="${prefix}" ++ gl_saved_datarootdir="${datarootdir}" ++ gl_saved_localedir="${localedir}" ++ gl_saved_bisonlocaledir="${BISON_LOCALEDIR}" ++ if test "X$prefix" = "XNONE"; then ++ prefix="$ac_default_prefix" ++ fi ++ eval datarootdir="$datarootdir" ++ eval localedir="$localedir" ++ eval BISON_LOCALEDIR="$BISON_LOCALEDIR" + + + +@@ -61097,11 +61099,11 @@ fi + fi + + +- BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" +- localedir="${gl_saved_localedir}" +- datarootdir="${gl_saved_datarootdir}" +- prefix="${gl_saved_prefix}" +- fi ++ BISON_LOCALEDIR="${gl_saved_bisonlocaledir}" ++ localedir="${gl_saved_localedir}" ++ datarootdir="${gl_saved_datarootdir}" ++ prefix="${gl_saved_prefix}" ++ + if test $BISON_USE_NLS = yes; then + + printf "%s\n" "#define YYENABLE_NLS 1" >>confdefs.h diff --git a/sys-devel/gettext/gettext-0.22.5-r1.ebuild b/sys-devel/gettext/gettext-0.22.5-r1.ebuild new file mode 100644 index 000000000000..cbcedaee51df --- /dev/null +++ b/sys-devel/gettext/gettext-0.22.5-r1.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Note: Keep version bumps in sync with dev-libs/libintl. + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc +inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs +inherit flag-o-matic + +DESCRIPTION="GNU locale utilities" +HOMEPAGE="https://www.gnu.org/software/gettext/" + +if [[ ${PV} == *_rc* ]] ; then + SRC_URI=" + https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig ) + " + S="${WORKDIR}/${P/_/-}" +else + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +# Only libasprintf is under the LGPL (and libintl is in a sep package), +# so put that license behind USE=cxx. +LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" +SLOT="0" +IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr" + +# Only runtime goes multilib +# +# Note: The version of libxml2 corresponds to the version bundled via gnulib. +# If the build detects too old of a system version, it will end up falling back +# to the bundled copy (bug #596918). +# +# Note: expat lacks a subslot because it is dynamically loaded at runtime. We +# would depend on older subslots if they were available (based on the ABIs that +# are explicitly handled), but expat doesn't currently use subslots. +DEPEND=" + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.3:= + dev-libs/expat + acl? ( virtual/acl ) + ncurses? ( sys-libs/ncurses:= ) + java? ( >=virtual/jdk-1.8:* ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + git? ( dev-vcs/git ) + java? ( >=virtual/jre-1.8:* ) +" +BDEPEND=" + git? ( dev-vcs/git ) + verify-sig? ( sec-keys/openpgp-keys-gettext ) +" +PDEPEND="emacs? ( app-emacs/po-mode )" + +MULTILIB_WRAPPED_HEADERS=( + # only installed for native ABI + /usr/include/gettext-po.h + + /usr/include/autosprintf.h + /usr/include/textstyle.h + /usr/include/textstyle/stdbool.h + /usr/include/textstyle/version.h + /usr/include/textstyle/woe32dll.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch +) + +QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" + +QA_CONFIG_IMPL_DECL_SKIP=( + # bug #898570 + unreachable + MIN + alignof + static_assert +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + default + + # gettext-0.21.1-java-autoconf.patch changes + # gettext-{runtime,tools}/configure.ac and the corresponding + # configure scripts. Avoid regenerating other autotools output. + #touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die + # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac + #touch -c configure || die + + elibtoolize + + if use elibc_musl || use elibc_Darwin; then + eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch + fi +} + +multilib_src_configure() { + local myconf=( + # switches common to runtime and top-level + --cache-file="${BUILD_DIR}"/config.cache + #--docdir="\$(datarootdir)/doc/${PF}" + + # Emacs support is now in a separate package + --without-emacs + --without-lispdir + # glib depends on us so avoid circular deps + --with-included-glib + # libcroco depends on glib which ... ^^^ + --with-included-libcroco + # this will _disable_ libunistring (since it is not bundled), + # see bug #326477 + --with-included-libunistring + # Never build libintl since it's in dev-libs/libintl now. + --without-included-gettext + # Never build bundled copy of libxml2. + --without-included-libxml + + --disable-csharp + --without-cvs + + $(use_enable acl) + $(use_enable cxx c++) + $(use_enable cxx libasprintf) + $(use_with git) + $(multilib_native_use_enable java) + $(use_enable ncurses curses) + $(use_enable nls) + $(use_enable openmp) + $(use_enable static-libs static) + $(use_enable xattr attr) + ) + + local ECONF_SOURCE="${S}" + if ! multilib_is_native_abi ; then + # for non-native ABIs, we build runtime only + ECONF_SOURCE+=/gettext-runtime + fi + + # should be gone on next release, for memset_s breakage + [[ ${CHOST} == *-solaris* ]] && append-cppflags -D__STDC_WANT_LIB_EXT1__=1 + + econf "${myconf[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi ; then + dosym msgfmt /usr/bin/gmsgfmt # bug #43435 + dobin gettext-tools/misc/gettextize + fi + + # 909041 never install libintl which upstream insists on building + rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + if use java ; then + java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar + rm "${ED}"/usr/share/${PN}/*.jar || die + rm "${ED}"/usr/share/${PN}/*.class || die + if use doc ; then + java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2 + fi + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS + + if use doc ; then + docinto html + dodoc "${ED}"/usr/share/doc/${PF}/*.html + else + rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} + fi + rm "${ED}"/usr/share/doc/${PF}/*.html || die +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} diff --git a/sys-devel/gettext/gettext-0.22.5.ebuild b/sys-devel/gettext/gettext-0.22.5.ebuild index d2b3ec937724..88afc730dd6e 100644 --- a/sys-devel/gettext/gettext-0.22.5.ebuild +++ b/sys-devel/gettext/gettext-0.22.5.ebuild @@ -23,7 +23,7 @@ else mirror://gnu/${PN}/${P}.tar.xz verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) " - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi # Only libasprintf is under the LGPL (and libintl is in a sep package), diff --git a/sys-devel/gettext/gettext-0.23.ebuild b/sys-devel/gettext/gettext-0.23.ebuild new file mode 100644 index 000000000000..05471c9bd42f --- /dev/null +++ b/sys-devel/gettext/gettext-0.23.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Note: Keep version bumps in sync with dev-libs/libintl. + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc +inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs + +DESCRIPTION="GNU locale utilities" +HOMEPAGE="https://www.gnu.org/software/gettext/" + +if [[ ${PV} == *_rc* ]] ; then + SRC_URI=" + https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig ) + " + S="${WORKDIR}/${P/_/-}" +else + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +# Only libasprintf is under the LGPL (and libintl is in a sep package), +# so put that license behind USE=cxx. +LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" +SLOT="0" +IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr" + +# Only runtime goes multilib +# +# Note: The version of libxml2 corresponds to the version bundled via gnulib. +# If the build detects too old of a system version, it will end up falling back +# to the bundled copy (bug #596918). +# +# Note: expat lacks a subslot because it is dynamically loaded at runtime. We +# would depend on older subslots if they were available (based on the ABIs that +# are explicitly handled), but expat doesn't currently use subslots. +DEPEND=" + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.3:= + dev-libs/expat + acl? ( virtual/acl ) + ncurses? ( sys-libs/ncurses:= ) + java? ( >=virtual/jdk-1.8:* ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + git? ( dev-vcs/git ) + java? ( >=virtual/jre-1.8:* ) +" +BDEPEND=" + git? ( dev-vcs/git ) + verify-sig? ( sec-keys/openpgp-keys-gettext ) +" +PDEPEND="emacs? ( app-emacs/po-mode )" + +MULTILIB_WRAPPED_HEADERS=( + # only installed for native ABI + /usr/include/gettext-po.h + + /usr/include/autosprintf.h + /usr/include/textstyle.h + /usr/include/textstyle/stdbool.h + /usr/include/textstyle/version.h + /usr/include/textstyle/woe32dll.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch + "${FILESDIR}"/${PN}-0.23-libxml2-2.12.0.patch + "${FILESDIR}"/${PN}-0.23-no-nls.patch +) + +QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" + +QA_CONFIG_IMPL_DECL_SKIP=( + # bug #898570 + unreachable + MIN + alignof + static_assert +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + default + + # gettext-0.23-no-nls.patch changes gettext-tools/configure.ac and the + # corresponding configure scripts. Avoid regenerating other autotools output. + touch -c gettext-tools/{aclocal.m4,Makefile.in,config.h.in,configure} || die + # Makefile.am adds a dependency on gettext-tools/configure.ac + touch -c configure || die + + elibtoolize + + if use elibc_musl || use elibc_Darwin; then + eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch + fi +} + +multilib_src_configure() { + local myconf=( + # switches common to runtime and top-level + --cache-file="${BUILD_DIR}"/config.cache + #--docdir="\$(datarootdir)/doc/${PF}" + + # Emacs support is now in a separate package + --without-emacs + --without-lispdir + # glib depends on us so avoid circular deps + --with-included-glib + # libcroco depends on glib which ... ^^^ + --with-included-libcroco + # this will _disable_ libunistring (since it is not bundled), + # see bug #326477 + --with-included-libunistring + # Never build libintl since it's in dev-libs/libintl now. + --without-included-gettext + # Never build bundled copy of libxml2. + --without-included-libxml + + --disable-csharp + --without-cvs + + $(use_enable acl) + $(use_enable cxx c++) + $(use_enable cxx libasprintf) + $(use_with git) + $(multilib_native_use_enable java) + $(use_enable ncurses curses) + $(use_enable nls) + $(use_enable openmp) + $(use_enable static-libs static) + $(use_enable xattr attr) + ) + + local ECONF_SOURCE="${S}" + if ! multilib_is_native_abi ; then + # for non-native ABIs, we build runtime only + ECONF_SOURCE+=/gettext-runtime + fi + + econf "${myconf[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi ; then + dosym msgfmt /usr/bin/gmsgfmt # bug #43435 + dobin gettext-tools/misc/gettextize + fi + + # 909041 never install libintl which upstream insists on building + rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + if use java ; then + java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar + rm "${ED}"/usr/share/${PN}/*.jar || die + rm "${ED}"/usr/share/${PN}/*.class || die + if use doc ; then + java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2 + fi + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS + + if use doc ; then + docinto html + dodoc "${ED}"/usr/share/doc/${PF}/*.html + else + rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} + fi + rm "${ED}"/usr/share/doc/${PF}/*.html || die +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest index b0eff5f1f0dc..3fa209f388f7 100644 --- a/sys-devel/kgcc64/Manifest +++ b/sys-devel/kgcc64/Manifest @@ -4,20 +4,17 @@ DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac38 DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61 DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e2cac92a13cc7e285d08191dd4a117f41a8faac2359c0e2a16f954c7fef354dda9df8c63bff1c5cefda82602c SHA512 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8 -DIST gcc-12-20240502.tar.xz 79851984 BLAKE2B e3ed4f4fb20ce2ed421fadd40dfd1c6831759228925002146c316683cd0aef47792f433dc9ab120fb79e2afa2aa83cbf68f6b82e97615cac500322d4f0d1cce9 SHA512 c46e6b00f65d96afc65ce6cc9f7591ff81d5789aff9f49fc6fed96047fe27e24a8a103f0b96485e4a717600aeb9b45933ccbb2191eb087275fc1350629c9b842 -DIST gcc-12-20240919.tar.xz 79901284 BLAKE2B cac209e466ccdffd84610e22961bfbdcd70f6bdd838fe595aa5157670f2a3b9d7db688ffe700e4e7f643a1d3dd806686531e519b2a750b942be63a7dbd7dcb42 SHA512 b032e85be5720ea66b6183f3a5d9f2cc8505c21a0fbdb44d292d8143e37b3ec6e8c3417cb8fc7a18e7cbc961d61c51f681b3ea724086d325c05e7918f7949063 +DIST gcc-12-20241031.tar.xz 79916212 BLAKE2B 924acf7048858a5e45fb835e405b7517fd0029e0fd3a565a34c9be9828360449568110bf0844bd29c7de214d62641ec8e8f10211d69560741311fbd0127041b1 SHA512 412b5f24d99a03c045e6ad083be142fcae2e28629ccd755c0eadef40524bd9e8b83ca605112d405cd911cf14a9fc2939449cc8a9403525bd82168aaba66fbc0f +DIST gcc-12-20241114.tar.xz 79902476 BLAKE2B 0d72464116862319513330c00d680658fd70a3a1b38c88defa0f087651bcff050ea128b15c95de06f2d2aa89488f09347cebbc4d13d3438b75f7f88ba1afa2ad SHA512 dc0af29c2454a7bcdd1b52b61de13845dc49fef3f86d87e0eea876dc5a55d93924e3af8cad58fd89725094520290c3183a4385f988aa556d658225ceb15a37ff DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326 DIST gcc-12.3.0-patches-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb +DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62 +DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 -DIST gcc-13-20240503.tar.xz 84417232 BLAKE2B 4024852c3252667054e6086263b2a0e21dfa1e56a7adf4edb2fee4841dc2b41eb3f02dee7b15c5de3a1ac7c438929da4ca584cab07724086f6eb315a331c4a44 SHA512 32b74972ba94d1016e052eb7c7dc976b32d679e40aeafb406bbbc69d34ade3fe0f35d8941ef678eaf0bb33aea1aaba8fbce9122733b12920a470763a18aa6514 -DIST gcc-13-20240614.tar.xz 84463660 BLAKE2B a1b551ff633c31d6972fed173f248ba5f6696eb1566801e180b78a7c7e20933b1aaae40839b4f1529d61166de55125395d4f9a812511c088e73f975bf1d2167f SHA512 1a543ddfb56e793367a43895a7ce4f97daeca6ffd5234ce50e8a7ae0f8db1071e01bdd653fda40d00eb7a680faead8f1d8d1295f983086a33a4c75e4affa2ea5 -DIST gcc-13-20240920.tar.xz 84477260 BLAKE2B f9f0c376d2849a55a61ac5bbbdb456d160e861e8f0acb34651960aa680ec5e8e6d6bdbdeab94c02e51ad1766bd24e5f2dba3a386f6735ea103181dbc1348a943 SHA512 5b7304ea0032a3bd6f111c8da0a9f12958f45e9f117d408e02e8b4892157462c5643891bcedbded7386f5f9987d16a922bd21bd05ad33167379e1579b7baf1aa +DIST gcc-13-20241025.tar.xz 84501292 BLAKE2B f5ba0a429a43d1936fe717850c81c847c90670204de33261fd476396336a1e1cc34c55d5487ac1871a4019c8a3aff59b6c8fdea3f1b7a161a73dbec8679c4d3a SHA512 a921afd451cdad55ee68bdb36861ca0c525de038d247f6e0ff59dbbdb3b41f03d139e7c2939a0999feb8b2f820f9267171a2c657683df0c86b38f0cb379eb0af +DIST gcc-13-20241115.tar.xz 84481880 BLAKE2B 451c7f74a95889683944617c7d38daa77db9afd7e7877bfa6a380a148b12e2aa813fbda73d6866f207d27600c265b44ce471f9f6bfef40eda2a2e56710820d14 SHA512 db0db01cd3918ec563037c70d3e67243c7c38c3878574047cd7a0aab1e7f13476940b2af4d54f1a20416d9e4e02f79a0722da361ce45ed34244f205cbedb1d37 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 -DIST gcc-13.2.0-patches-15.tar.xz 47052 BLAKE2B f145341813d6baf9cbcc3e8421c7f427148503d2aeddd6a2eaac1ad3d470a818292392861542a7915d8b0f2f9b3255603f394b2e6833141658fc035bcd2b5366 SHA512 c89a3fccd944f03d25e076a967c3b220803ee9a6fbedec1daf2c20f629dd6162ce6be4f259522bd193169f0e8307daa9895b5d8581cf975ee086e5abfd675e34 -DIST gcc-13.2.0-patches-17.tar.xz 45036 BLAKE2B 85fe5e6b0da7a4477f0026aaf397d93421503780ef3c91e0a5e3c6897ab73884d4fbc9d2f5f41ce3f3f172fa7eb98e45c348ce41d852457c472360eb2e48691c SHA512 ebe77a32af38df15bc4034e88fb6e90c84b3c0a172d854cabef789cc29bedba14ec0c27fbeae0959027587e02bc882a944ef68a1bb471432d021d11b4b037562 -DIST gcc-13.2.0-patches-18.tar.xz 44820 BLAKE2B 077ca09a3687e23e4ab633cf4a7e57df6293935d89a9b4d3f6234018d5da8d37896463b3bee136addadc86e1b5923157cfbbeed1801837fc92770d6622bbb0ec SHA512 c73512dcf313016b1dda3deb8222734f5e9c4888970801ea6398195b8f3916eaa20d32001a73fb9b8942d7a2e38616428ca4efd54f92ded9f3219679fbff026e -DIST gcc-14-20240817.tar.xz 88024252 BLAKE2B 994b3e263246e344c6898943a17feb63f07b3de02777a77c689e001343119bd451e1ed5c6958f368077f10b4778c65fa492c55d164e2a0b1bbd65b275aae3cd1 SHA512 31de06694efeb2be49b64e9e8314a766d36c3d5f5f2d52d1e0419ba69262b7c344ef0700957eff11007ba5b81bd5e74dea2a2c0286990cb33927bac4a7db9756 -DIST gcc-14-20240921.tar.xz 88149220 BLAKE2B d92a5a92f24a6f4ace3d1e321e7c9149e8a25222669998c8de010be596a18cc161f288e78ce358ce44fd29f28e56bc678a7c8c775a66ffb71a57c642a7f5af75 SHA512 6a50a6af4a5e661d636b6a7b13b0fe36a66e3be3e20ce97b62c4e9878c974396b9066dfccc108f0bf7f3b28b19e57535a415528b0f0ede1de13a4007625012db +DIST gcc-13.3.0-patches-1.tar.xz 45084 BLAKE2B 4a4b2db25de2f17115e08b50d67449bb16de3296e78c165e2540beda7f84c28f6f3e909856c8b864b378f5e050ed149a60adc580faaf08351b81f4c460656493 SHA512 20e820a3e61f792d380651bb2e40b9c18ce7085962bd9302488ebdad1fff41d3742aea40d712daa5862276ca16d0081de722bf1191e86dcf065af5084271f632 +DIST gcc-14-20241116.tar.xz 88185956 BLAKE2B 490972004d93d8f44f8d5751674105fca8c37aaaf6a87f42d665e3a2f8b1091e31ddbe827c6b6c54951feb0e45fa180c91d805fb82c7de584c01081bb4c1d529 SHA512 65b85c23083fd07e4d216480f1e0d2e1343bcef38dfdd181f6d0086103a626736d299387e1b06f634155d32b45678d72587b340d85c57c3b5ed9d7f20613edff DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 -DIST gcc-14.1.0-patches-4.tar.xz 11620 BLAKE2B c819fbdea1f3bf10c8d4214d4c33cf28c1410171d2833b6f8c1225eeefe749ddb815067b3fdb750e5839761aee8d39ffc51ffb492f88e630076818a61b18362b SHA512 0d6e1b04591607dfc8022124b186ce499467c32db7667ee1a640fe2e07706597edc0e4ad5c7ebcb75c8f5fc6e45e9b9ef715402c71ff9ab21fe380007fe5d84f -DIST gcc-14.1.0-patches-5.tar.xz 12504 BLAKE2B 9453bb75c195e43e9b95cee89eee0722dadb8088ce258ae3334ad1023742b41fc0efea45ca4dbd73a20834aa09f72b5fd2d771e1bc58c0cff89a9d2b16ae8dd1 SHA512 b30b5ff1c0234ccfd440ede9e2c13c5fe3d72711ac94996694b3b325ec47f23c6549c41a70f7e08aea16e10fd45d348dcaaef7a7e49a981622d50b21a0971a30 +DIST gcc-14.2.0-patches-3.tar.xz 13920 BLAKE2B 5b3efa54671581d97ae664e73629f247c776d84eea0b10f8d3223502582f1d1086fff86a6cde6c35b6b43d134af4dad3135d3de5531cfccb320a7fc884ab39ef SHA512 d47549e902055414142f650c7098f029410549741542553b1d0c0519f046a958561f92552e44f59663a7645d42316af5dab1462f54f50f2205257be6744c2fce diff --git a/sys-devel/kgcc64/kgcc64-12.3.1_p20240502.ebuild b/sys-devel/kgcc64/kgcc64-12.4.1_p20241031.ebuild index b224186bda08..5c04c35ebe59 100644 --- a/sys-devel/kgcc64/kgcc64-12.3.1_p20240502.ebuild +++ b/sys-devel/kgcc64/kgcc64-12.4.1_p20241031.ebuild @@ -14,10 +14,10 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="3" -PATCH_GCC_VER="12.3.0" +PATCH_VER="1" +PATCH_GCC_VER="12.4.0" MUSL_VER="1" -MUSL_GCC_VER="12.3.0" +MUSL_GCC_VER="12.4.0" GCC_TARGET_NO_MULTILIB=true inherit toolchain diff --git a/sys-devel/kgcc64/kgcc64-12.4.0_p20240919.ebuild b/sys-devel/kgcc64/kgcc64-12.4.1_p20241114.ebuild index 4945bcb6d029..5c04c35ebe59 100644 --- a/sys-devel/kgcc64/kgcc64-12.4.0_p20240919.ebuild +++ b/sys-devel/kgcc64/kgcc64-12.4.1_p20241114.ebuild @@ -14,17 +14,17 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="3" -PATCH_GCC_VER="12.3.0" +PATCH_VER="1" +PATCH_GCC_VER="12.4.0" MUSL_VER="1" -MUSL_GCC_VER="12.3.0" +MUSL_GCC_VER="12.4.0" GCC_TARGET_NO_MULTILIB=true inherit toolchain DESCRIPTION="64bit kernel compiler" # Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" +KEYWORDS="hppa" # unlike every other target, hppa has not unified the 32/64 bit # ports in binutils yet diff --git a/sys-devel/kgcc64/kgcc64-13.3.1_p20240920.ebuild b/sys-devel/kgcc64/kgcc64-13.3.1_p20240920.ebuild deleted file mode 100644 index 906cc3f5c5e3..000000000000 --- a/sys-devel/kgcc64/kgcc64-13.3.1_p20240920.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -case ${CHOST} in - hppa*) CTARGET=hppa64-${CHOST#*-};; - mips*) CTARGET=${CHOST/mips/mips64};; - powerpc*) CTARGET=${CHOST/powerpc/powerpc64};; - s390*) CTARGET=${CHOST/s390/s390x};; - sparc*) CTARGET=${CHOST/sparc/sparc64};; - i?86*) CTARGET=x86_64-${CHOST#*-};; -esac -export CTARGET -TOOLCHAIN_ALLOWED_LANGS="c" -TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="18" -PATCH_GCC_VER="13.2.0" -MUSL_VER="2" -MUSL_GCC_VER="13.2.0" -GCC_TARGET_NO_MULTILIB=true -inherit toolchain - -DESCRIPTION="64bit kernel compiler" - -# Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" - -# unlike every other target, hppa has not unified the 32/64 bit -# ports in binutils yet -BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" - -pkg_postinst() { - toolchain_pkg_postinst - - cd "${ROOT}"/usr/bin - local x - for x in gcc cpp ; do - cat <<-EOF >${CTARGET%%-*}-linux-${x} - #!/bin/sh - exec ${CTARGET}-${x} "\$@" - EOF - chmod a+rx ${CTARGET%%-*}-linux-${x} - done -} diff --git a/sys-devel/kgcc64/kgcc64-13.2.1_p20240503.ebuild b/sys-devel/kgcc64/kgcc64-13.3.1_p20241025.ebuild index 6dc5999d5745..1f092da0147e 100644 --- a/sys-devel/kgcc64/kgcc64-13.2.1_p20240503.ebuild +++ b/sys-devel/kgcc64/kgcc64-13.3.1_p20241025.ebuild @@ -14,8 +14,8 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="15" -PATCH_GCC_VER="13.2.0" +PATCH_VER="1" +PATCH_GCC_VER="13.3.0" MUSL_VER="2" MUSL_GCC_VER="13.2.0" GCC_TARGET_NO_MULTILIB=true diff --git a/sys-devel/kgcc64/kgcc64-13.3.1_p20240614.ebuild b/sys-devel/kgcc64/kgcc64-13.3.1_p20241115.ebuild index 0b25b9046502..1f092da0147e 100644 --- a/sys-devel/kgcc64/kgcc64-13.3.1_p20240614.ebuild +++ b/sys-devel/kgcc64/kgcc64-13.3.1_p20241115.ebuild @@ -14,8 +14,8 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="17" -PATCH_GCC_VER="13.2.0" +PATCH_VER="1" +PATCH_GCC_VER="13.3.0" MUSL_VER="2" MUSL_GCC_VER="13.2.0" GCC_TARGET_NO_MULTILIB=true diff --git a/sys-devel/kgcc64/kgcc64-14.2.1_p20240817.ebuild b/sys-devel/kgcc64/kgcc64-14.2.1_p20240817.ebuild deleted file mode 100644 index b46d16e1bf8e..000000000000 --- a/sys-devel/kgcc64/kgcc64-14.2.1_p20240817.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -case ${CHOST} in - hppa*) CTARGET=hppa64-${CHOST#*-};; - mips*) CTARGET=${CHOST/mips/mips64};; - powerpc*) CTARGET=${CHOST/powerpc/powerpc64};; - s390*) CTARGET=${CHOST/s390/s390x};; - sparc*) CTARGET=${CHOST/sparc/sparc64};; - i?86*) CTARGET=x86_64-${CHOST#*-};; -esac -export CTARGET -TOOLCHAIN_ALLOWED_LANGS="c" -TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="4" -PATCH_GCC_VER="14.1.0" -MUSL_VER="1" -MUSL_GCC_VER="14.1.0" -GCC_TARGET_NO_MULTILIB=true -inherit toolchain - -DESCRIPTION="64bit kernel compiler" - -# Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" - -# unlike every other target, hppa has not unified the 32/64 bit -# ports in binutils yet -BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" - -pkg_postinst() { - toolchain_pkg_postinst - - cd "${ROOT}"/usr/bin - local x - for x in gcc cpp ; do - cat <<-EOF >${CTARGET%%-*}-linux-${x} - #!/bin/sh - exec ${CTARGET}-${x} "\$@" - EOF - chmod a+rx ${CTARGET%%-*}-linux-${x} - done -} diff --git a/sys-devel/kgcc64/kgcc64-14.2.1_p20240921.ebuild b/sys-devel/kgcc64/kgcc64-14.2.1_p20241116.ebuild index 97f17b0f6b9d..0f8a9f5aaf44 100644 --- a/sys-devel/kgcc64/kgcc64-14.2.1_p20240921.ebuild +++ b/sys-devel/kgcc64/kgcc64-14.2.1_p20241116.ebuild @@ -14,8 +14,8 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="5" -PATCH_GCC_VER="14.1.0" +PATCH_VER="3" +PATCH_GCC_VER="14.2.0" MUSL_VER="1" MUSL_GCC_VER="14.1.0" GCC_TARGET_NO_MULTILIB=true @@ -24,7 +24,7 @@ inherit toolchain DESCRIPTION="64bit kernel compiler" # Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" +KEYWORDS="hppa" # unlike every other target, hppa has not unified the 32/64 bit # ports in binutils yet diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild deleted file mode 100644 index 44a21b6fb09f..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild deleted file mode 100644 index 2eb282b65da9..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild deleted file mode 100644 index d8b2ae18b0fb..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild deleted file mode 100644 index 8e68ec8ad532..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~arm64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild deleted file mode 100644 index 595d1276529a..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-20.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-20.ebuild deleted file mode 100644 index b85bf912c557..000000000000 --- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-20.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLD on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/lld:${SLOT} -" - -src_install() { - use native-symlinks || return - - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - dosym ld.lld "${dest}/ld" - for chost in "${chosts[@]}"; do - dosym ld.lld "${dest}/${chost}-ld" - done -} diff --git a/sys-devel/lld-toolchain-symlinks/metadata.xml b/sys-devel/lld-toolchain-symlinks/metadata.xml deleted file mode 100644 index 69ca87c01788..000000000000 --- a/sys-devel/lld-toolchain-symlinks/metadata.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <use> - <flag name="multilib-symlinks"> - Install symlinks for all ABI CHOSTs. Note that this can - result in gcc being overrode for native builds, as well - as conflict with crossdev if used for the same targets. - </flag> - <flag name="native-symlinks"> - Install generic 'ld' symlink, as well as ${CTARGET}-ld. - These symlinks are installed into slotted LLVM bindir, - so they should not take precedence over symlinks installed - into /usr/bin by <pkg>sys-devel/binutils-config</pkg> - but they can be helpful for binutils-free setups. - </flag> - </use> -</pkgmetadata> diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest deleted file mode 100644 index 01e5561d8ea3..000000000000 --- a/sys-devel/lld/Manifest +++ /dev/null @@ -1,14 +0,0 @@ -DIST llvm-gentoo-patchset-16.0.6-r1.tar.xz 17780 BLAKE2B e7c97916df463ff6d3d6374290bad86b3f2a7189fd9da3c6c808cb84160f904f4de1dffa7e98b32d7cacf904beea2df74116384960b0619ff30b7125839fc950 SHA512 74f86aa11614dd86a4af0cba514e98006d6df8ff15effc0c3598c291c7c6139f9310dc2e3ee25e8a3fa960e8a51986a4c48412a8e7269064197102fd9bbeac7c -DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 -DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 -DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 -DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 -DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 -DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db -DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b -DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 -DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 -DIST llvm-project-b837c9e289dab93c7f8a06876e3f70b6864f40ab.tar.gz 219631219 BLAKE2B d8a5d7de537ad91e94fc85dc0f624eba92f31cab2a345706250a66ad424fff151d5b86c430d993a35fd938095774411080cee4cab47a8258af348743dc145b56 SHA512 fe23f72b73553e3755af335a2a2a2225eafdcf2ed93191c9f4ac7bcf7b5b5391f73c2dccbb082279e0c7389a8f12b889a8d061389785cf9219ca861a8d4b41cc -DIST llvm-project-cde7b30268a85a3e7900a31534a97e7eb4de9236.tar.gz 219048549 BLAKE2B 53bdfea814b2cdf60bfdd27f6135b9f9d5156bdc78d22a361214399c5101b6fafaaefb9109377c1d977c67ebcb1feed69d6aaee0f2e38881480d68ac8be9b3d9 SHA512 0def6da5c2443753f37ba40a893b41dd5c7676b7be57102a5a6e820fe4fe235cad1da9a1c0eff1abc4c4ed5cc188522cae23afeddeee1876ea8ffde5c4f33b9f -DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf diff --git a/sys-devel/lld/lld-15.0.7.ebuild b/sys-devel/lld/lld-15.0.7.ebuild deleted file mode 100644 index 5040684bb927..000000000000 --- a/sys-devel/lld/lld-15.0.7.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs - -DESCRIPTION="The LLVM linker (link editor)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" -KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86" -IUSE="debug test" -RESTRICT="!test? ( test )" - -DEPEND=" - ~sys-devel/llvm-${PV} - sys-libs/zlib:= -" -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-15-r2:${LLVM_MAJOR} -" - -LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -python_check_deps() { - python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" -} - -pkg_setup() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - use test && python-any-r1_pkg_setup -} - -src_unpack() { - llvm.org_src_unpack - - # Directory ${WORKDIR}/llvm does not exist with USE="-test", - # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, - # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system - # (lld/MachO/CMakeLists.txt) and is expected to be resolvable - # to existent directory ${WORKDIR}/libunwind/include. - mkdir -p "${WORKDIR}/llvm" || die -} - -src_configure() { - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - - use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" - -DBUILD_SHARED_LIBS=ON - -DLLVM_INCLUDE_TESTS=$(usex test) - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_ENABLE_ZLIB=FORCE_ON - ) - - use test && mycmakeargs+=( - -DLLVM_BUILD_TESTS=ON - -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/lld/lld-16.0.6.ebuild b/sys-devel/lld/lld-16.0.6.ebuild deleted file mode 100644 index 9308190da16c..000000000000 --- a/sys-devel/lld/lld-16.0.6.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# 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 llvm.org python-any-r1 toolchain-funcs - -DESCRIPTION="The LLVM linker (link editor)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" -KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos" -IUSE="debug test zstd" -RESTRICT="!test? ( test )" - -DEPEND=" - ~sys-devel/llvm-${PV}[zstd=] - sys-libs/zlib:= - zstd? ( app-arch/zstd:= ) -" -RDEPEND=" - ${DEPEND} - !sys-devel/lld:0 -" -BDEPEND=" - sys-devel/llvm:${LLVM_MAJOR} - test? ( - $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - ) -" -PDEPEND=" - >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} -" - -LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) -LLVM_TEST_COMPONENTS=( llvm/utils third-party ) -LLVM_PATCHSET=${PV}-r1 -llvm.org_set_globals - -python_check_deps() { - python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" -} - -pkg_setup() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - use test && python-any-r1_pkg_setup -} - -src_unpack() { - llvm.org_src_unpack - - # Directory ${WORKDIR}/llvm does not exist with USE="-test", - # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, - # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system - # (lld/MachO/CMakeLists.txt) and is expected to be resolvable - # to existent directory ${WORKDIR}/libunwind/include. - mkdir -p "${WORKDIR}/llvm" || die -} - -src_configure() { - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - - use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" - -DBUILD_SHARED_LIBS=ON - -DLLVM_INCLUDE_TESTS=$(usex test) - -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/lld/lld-17.0.6.ebuild b/sys-devel/lld/lld-17.0.6.ebuild deleted file mode 100644 index 33a9eb571205..000000000000 --- a/sys-devel/lld/lld-17.0.6.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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 llvm.org python-any-r1 toolchain-funcs - -DESCRIPTION="The LLVM linker (link editor)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" -KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos" -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() { - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup - use test && python-any-r1_pkg_setup -} - -src_unpack() { - llvm.org_src_unpack - - # Directory ${WORKDIR}/llvm does not exist with USE="-test", - # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, - # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system - # (lld/MachO/CMakeLists.txt) and is expected to be resolvable - # to existent directory ${WORKDIR}/libunwind/include. - mkdir -p "${WORKDIR}/llvm" || die -} - -src_configure() { - # 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/lld/lld-18.1.8.ebuild b/sys-devel/lld/lld-18.1.8.ebuild deleted file mode 100644 index d5245986a556..000000000000 --- a/sys-devel/lld/lld-18.1.8.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# 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}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~arm64-macos" -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/lld/lld-19.1.1.ebuild b/sys-devel/lld/lld-19.1.1.ebuild deleted file mode 100644 index 2cabcdd2ddcf..000000000000 --- a/sys-devel/lld/lld-19.1.1.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# 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}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos" -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/lld/lld-20.0.0.9999.ebuild b/sys-devel/lld/lld-20.0.0.9999.ebuild deleted file mode 100644 index 79558afa1abe..000000000000 --- a/sys-devel/lld/lld-20.0.0.9999.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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/lld/lld-20.0.0_pre20240924.ebuild b/sys-devel/lld/lld-20.0.0_pre20240924.ebuild deleted file mode 100644 index 79558afa1abe..000000000000 --- a/sys-devel/lld/lld-20.0.0_pre20240924.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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/lld/lld-20.0.0_pre20241004.ebuild b/sys-devel/lld/lld-20.0.0_pre20241004.ebuild deleted file mode 100644 index 79558afa1abe..000000000000 --- a/sys-devel/lld/lld-20.0.0_pre20241004.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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/lld/lld-20.0.0_pre20241009.ebuild b/sys-devel/lld/lld-20.0.0_pre20241009.ebuild deleted file mode 100644 index 79558afa1abe..000000000000 --- a/sys-devel/lld/lld-20.0.0_pre20241009.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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/lld/metadata.xml b/sys-devel/lld/metadata.xml deleted file mode 100644 index 072910296ca3..000000000000 --- a/sys-devel/lld/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <upstream> - <remote-id type="github">llvm/llvm-project</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest deleted file mode 100644 index 840b7c21a102..000000000000 --- a/sys-devel/llvm-common/Manifest +++ /dev/null @@ -1,13 +0,0 @@ -DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 -DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 -DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 -DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 -DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 -DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db -DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b -DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 -DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 -DIST llvm-project-b837c9e289dab93c7f8a06876e3f70b6864f40ab.tar.gz 219631219 BLAKE2B d8a5d7de537ad91e94fc85dc0f624eba92f31cab2a345706250a66ad424fff151d5b86c430d993a35fd938095774411080cee4cab47a8258af348743dc145b56 SHA512 fe23f72b73553e3755af335a2a2a2225eafdcf2ed93191c9f4ac7bcf7b5b5391f73c2dccbb082279e0c7389a8f12b889a8d061389785cf9219ca861a8d4b41cc -DIST llvm-project-cde7b30268a85a3e7900a31534a97e7eb4de9236.tar.gz 219048549 BLAKE2B 53bdfea814b2cdf60bfdd27f6135b9f9d5156bdc78d22a361214399c5101b6fafaaefb9109377c1d977c67ebcb1feed69d6aaee0f2e38881480d68ac8be9b3d9 SHA512 0def6da5c2443753f37ba40a893b41dd5c7676b7be57102a5a6e820fe4fe235cad1da9a1c0eff1abc4c4ed5cc188522cae23afeddeee1876ea8ffde5c4f33b9f -DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf diff --git a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild deleted file mode 100644 index 3419b7207944..000000000000 --- a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2023 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" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -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-common/llvm-common-16.0.6.ebuild b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild deleted file mode 100644 index ab2cb092abd1..000000000000 --- a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-common/llvm-common-17.0.6.ebuild b/sys-devel/llvm-common/llvm-common-17.0.6.ebuild deleted file mode 100644 index ab2cb092abd1..000000000000 --- a/sys-devel/llvm-common/llvm-common-17.0.6.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-common/llvm-common-18.1.8.ebuild b/sys-devel/llvm-common/llvm-common-18.1.8.ebuild deleted file mode 100644 index 7bc053474801..000000000000 --- a/sys-devel/llvm-common/llvm-common-18.1.8.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# 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" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-common/llvm-common-19.1.1.ebuild b/sys-devel/llvm-common/llvm-common-19.1.1.ebuild deleted file mode 100644 index 7a852f871e36..000000000000 --- a/sys-devel/llvm-common/llvm-common-19.1.1.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# 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" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -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-common/llvm-common-20.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-20.0.0.9999.ebuild deleted file mode 100644 index 2d8f35a84179..000000000000 --- a/sys-devel/llvm-common/llvm-common-20.0.0.9999.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# 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-common/llvm-common-20.0.0_pre20240924.ebuild b/sys-devel/llvm-common/llvm-common-20.0.0_pre20240924.ebuild deleted file mode 100644 index 2d8f35a84179..000000000000 --- a/sys-devel/llvm-common/llvm-common-20.0.0_pre20240924.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# 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-common/llvm-common-20.0.0_pre20241004.ebuild b/sys-devel/llvm-common/llvm-common-20.0.0_pre20241004.ebuild deleted file mode 100644 index 2d8f35a84179..000000000000 --- a/sys-devel/llvm-common/llvm-common-20.0.0_pre20241004.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# 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-common/llvm-common-20.0.0_pre20241009.ebuild b/sys-devel/llvm-common/llvm-common-20.0.0_pre20241009.ebuild deleted file mode 100644 index 2d8f35a84179..000000000000 --- a/sys-devel/llvm-common/llvm-common-20.0.0_pre20241009.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# 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-common/metadata.xml b/sys-devel/llvm-common/metadata.xml deleted file mode 100644 index 072910296ca3..000000000000 --- a/sys-devel/llvm-common/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <upstream> - <remote-id type="github">llvm/llvm-project</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild deleted file mode 100644 index 63180b2f53b6..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t}" "${dest}/${t}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t}" "${dest}/${chost}-${t}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild deleted file mode 100644 index c1c22114f553..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t}" "${dest}/${t}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t}" "${dest}/${chost}-${t}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17-r1.ebuild deleted file mode 100644 index 32c818f519ed..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17-r1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - # https://bugs.gentoo.org/936068 - cxxfilt:c++filt - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${t#*:}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${chost}-${t#*:}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18-r1.ebuild deleted file mode 100644 index 751321457456..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18-r1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - # https://bugs.gentoo.org/936068 - cxxfilt:c++filt - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${t#*:}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${chost}-${t#*:}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild deleted file mode 100644 index 0f622a6f7cbb..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - # https://bugs.gentoo.org/936068 - cxxfilt:c++filt - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${t#*:}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${chost}-${t#*:}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-20.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-20.ebuild deleted file mode 100644 index c8c1320e0f92..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-20.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib - -DESCRIPTION="Symlinks to use LLVM on binutils-free system" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" -S=${WORKDIR} - -LICENSE="public-domain" -SLOT="${PV}" -IUSE="multilib-symlinks +native-symlinks" - -RDEPEND=" - sys-devel/llvm:${SLOT} -" - -src_install() { - use native-symlinks || return - - local tools=( - addr2line ar dlltool nm objcopy objdump ranlib readelf size - strings strip windres - # https://bugs.gentoo.org/936068 - cxxfilt:c++filt - ) - local chosts=( "${CHOST}" ) - if use multilib-symlinks; then - local abi - for abi in $(get_all_abis); do - chosts+=( "$(get_abi_CHOST "${abi}")" ) - done - fi - - local chost t - local dest=/usr/lib/llvm/${SLOT}/bin - dodir "${dest}" - for t in "${tools[@]}"; do - dosym "llvm-${t}" "${dest}/${t}" - done - for chost in "${chosts[@]}"; do - for t in "${tools[@]}"; do - dosym "llvm-${t%:*}" "${dest}/${chost}-${t#*:}" - done - done -} diff --git a/sys-devel/llvm-toolchain-symlinks/metadata.xml b/sys-devel/llvm-toolchain-symlinks/metadata.xml deleted file mode 100644 index d62775dfc3a3..000000000000 --- a/sys-devel/llvm-toolchain-symlinks/metadata.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>llvm@gentoo.org</email> - </maintainer> - <use> - <flag name="multilib-symlinks"> - Install symlinks for all ABI CHOSTs. Note that this can - result in gcc being overrode for native builds, as well - as conflict with crossdev if used for the same targets. - </flag> - <flag name="native-symlinks"> - Install generic tool symlinks like 'objdump' and 'ranlib', - as well as ${CTARGET}-*. These symlinks are installed - into slotted LLVM bindir, so they should not take precedence - over symlinks installed into /usr/bin - by <pkg>sys-devel/binutils-config</pkg> but they can be - helpful for binutils-free setups. - </flag> - </use> -</pkgmetadata> diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest deleted file mode 100644 index 4c290cd155b0..000000000000 --- a/sys-devel/llvm/Manifest +++ /dev/null @@ -1,26 +0,0 @@ -DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49 -DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b -DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb -DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc -DIST llvm-19.1.0-manpages.tar.bz2 286165 BLAKE2B d96df2e748d2d52af2e8b7023f59af9ab53a9e59480ff228726bf629f1ecd813af80f3ba4126919092beb7ad8214193e828f997d300c705b0d8b90d6aedb22ee SHA512 aed63dee6629fe9116a9ce21e8bfb0e2c0b80ad276c6551f445ef01c71e130fef1615679adba8386ab57cac5104a153919e0b0df6bd66e023c5f0398081d2374 -DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df -DIST llvm-gentoo-patchset-15.0.7-r7.tar.xz 26012 BLAKE2B a3b6059e18e1347b1da18ef6eb66e12de8980d1fe6b7e92189dd1ce36b16e31d940e45e5f99bd53c30a5780c26ff0686adf5373d3469b8a9b3c5f44d83827832 SHA512 3eb7c36793a6fa0ff585a7732287f6a14141e6c9c9a20b37390303d46372ee9d9a768597e64c77de0731d9aa4c26295f26b36bbc26c69dfbd8ab14cb2564a171 -DIST llvm-gentoo-patchset-16.0.6-r5.tar.xz 19728 BLAKE2B 36b605401893034b2b560d26cfb57512c81eddbc35b25d9c3d1fe051b8825c38cae1b8ed999faf8fef564ca5578402d3979bc56ba0a5514dc62594d893696f41 SHA512 20a36b69dfc2b4796ce33318a28529ebdc213945ee67a983e4218117d2ee2c93be1ecb38b0e8189249c5806a442cba708e0890e1b7bf6376edec4403bcc71425 -DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825 -DIST llvm-gentoo-patchset-17.0.6-r3.tar.xz 4648 BLAKE2B c709162068e83575f71a2ac2243665f47a3d42cac078daa5762bbd339d8593e8c1c5c58e2e415ba6659fe2f3c3824bd098c9be579103362084079140c0386f76 SHA512 251a33f146fcbdbe51c9e1ad7b08c2cd7d062d0b136c833cda8a5155c86080c506d575e4288cde4ba8530ca7f230c2afa63621878a8df0f23076a93c924e7d65 -DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19 -DIST llvm-gentoo-patchset-18.1.8-r4.tar.xz 15912 BLAKE2B 7300128244aafe42fcf5863e3aad2beb0c96c3df527e6d35fe571369bad520ba4aa397a329287da17eb33dca902057da5cd5193ec560ea7f5767ba2d00a45818 SHA512 b32633db387d4adb3bb2d067f824ae4e8e8a24a25aaa4888520f6e61a4bb1f8f70ad5f44057fbc0892c6f93c803e360612b0fc02c4ec068470b546a55f246cba -DIST llvm-gentoo-patchset-18.1.8.tar.xz 7444 BLAKE2B ed41325f7e2efc257c03b3500f9ba49a29333f617ff9914705f9df660bbc1e1b3aafada6f2a68a316d2ee47cf628a35f3495f74c9f0ca00c120079e8e93bd4db SHA512 a6bb4313d2635d38f36a3fdb343b2b7f117129ec62f92ead0bbf7010ae73055cb757958975cd9d1677f2c4b1554819a16a918bef9e9e0d982f8025ce49b9a8ef -DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 -DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 -DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 -DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 -DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 -DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db -DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b -DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 -DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 -DIST llvm-project-b837c9e289dab93c7f8a06876e3f70b6864f40ab.tar.gz 219631219 BLAKE2B d8a5d7de537ad91e94fc85dc0f624eba92f31cab2a345706250a66ad424fff151d5b86c430d993a35fd938095774411080cee4cab47a8258af348743dc145b56 SHA512 fe23f72b73553e3755af335a2a2a2225eafdcf2ed93191c9f4ac7bcf7b5b5391f73c2dccbb082279e0c7389a8f12b889a8d061389785cf9219ca861a8d4b41cc -DIST llvm-project-cde7b30268a85a3e7900a31534a97e7eb4de9236.tar.gz 219048549 BLAKE2B 53bdfea814b2cdf60bfdd27f6135b9f9d5156bdc78d22a361214399c5101b6fafaaefb9109377c1d977c67ebcb1feed69d6aaee0f2e38881480d68ac8be9b3d9 SHA512 0def6da5c2443753f37ba40a893b41dd5c7676b7be57102a5a6e820fe4fe235cad1da9a1c0eff1abc4c4ed5cc188522cae23afeddeee1876ea8ffde5c4f33b9f -DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf diff --git a/sys-devel/llvm/llvm-15.0.7-r3.ebuild b/sys-devel/llvm/llvm-15.0.7-r3.ebuild deleted file mode 100644 index 6306ee2107c0..000000000000 --- a/sys-devel/llvm/llvm-15.0.7-r3.ebuild +++ /dev/null @@ -1,520 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="https://llvm.org/" - -# Additional licenses: -# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. -# 2. xxhash: BSD. -# 3. MD5 code: public-domain. -# 4. ConvertUTF.h: TODO. - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" -SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE=" - +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar - xml z3 zstd -" -RESTRICT="!test? ( test )" - -RDEPEND=" - sys-libs/zlib:0=[${MULTILIB_USEDEP}] - exegesis? ( dev-libs/libpfm:= ) - libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) - libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) - xar? ( app-arch/xar ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) -" -DEPEND=" - ${RDEPEND} - binutils-plugin? ( sys-libs/binutils-libs ) -" -BDEPEND=" - ${PYTHON_DEPS} - dev-lang/perl - sys-devel/gnuconfig - kernel_Darwin? ( - <sys-libs/libcxx-${LLVM_VERSION}.9999 - >=sys-devel/binutils-apple-5.1 - ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - libffi? ( virtual/pkgconfig ) -" -# There are no file collisions between these versions but having :0 -# installed means llvm-config there will take precedence. -RDEPEND=" - ${RDEPEND} - !sys-devel/llvm:0 -" -PDEPEND=" - sys-devel/llvm-common - sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} - binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) -" - -LLVM_COMPONENTS=( llvm cmake third-party ) -LLVM_MANPAGES=1 -LLVM_PATCHSET=${PV/_/-}-r3 -LLVM_USE_TARGETS=provide -llvm.org_set_globals - -python_check_deps() { - use doc || return 0 - - python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && - python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -check_uptodate() { - local prod_targets=( - $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ - | tail -n +2 | head -n -1) - ) - local all_targets=( - lib/Target/*/ - ) - all_targets=( "${all_targets[@]#lib/Target/}" ) - all_targets=( "${all_targets[@]%/}" ) - - local exp_targets=() i - for i in "${all_targets[@]}"; do - has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) - done - - if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then - eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" - eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" - eqawarn "Expected: ${exp_targets[*]}" - eqawarn - fi - - if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then - eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!" - eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}" - eqawarn "Expected: ${prod_targets[*]}" - fi -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # shared libs - LLVM|LLVMgold) - ;; - # TableGen lib + deps - LLVMDemangle|LLVMSupport|LLVMTableGen) - ;; - # static libs - LLVM*) - continue - ;; - # meta-targets - distribution|llvm-libraries) - continue - ;; - # used only w/ USE=doc - docs-llvm-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(${NINJA} -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -src_prepare() { - # disable use of SDK on OSX, bug #568758 - sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die - - # Update config.guess to support more systems - cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die - - # Verify that the ebuild is up-to-date - check_uptodate - - llvm.org_src_prepare -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # shared libs - LLVM - LTO - Remarks - - # tools - llvm-config - - # common stuff - cmake-exports - llvm-headers - - # libraries needed for clang-tblgen - LLVMDemangle - LLVMSupport - LLVMTableGen - ) - - if multilib_is_native_abi; then - out+=( - # utilities - llvm-tblgen - FileCheck - llvm-PerfectShuffle - count - not - yaml-bench - UnicodeNameMappingGenerator - - # tools - bugpoint - dsymutil - llc - lli - lli-child-target - llvm-addr2line - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-bitcode-strip - llvm-c-test - llvm-cat - llvm-cfi-verify - llvm-config - llvm-cov - llvm-cvtres - llvm-cxxdump - llvm-cxxfilt - llvm-cxxmap - llvm-debuginfod - llvm-debuginfod-find - llvm-diff - llvm-dis - llvm-dlltool - llvm-dwarfdump - llvm-dwarfutil - llvm-dwp - llvm-exegesis - llvm-extract - llvm-gsymutil - llvm-ifs - llvm-install-name-tool - llvm-jitlink - llvm-jitlink-executor - llvm-lib - llvm-libtool-darwin - llvm-link - llvm-lipo - llvm-lto - llvm-lto2 - llvm-mc - llvm-mca - llvm-ml - llvm-modextract - llvm-mt - llvm-nm - llvm-objcopy - llvm-objdump - llvm-opt-report - llvm-otool - llvm-pdbutil - llvm-profdata - llvm-profgen - llvm-ranlib - llvm-rc - llvm-readelf - llvm-readobj - llvm-reduce - llvm-remark-size-diff - llvm-rtdyld - llvm-sim - llvm-size - llvm-split - llvm-stress - llvm-strings - llvm-strip - llvm-symbolizer - llvm-tapi-diff - llvm-tli-checker - llvm-undname - llvm-windres - llvm-xray - obj2yaml - opt - sancov - sanstats - split-file - verify-uselistorder - yaml2obj - - # python modules - opt-viewer - ) - - if llvm_are_manpages_built; then - out+=( - # manpages - docs-dsymutil-man - docs-llvm-dwarfdump-man - docs-llvm-man - ) - fi - use doc && out+=( - docs-llvm-html - ) - - use binutils-plugin && out+=( - LLVMgold - ) - fi - - printf "%s${sep}" "${out[@]}" -} - -multilib_src_configure() { - if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then - # Workaround for bug #880677 - append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) - fi - - # ODR violations (bug #917536, bug #926529). Just do it for GCC for now - # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile - # LLVM with LTO anyway (which is not necessarily its fault). - tc-is-gcc && filter-lto - - local ffi_cflags ffi_ldflags - if use libffi; then - ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) - ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) - fi - - local libdir=$(get_libdir) - local mycmakeargs=( - # disable appending VCS revision to the version to improve - # direct cache hit ratio - -DLLVM_APPEND_VC_REV=OFF - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" - -DLLVM_LIBDIR_SUFFIX=${libdir#lib} - - -DBUILD_SHARED_LIBS=OFF - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) - - # cheap hack: LLVM combines both anyway, and the only difference - # is that the former list is explicitly verified at cmake time - -DLLVM_TARGETS_TO_BUILD="" - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - -DLLVM_BUILD_TESTS=$(usex test) - - -DLLVM_ENABLE_FFI=$(usex libffi) - -DLLVM_ENABLE_LIBEDIT=$(usex libedit) - -DLLVM_ENABLE_TERMINFO=$(usex ncurses) - -DLLVM_ENABLE_LIBXML2=$(usex xml) - -DLLVM_ENABLE_ASSERTIONS=$(usex debug) - -DLLVM_ENABLE_LIBPFM=$(usex exegesis) - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) - -DLLVM_ENABLE_ZLIB=FORCE_ON - -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) - - -DLLVM_HOST_TRIPLE="${CHOST}" - - -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" - -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" - # used only for llvm-objdump tool - -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) - - -DPython3_EXECUTABLE="${PYTHON}" - - # disable OCaml bindings (now in dev-ml/llvm-ocaml) - -DOCAMLFIND=NO - ) - - if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then - # Smart hack: alter version suffix -> SOVERSION when linking - # against libc++. This way we won't end up mixing LLVM libc++ - # libraries with libstdc++ clang, and the other way around. - mycmakeargs+=( - -DLLVM_VERSION_SUFFIX="libcxx" - -DLLVM_ENABLE_LIBCXX=ON - ) - fi - -# Note: go bindings have no CMake rules at the moment -# but let's kill the check in case they are introduced -# if ! multilib_is_native_abi || ! use go; then - mycmakeargs+=( - -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND - ) -# fi - - use test && mycmakeargs+=( - -DLLVM_LIT_ARGS="$(get_lit_flags)" - ) - - if multilib_is_native_abi; then - local build_docs=OFF - if llvm_are_manpages_built; then - build_docs=ON - mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" - -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - fi - - mycmakeargs+=( - -DLLVM_BUILD_DOCS=${build_docs} - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=${build_docs} - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_UTILS=ON - ) - use binutils-plugin && mycmakeargs+=( - -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include - ) - fi - - if tc-is-cross-compiler; then - local tblgen="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" - [[ -x "${tblgen}" ]] \ - || die "${tblgen} not found or usable" - mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DLLVM_TABLEGEN="${tblgen}" - ) - fi - - # LLVM can have very high memory consumption while linking, - # exhausting the limit on 32-bit linker executable - use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake_src_configure - - grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ - CMakeCache.txt || - die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" - multilib_is_native_abi && check_distribution_components -} - -multilib_src_compile() { - tc-env_build cmake_build distribution - - pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld - pax-mark m "${BUILD_DIR}"/bin/lli - pax-mark m "${BUILD_DIR}"/bin/lli-child-target - - if use test; then - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests - pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - cmake_build check -} - -src_install() { - local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config - ) - - local MULTILIB_WRAPPED_HEADERS=( - /usr/include/llvm/Config/llvm-config.h - ) - - local LLVM_LDPATHS=() - multilib-minimal_src_install - - # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die -} - -multilib_src_install() { - DESTDIR=${D} cmake_build install-distribution - - # move headers to /usr/include for wrapping - rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) -} - -multilib_src_install_all() { - local revord=$(( 9999 - ${LLVM_MAJOR} )) - newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" - # we need to duplicate it in ROOTPATH for Portage to respect... - ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" - MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" - LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" - _EOF_ - - docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" - llvm_install_manpages -} - -pkg_postinst() { - elog "You can find additional opt-viewer utility scripts in:" - elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer" - elog "To use these scripts, you will need Python along with the following" - elog "packages:" - elog " dev-python/pygments (for opt-viewer)" - elog " dev-python/pyyaml (for all of them)" -} diff --git a/sys-devel/llvm/llvm-15.0.7-r7.ebuild b/sys-devel/llvm/llvm-15.0.7-r7.ebuild deleted file mode 100644 index ecff8b6dcb9b..000000000000 --- a/sys-devel/llvm/llvm-15.0.7-r7.ebuild +++ /dev/null @@ -1,520 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="https://llvm.org/" - -# Additional licenses: -# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. -# 2. xxhash: BSD. -# 3. MD5 code: public-domain. -# 4. ConvertUTF.h: TODO. - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" -SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE=" - +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar - xml z3 zstd -" -RESTRICT="!test? ( test )" - -RDEPEND=" - sys-libs/zlib:0=[${MULTILIB_USEDEP}] - exegesis? ( dev-libs/libpfm:= ) - libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) - libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) - xar? ( app-arch/xar ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) -" -DEPEND=" - ${RDEPEND} - binutils-plugin? ( sys-libs/binutils-libs ) -" -BDEPEND=" - ${PYTHON_DEPS} - dev-lang/perl - sys-devel/gnuconfig - kernel_Darwin? ( - <sys-libs/libcxx-${LLVM_VERSION}.9999 - |