diff options
Diffstat (limited to 'sys-devel')
102 files changed, 3729 insertions, 1954 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/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-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..b010a5f45ec3 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-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild deleted file mode 100644 index fa9d8b2f4555..000000000000 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.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=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="-* 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-hppa64/binutils-hppa64-2.43.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild index 5207151d0d71..53e91ed47268 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild @@ -21,7 +21,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 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..30df41aa33d2 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 -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..245e22ea0452 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 -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..12198ae2a210 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 -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..6f2986251b95 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 -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..2ff454f94f42 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 -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..e2f0c616eb13 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 -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..d3b1576fffa2 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 -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..dae998b28acb 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 -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..a619b246dff5 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 -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..fe1544cdd346 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 -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 6e5766f0d3ba..8c77bded00d0 100644 --- a/sys-devel/binutils/binutils-2.42-r2.ebuild +++ b/sys-devel/binutils/binutils-2.42-r2.ebuild @@ -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 -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..c632b993e7ff 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 -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..a91cc871d755 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 -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..264ca387d0c4 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 -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/clang-common/Manifest b/sys-devel/clang-common/Manifest index e26c9edcd89a..c349b276c950 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -6,6 +6,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.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.3.src.tar.xz 141247864 BLAKE2B 4ccb30accd632a7d54eb065b724ff81ec8a50380fa527111d58acd728eecb798d42f680119b6d1cbc980523e2f39220921ca1f530daa7afea05ab27436dedb7e SHA512 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c -DIST llvm-project-19.1.3.src.tar.xz.sig 438 BLAKE2B 44717741ae13bb0c52382647352e52273d8401728dc5cc1cf0c11a8f08cd74b6e3d789e788793aad767030b36fdec62e3a05bdc0b7ff60556cec7ceac17fc239 SHA512 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d -DIST llvm-project-3f4468faaa9525ad615118675c3c68938f4a8d5f.tar.gz 221860252 BLAKE2B 6c531df34163dc0879c79b029a13215d1bef2cd95bbaf4a6d5e10b81a8352236283d40f14b62e23a57cc1cf8edce138fb6e2720ced2397d6469c5863564c626d SHA512 4aa485f4547e210cf8f6f8147c4adab3e75afe77f1e4e1bc4718fe681b64bdcf8937f843964542f8ead90ceef52cc0fd4bd8275824d1a4c6961eddafc7d35115 +DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906 +DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764 +DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22 +DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54 +DIST llvm-project-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db diff --git a/sys-devel/clang-common/clang-common-19.1.3.ebuild b/sys-devel/clang-common/clang-common-19.1.4.ebuild index d587000e70f7..d587000e70f7 100644 --- a/sys-devel/clang-common/clang-common-19.1.3.ebuild +++ b/sys-devel/clang-common/clang-common-19.1.4.ebuild diff --git a/sys-devel/clang-common/clang-common-19.1.5.ebuild b/sys-devel/clang-common/clang-common-19.1.5.ebuild new file mode 100644 index 000000000000..d587000e70f7 --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.1.5.ebuild @@ -0,0 +1,310 @@ +# 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 + 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 + -Wl,-L,${EPREFIX}/../usr/lib + -isystem ${EPREFIX}/../usr/include + EOF + fi + # Using -Wl,-L instead of -L to trick compiler driver to put it + # after -isysroot's internal -L + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/usr/lib + -Wl,-L,${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + 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-20.0.0_pre20241029.ebuild b/sys-devel/clang-common/clang-common-20.0.0_pre20241130.ebuild index 0351c7b25564..0351c7b25564 100644 --- a/sys-devel/clang-common/clang-common-20.0.0_pre20241029.ebuild +++ b/sys-devel/clang-common/clang-common-20.0.0_pre20241130.ebuild diff --git a/sys-devel/clang-runtime/clang-runtime-19.1.3.ebuild b/sys-devel/clang-runtime/clang-runtime-19.1.4.ebuild index 8ded193c919c..8ded193c919c 100644 --- a/sys-devel/clang-runtime/clang-runtime-19.1.3.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-19.1.4.ebuild diff --git a/sys-devel/clang-runtime/clang-runtime-19.1.5.ebuild b/sys-devel/clang-runtime/clang-runtime-19.1.5.ebuild new file mode 100644 index 000000000000..8ded193c919c --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.1.5.ebuild @@ -0,0 +1,40 @@ +# 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_pre20241029.ebuild b/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241130.ebuild index 323c0b62c062..323c0b62c062 100644 --- a/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241029.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-20.0.0_pre20241130.ebuild diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 49a9196e312f..fed58feae849 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -15,6 +15,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.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.3.src.tar.xz 141247864 BLAKE2B 4ccb30accd632a7d54eb065b724ff81ec8a50380fa527111d58acd728eecb798d42f680119b6d1cbc980523e2f39220921ca1f530daa7afea05ab27436dedb7e SHA512 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c -DIST llvm-project-19.1.3.src.tar.xz.sig 438 BLAKE2B 44717741ae13bb0c52382647352e52273d8401728dc5cc1cf0c11a8f08cd74b6e3d789e788793aad767030b36fdec62e3a05bdc0b7ff60556cec7ceac17fc239 SHA512 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d -DIST llvm-project-3f4468faaa9525ad615118675c3c68938f4a8d5f.tar.gz 221860252 BLAKE2B 6c531df34163dc0879c79b029a13215d1bef2cd95bbaf4a6d5e10b81a8352236283d40f14b62e23a57cc1cf8edce138fb6e2720ced2397d6469c5863564c626d SHA512 4aa485f4547e210cf8f6f8147c4adab3e75afe77f1e4e1bc4718fe681b64bdcf8937f843964542f8ead90ceef52cc0fd4bd8275824d1a4c6961eddafc7d35115 +DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906 +DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764 +DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22 +DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54 +DIST llvm-project-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db diff --git a/sys-devel/clang/clang-19.1.3.ebuild b/sys-devel/clang/clang-19.1.4.ebuild index 2d7aae85f170..2d7aae85f170 100644 --- a/sys-devel/clang/clang-19.1.3.ebuild +++ b/sys-devel/clang/clang-19.1.4.ebuild diff --git a/sys-devel/clang/clang-19.1.5.ebuild b/sys-devel/clang/clang-19.1.5.ebuild new file mode 100644 index 000000000000..2d7aae85f170 --- /dev/null +++ b/sys-devel/clang/clang-19.1.5.ebuild @@ -0,0 +1,465 @@ +# 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 index cad701817a80..302925ded5b2 100644 --- a/sys-devel/clang/clang-20.0.0.9999.ebuild +++ b/sys-devel/clang/clang-20.0.0.9999.ebuild @@ -201,6 +201,7 @@ get_distribution_components() { clang-refactor clang-repl clang-scan-deps + clang-sycl-linker diagtool hmaptool nvptx-arch diff --git a/sys-devel/clang/clang-20.0.0_pre20241029.ebuild b/sys-devel/clang/clang-20.0.0_pre20241130.ebuild index cad701817a80..302925ded5b2 100644 --- a/sys-devel/clang/clang-20.0.0_pre20241029.ebuild +++ b/sys-devel/clang/clang-20.0.0_pre20241130.ebuild @@ -201,6 +201,7 @@ get_distribution_components() { clang-refactor clang-repl clang-scan-deps + clang-sycl-linker diagtool hmaptool nvptx-arch diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest index 376eaa0a4182..4f233fe1c297 100644 --- a/sys-devel/crossdev/Manifest +++ b/sys-devel/crossdev/Manifest @@ -1 +1,5 @@ DIST crossdev-20240921.tar.xz 31008 BLAKE2B 9daeabcbeefa32624d71b86c5ddeb1f6bf6ccdf4e6f590bf7517388d4d68b73ae2651ca09d122f128f002568127bd5d7d767db9d6c043e5330b62c3104929848 SHA512 6b7f0bce309d2b0a8fdf9b28cf72098de9dafaf7f338a8308e94e2068cefc15cd2407eee39a9eeb0ea0a1bc46569cedc69a51bb01f140faebe374b660cb1cdf6 +DIST crossdev-20241130.2.tar.xz 32856 BLAKE2B ffcca5a7743fa6217ad23c97c5b122628a5950558f16413c1f52457d6fdd942dd2207c8f01e4a7c57712c051e5d0b66eff586d1d3141bc6d917aed4151df561c SHA512 28f7e914d56f7a9658292be8e5fdc57d1d0c1d57c8f4f00cfad493261ad94fb2edf19b4c34b926a1ea7b9da12c4f6be5fb8fee338074c5c8c554f15e996e670b +DIST crossdev-20241130.3.tar.xz 32916 BLAKE2B 6bac26d79850f5ba0d12ef904e40d8540082e2bd58d7ecaf175dccea13bfb90f6cf41950b4bf3443fad8ec37e77dc8a2767aa6bd278306cedc0a48b6484c689c SHA512 b157d0b2b49fbd7b31d764ddfeeb223839cb62707b3ed88b4ce254d568640265f7dbcea96314d4fb7dd6039578450b8c0a090f5311eb22618e0c3679d77c8649 +DIST crossdev-20241130.tar.xz 32832 BLAKE2B eaf14cf139abf73816f9facd090846c92d3056e34eb4d7f9bca2c2f4b22e9d3f342e93dac70b462b252b64eb86270f666d151170a6474961342a26f152919f69 SHA512 59054ba5015c18c9b80e2258391f667ad4585644009ab74b631557e8c6550270e188967515a13ab0dd8e27272c6e5f0650a77e8c100dadbc2686cd8796a62c00 +DIST crossdev-20241202.tar.xz 33032 BLAKE2B 74ec859e1ae5f816397349c18f8bd98d8fae2f4de471112d70621767733a6c91dfffaabb33afc4bdabf5bed31b83a0cdf8afaffaba3e0df95f70d43cf249fb94 SHA512 c6a8c534135aa15b2005546d3f006953570de1e54ae3d3170c71bed62f044c2db79412ecde3b91fd85fca92e7c996762ba086db29c6132f6f1d9e9a48f1e79ea diff --git a/sys-devel/crossdev/crossdev-20241130.2.ebuild b/sys-devel/crossdev/crossdev-20241130.2.ebuild new file mode 100644 index 000000000000..398d083f2a5c --- /dev/null +++ b/sys-devel/crossdev/crossdev-20241130.2.ebuild @@ -0,0 +1,40 @@ +# 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/~sam/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-20241130.3.ebuild b/sys-devel/crossdev/crossdev-20241130.3.ebuild new file mode 100644 index 000000000000..398d083f2a5c --- /dev/null +++ b/sys-devel/crossdev/crossdev-20241130.3.ebuild @@ -0,0 +1,40 @@ +# 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/~sam/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-20241130.ebuild b/sys-devel/crossdev/crossdev-20241130.ebuild new file mode 100644 index 000000000000..398d083f2a5c --- /dev/null +++ b/sys-devel/crossdev/crossdev-20241130.ebuild @@ -0,0 +1,40 @@ +# 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/~sam/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-20241202.ebuild b/sys-devel/crossdev/crossdev-20241202.ebuild new file mode 100644 index 000000000000..398d083f2a5c --- /dev/null +++ b/sys-devel/crossdev/crossdev-20241202.ebuild @@ -0,0 +1,40 @@ +# 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/~sam/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/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/Manifest b/sys-devel/gcc/Manifest index 9b0b6a77163d..c5777bf232bb 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -5,25 +5,37 @@ DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0e 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-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.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-20241025.tar.xz 84501292 BLAKE2B f5ba0a429a43d1936fe717850c81c847c90670204de33261fd476396336a1e1cc34c55d5487ac1871a4019c8a3aff59b6c8fdea3f1b7a161a73dbec8679c4d3a SHA512 a921afd451cdad55ee68bdb36861ca0c525de038d247f6e0ff59dbbdb3b41f03d139e7c2939a0999feb8b2f820f9267171a2c657683df0c86b38f0cb379eb0af -DIST gcc-13-20241101.tar.xz 84502916 BLAKE2B 61c715930fca216b7e4d1a8458ba9ee3b02e532bc8556853d5827e27bae70019a426c56d17bda4974282d4c47c5e860d18435d4ec8701986d65d43d69115560c SHA512 c65531986c7b3887ce9ca97a7b5091ba04dc824799832388fc23168318cb1683b5d1575ea5e723c8731a3ca25f08af64fab55e6dd912d9ac4df2d4258fdde948 +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.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-20241026.tar.xz 88183956 BLAKE2B 9b42070be3235fb78f436f6e4b2b9708f77ebd383906d2c6f6d1eef186351c0b4e53e6d0d631f4432f94c2e09a67f0da1c78bd8a3fb5ae94710a24c7422b8e42 SHA512 18ff215b02e18ea7d49fad5437a7e65166278ea78b35499d4402569c18790d334df9c0b54664460182f74bffa92b7faaa71728956e1d5e1c7be57f8a1045fb7f -DIST gcc-14-20241102.tar.xz 88166448 BLAKE2B 1b56e6cc06d1163ca830d1aad307fce7ba8761a740964ea8b9c5af2a291b1661b1b7f8e7fec7dd4ec226b765063fcb87f82f71e494d0aed0004591c58df2d3c9 SHA512 2e6d3825df5d2e513ef8582876405c1cf4396094fef65c4e2af0a6d59fc6f36a0e960a33a75c549ad111f3174c61302e391c719e32f1803953c0b0d7ae3959d5 +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.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.2.0-patches-3.tar.xz 13920 BLAKE2B 5b3efa54671581d97ae664e73629f247c776d84eea0b10f8d3223502582f1d1086fff86a6cde6c35b6b43d134af4dad3135d3de5531cfccb320a7fc884ab39ef SHA512 d47549e902055414142f650c7098f029410549741542553b1d0c0519f046a958561f92552e44f59663a7645d42316af5dab1462f54f50f2205257be6744c2fce -DIST gcc-15-20241027.tar.xz 89784028 BLAKE2B 75f48fac50a19443289e36bee119b1535ca842f0300597ad1f6fbccbe2754cb5b4444f263c7fc3a3ca699fa0179606849c1852849c48faf875082a1dc08ee183 SHA512 7248f040a980062167d5d7518bf212a5d9cd78a3f9aec8d4983dc3d2d2735affcac4d1eff5c38081ec10c7119d85ba3f7dd39327225b1de8b7a95a13268c60ee -DIST gcc-15-20241103.tar.xz 89813036 BLAKE2B 4fd6cd5d8d19f6545ebe1a193fc4464eba0d114126db8e282ed92196e71f84eb2974133a2dd93ab78c8d3f2370e52d4646eefc27bd5962c6e242c8776ec06b64 SHA512 cffb953576efe3ee2afaa11bdde403bb038da4ff4114f19bcc931540546a4f2bfa7148f9f6c989b40814393faecb1bfb0cdac475372bb6ef8de3924fed984c74 +DIST gcc-14.2.0-patches-5.tar.xz 13532 BLAKE2B 0e594f00710f9ac4f8833092b74bc74ce82b54cea6047db654497ab216c45d593cce90a1a6f918ae7613628598f8037909e485ffb69ac06bae4a44d90f9a2ddb SHA512 18d7b3fbeb6b116b53b64ade636585f35e306bb49771b0f3a4a67d61edc7dcfda9e9bf9a3a9cbbec2512d35de4e235c397c044507e637387ede9b84070d0d666 +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.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de -DIST gcc-15.0.0-patches-21.tar.xz 16832 BLAKE2B 75a781cf9c7d9b2087d598d751fc1d2e4322b801c1864bb03c68c0a419f65051224febedd608473dec5ca76e2cdaf4ba3d3f1bd86eb13a71ceedb61983ecb208 SHA512 2ffac32494c455d969a7bafcdd8f68fb9d1905fdb4a6f966160f8ad89680d57d07361326739828c57b3e7c89138f74616f47522611982bc902466a14b08f0859 +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-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_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_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_p20241121.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241121.ebuild new file mode 100644 index 000000000000..5845745860b0 --- /dev/null +++ b/sys-devel/gcc/gcc-12.4.1_p20241121.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_p20241128.ebuild b/sys-devel/gcc/gcc-12.4.1_p20241128.ebuild new file mode 100644 index 000000000000..e358f3fa9358 --- /dev/null +++ b/sys-devel/gcc/gcc-12.4.1_p20241128.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="2" +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-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_p20241101.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241122.ebuild index 6bff7d382179..6bff7d382179 100644 --- a/sys-devel/gcc/gcc-13.3.1_p20241101.ebuild +++ b/sys-devel/gcc/gcc-13.3.1_p20241122.ebuild diff --git a/sys-devel/gcc/gcc-13.3.1_p20241129.ebuild b/sys-devel/gcc/gcc-13.3.1_p20241129.ebuild new file mode 100644 index 000000000000..9267c223d8b5 --- /dev/null +++ b/sys-devel/gcc/gcc-13.3.1_p20241129.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_p20241026.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241116.ebuild index ff72d2e6564a..f10977e0f7be 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20241026.ebuild +++ b/sys-devel/gcc/gcc-14.2.1_p20241116.ebuild @@ -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_p20241123.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241123.ebuild new file mode 100644 index 000000000000..f85c0a0e44df --- /dev/null +++ b/sys-devel/gcc/gcc-14.2.1_p20241123.ebuild @@ -0,0 +1,55 @@ +# 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="14.2.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + 77_all_m2_docs_sandbox.patch + ) + 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_p20241102.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241130.ebuild index 98edff84af56..79cadacc1a28 100644 --- a/sys-devel/gcc/gcc-14.2.1_p20241102.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="3" +PATCH_VER="5" 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_pre20241027.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241124.ebuild index a81ef8a63c0c..75125b880bdc 100644 --- a/sys-devel/gcc/gcc-15.0.0_pre20241027.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="21" +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_pre20241103.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241201.ebuild index a81ef8a63c0c..7c6295bee00e 100644 --- a/sys-devel/gcc/gcc-15.0.0_pre20241103.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="21" +PATCH_VER="29" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) 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/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 6d6dc3ce388f..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..71544ab64e2f --- /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 +) + +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 + + 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 a693e0d8b20a..3fa209f388f7 100644 --- a/sys-devel/kgcc64/Manifest +++ b/sys-devel/kgcc64/Manifest @@ -4,27 +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-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-20241026.tar.xz 88183956 BLAKE2B 9b42070be3235fb78f436f6e4b2b9708f77ebd383906d2c6f6d1eef186351c0b4e53e6d0d631f4432f94c2e09a67f0da1c78bd8a3fb5ae94710a24c7422b8e42 SHA512 18ff215b02e18ea7d49fad5437a7e65166278ea78b35499d4402569c18790d334df9c0b54664460182f74bffa92b7faaa71728956e1d5e1c7be57f8a1045fb7f +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-2.tar.xz 13544 BLAKE2B 3f2acefd0aba9bc5b52c21eacb836951a8e8410670589e5b923bb8068923ead2b0537787740325fb5fc57538293daaaefaa7873ea078d5d5808912e899cb09a2 SHA512 3885dcda100a8463e16f882d82f8360b859acb79ee2c4c6d6a661328704ea199b5ea7fc23c0c23f2fa3df8adef80658dcd307682ccabe44cf4078ce4b4702370 +DIST gcc-14.2.0-patches-3.tar.xz 13920 BLAKE2B 5b3efa54671581d97ae664e73629f247c776d84eea0b10f8d3223502582f1d1086fff86a6cde6c35b6b43d134af4dad3135d3de5531cfccb320a7fc884ab39ef SHA512 d47549e902055414142f650c7098f029410549741542553b1d0c0519f046a958561f92552e44f59663a7645d42316af5dab1462f54f50f2205257be6744c2fce diff --git a/sys-devel/kgcc64/kgcc64-12.4.0_p20240919.ebuild b/sys-devel/kgcc64/kgcc64-12.4.0_p20240919.ebuild deleted file mode 100644 index 4945bcb6d029..000000000000 --- a/sys-devel/kgcc64/kgcc64-12.4.0_p20240919.ebuild +++ /dev/null @@ -1,49 +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="3" -PATCH_GCC_VER="12.3.0" -MUSL_VER="1" -MUSL_GCC_VER="12.3.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 )" - -src_prepare() { - toolchain_src_prepare -} - -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-12.3.1_p20240502.ebuild b/sys-devel/kgcc64/kgcc64-12.4.1_p20241114.ebuild index b224186bda08..5c04c35ebe59 100644 --- a/sys-devel/kgcc64/kgcc64-12.3.1_p20240502.ebuild +++ b/sys-devel/kgcc64/kgcc64-12.4.1_p20241114.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-13.2.1_p20240503.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240503.ebuild deleted file mode 100644 index 6dc5999d5745..000000000000 --- a/sys-devel/kgcc64/kgcc64-13.2.1_p20240503.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="15" -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.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.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_p20240921.ebuild deleted file mode 100644 index 97f17b0f6b9d..000000000000 --- a/sys-devel/kgcc64/kgcc64-14.2.1_p20240921.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="5" -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_p20241026.ebuild b/sys-devel/kgcc64/kgcc64-14.2.1_p20241116.ebuild index 75f102b8b7ab..0f8a9f5aaf44 100644 --- a/sys-devel/kgcc64/kgcc64-14.2.1_p20241026.ebuild +++ b/sys-devel/kgcc64/kgcc64-14.2.1_p20241116.ebuild @@ -14,7 +14,7 @@ esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" TOOLCHAIN_PATCH_DEV="sam" -PATCH_VER="2" +PATCH_VER="3" PATCH_GCC_VER="14.2.0" MUSL_VER="1" MUSL_GCC_VER="14.1.0" @@ -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/Manifest b/sys-devel/lld/Manifest index c21eafcf0611..415ef8748a39 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -7,6 +7,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.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.3.src.tar.xz 141247864 BLAKE2B 4ccb30accd632a7d54eb065b724ff81ec8a50380fa527111d58acd728eecb798d42f680119b6d1cbc980523e2f39220921ca1f530daa7afea05ab27436dedb7e SHA512 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c -DIST llvm-project-19.1.3.src.tar.xz.sig 438 BLAKE2B 44717741ae13bb0c52382647352e52273d8401728dc5cc1cf0c11a8f08cd74b6e3d789e788793aad767030b36fdec62e3a05bdc0b7ff60556cec7ceac17fc239 SHA512 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d -DIST llvm-project-3f4468faaa9525ad615118675c3c68938f4a8d5f.tar.gz 221860252 BLAKE2B 6c531df34163dc0879c79b029a13215d1bef2cd95bbaf4a6d5e10b81a8352236283d40f14b62e23a57cc1cf8edce138fb6e2720ced2397d6469c5863564c626d SHA512 4aa485f4547e210cf8f6f8147c4adab3e75afe77f1e4e1bc4718fe681b64bdcf8937f843964542f8ead90ceef52cc0fd4bd8275824d1a4c6961eddafc7d35115 +DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906 +DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764 +DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22 +DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54 +DIST llvm-project-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db diff --git a/sys-devel/lld/lld-18.1.8.ebuild b/sys-devel/lld/lld-18.1.8.ebuild index d5245986a556..64b6082241c4 100644 --- a/sys-devel/lld/lld-18.1.8.ebuild +++ b/sys-devel/lld/lld-18.1.8.ebuild @@ -59,9 +59,6 @@ src_unpack() { 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" diff --git a/sys-devel/lld/lld-19.1.3.ebuild b/sys-devel/lld/lld-19.1.4.ebuild index f8e23cb7e5b3..8aa86d3f073c 100644 --- a/sys-devel/lld/lld-19.1.3.ebuild +++ b/sys-devel/lld/lld-19.1.4.ebuild @@ -59,9 +59,6 @@ src_unpack() { 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" diff --git a/sys-devel/lld/lld-19.1.5.ebuild b/sys-devel/lld/lld-19.1.5.ebuild new file mode 100644 index 000000000000..8aa86d3f073c --- /dev/null +++ b/sys-devel/lld/lld-19.1.5.ebuild @@ -0,0 +1,91 @@ +# 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 ~x64-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}" + + # 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 index 79558afa1abe..07358f891cd0 100644 --- a/sys-devel/lld/lld-20.0.0.9999.ebuild +++ b/sys-devel/lld/lld-20.0.0.9999.ebuild @@ -58,9 +58,6 @@ src_unpack() { 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" diff --git a/sys-devel/lld/lld-20.0.0_pre20241029.ebuild b/sys-devel/lld/lld-20.0.0_pre20241130.ebuild index 79558afa1abe..07358f891cd0 100644 --- a/sys-devel/lld/lld-20.0.0_pre20241029.ebuild +++ b/sys-devel/lld/lld-20.0.0_pre20241130.ebuild @@ -58,9 +58,6 @@ src_unpack() { 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" diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest index e26c9edcd89a..c349b276c950 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -6,6 +6,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.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.3.src.tar.xz 141247864 BLAKE2B 4ccb30accd632a7d54eb065b724ff81ec8a50380fa527111d58acd728eecb798d42f680119b6d1cbc980523e2f39220921ca1f530daa7afea05ab27436dedb7e SHA512 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c -DIST llvm-project-19.1.3.src.tar.xz.sig 438 BLAKE2B 44717741ae13bb0c52382647352e52273d8401728dc5cc1cf0c11a8f08cd74b6e3d789e788793aad767030b36fdec62e3a05bdc0b7ff60556cec7ceac17fc239 SHA512 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d -DIST llvm-project-3f4468faaa9525ad615118675c3c68938f4a8d5f.tar.gz 221860252 BLAKE2B 6c531df34163dc0879c79b029a13215d1bef2cd95bbaf4a6d5e10b81a8352236283d40f14b62e23a57cc1cf8edce138fb6e2720ced2397d6469c5863564c626d SHA512 4aa485f4547e210cf8f6f8147c4adab3e75afe77f1e4e1bc4718fe681b64bdcf8937f843964542f8ead90ceef52cc0fd4bd8275824d1a4c6961eddafc7d35115 +DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906 +DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764 +DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22 +DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54 +DIST llvm-project-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db diff --git a/sys-devel/llvm-common/llvm-common-19.1.3.ebuild b/sys-devel/llvm-common/llvm-common-19.1.4.ebuild index 7a852f871e36..7a852f871e36 100644 --- a/sys-devel/llvm-common/llvm-common-19.1.3.ebuild +++ b/sys-devel/llvm-common/llvm-common-19.1.4.ebuild diff --git a/sys-devel/llvm-common/llvm-common-19.1.5.ebuild b/sys-devel/llvm-common/llvm-common-19.1.5.ebuild new file mode 100644 index 000000000000..7a852f871e36 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.1.5.ebuild @@ -0,0 +1,54 @@ +# 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_pre20241029.ebuild b/sys-devel/llvm-common/llvm-common-20.0.0_pre20241130.ebuild index 2d8f35a84179..2d8f35a84179 100644 --- a/sys-devel/llvm-common/llvm-common-20.0.0_pre20241029.ebuild +++ b/sys-devel/llvm-common/llvm-common-20.0.0_pre20241130.ebuild diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index e079ec4a4ffb..4e4de480af66 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -20,6 +20,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.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.3.src.tar.xz 141247864 BLAKE2B 4ccb30accd632a7d54eb065b724ff81ec8a50380fa527111d58acd728eecb798d42f680119b6d1cbc980523e2f39220921ca1f530daa7afea05ab27436dedb7e SHA512 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c -DIST llvm-project-19.1.3.src.tar.xz.sig 438 BLAKE2B 44717741ae13bb0c52382647352e52273d8401728dc5cc1cf0c11a8f08cd74b6e3d789e788793aad767030b36fdec62e3a05bdc0b7ff60556cec7ceac17fc239 SHA512 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d -DIST llvm-project-3f4468faaa9525ad615118675c3c68938f4a8d5f.tar.gz 221860252 BLAKE2B 6c531df34163dc0879c79b029a13215d1bef2cd95bbaf4a6d5e10b81a8352236283d40f14b62e23a57cc1cf8edce138fb6e2720ced2397d6469c5863564c626d SHA512 4aa485f4547e210cf8f6f8147c4adab3e75afe77f1e4e1bc4718fe681b64bdcf8937f843964542f8ead90ceef52cc0fd4bd8275824d1a4c6961eddafc7d35115 +DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906 +DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764 +DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22 +DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54 +DIST llvm-project-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db diff --git a/sys-devel/llvm/llvm-19.1.3.ebuild b/sys-devel/llvm/llvm-19.1.4.ebuild index 64c63c9517cb..64c63c9517cb 100644 --- a/sys-devel/llvm/llvm-19.1.3.ebuild +++ b/sys-devel/llvm/llvm-19.1.4.ebuild diff --git a/sys-devel/llvm/llvm-19.1.5.ebuild b/sys-devel/llvm/llvm-19.1.5.ebuild new file mode 100644 index 000000000000..64c63c9517cb --- /dev/null +++ b/sys-devel/llvm/llvm-19.1.5.ebuild @@ -0,0 +1,548 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug debuginfod doc exegesis libedit +libffi + test xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-${LLVM_VERSION}.9999 + ) + 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_USE_TARGETS=provide +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_any_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +python_check_deps() { + llvm_are_manpages_built || return 0 + + python_has_version -b "dev-python/myst-parser[${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) + ;; + # used by lldb + LLVMDebuginfod) + ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; + # 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 + + if has_version ">=sys-libs/glibc-2.40"; then + # https://github.com/llvm/llvm-project/issues/100791 + rm -r test/tools/llvm-exegesis/X86/latency || die + fi +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport + ) + + if multilib_is_native_abi; then + out+=( + # library used by lldb + LLVMDebuginfod + + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-readtapi + llvm-reduce + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + reduce-chunk-list + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + use kernel_Darwin && mycmakeargs+=( + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build cmake_build distribution + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-20.0.0_pre20241029.ebuild b/sys-devel/llvm/llvm-20.0.0_pre20241130.ebuild index d01575f39051..d01575f39051 100644 --- a/sys-devel/llvm/llvm-20.0.0_pre20241029.ebuild +++ b/sys-devel/llvm/llvm-20.0.0_pre20241130.ebuild diff --git a/sys-devel/m4/m4-1.4.19-r2.ebuild b/sys-devel/m4/m4-1.4.19-r2.ebuild index 42c854e636e2..93f8c13a49f8 100644 --- a/sys-devel/m4/m4-1.4.19-r2.ebuild +++ b/sys-devel/m4/m4-1.4.19-r2.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/m4.asc -inherit verify-sig +inherit flag-o-matic verify-sig DESCRIPTION="GNU macro processor" HOMEPAGE="https://www.gnu.org/software/m4/m4.html" @@ -20,7 +20,7 @@ else 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 -LICENSE="GPL-3" +LICENSE="GPL-3+" SLOT="0" IUSE="examples nls" @@ -65,6 +65,9 @@ src_prepare() { } src_configure() { + # https://savannah.gnu.org/support/index.php?111150 + append-cflags -std=gnu17 + local -a myeconfargs=( --enable-changeword diff --git a/sys-devel/mold/mold-2.34.1.ebuild b/sys-devel/mold/mold-2.34.1.ebuild index 456f654912e4..a0350478640f 100644 --- a/sys-devel/mold/mold-2.34.1.ebuild +++ b/sys-devel/mold/mold-2.34.1.ebuild @@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]] ; then else SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" # -alpha: https://github.com/rui314/mold/commit/3711ddb95e23c12991f6b8c7bfeba4f1421d19d4 - KEYWORDS="-alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~riscv ~sparc ~x86" + KEYWORDS="-alpha amd64 ~arm ~arm64 ~loong ~ppc ~riscv ~sparc ~x86" fi # mold (MIT) diff --git a/sys-devel/nvptx-tools/Manifest b/sys-devel/nvptx-tools/Manifest index 59a28d80175c..ecd3230d16fa 100644 --- a/sys-devel/nvptx-tools/Manifest +++ b/sys-devel/nvptx-tools/Manifest @@ -1 +1 @@ -DIST nvptx-tools-0_pre20230122.tar.gz 789116 BLAKE2B f05b922827c0215a2484c4f91f3424ca866bb91435a3d60559fc9f1f63c06559377f1c8071c9e8e5607ec4dbff1c22d095385ac86d35f43ade29d9df6699f3ff SHA512 9d3bceef2ef7942ea6ec8b6c6b1b9144f0a020bfabc2583ba4ef73db8ef299ffadbc6dbe27748c728bd16aee0ecd6f0fbe1f8bb064bde986bb4e0475b2494870 +DIST nvptx-tools-0_pre20240809.tar.gz 994915 BLAKE2B eef94a55d4ec48fb3031e20d5722e4f0564e7ed5ddc217a0b88d15236d9c15bbd60d14ab537e3535c40e800d75578c21833c6f414bdf11f0fed6f7eb3721478a SHA512 b98ee6f045ec820d056ce7cf4af4d3dcabdd0e77d15f02a88dd3e7f60de6ec32ecb454787f1ef626e358cde7744c5635f8d2e8ff78b46a714f627a37ac256ddb diff --git a/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild b/sys-devel/nvptx-tools/nvptx-tools-0_pre20240809.ebuild index a73728161032..b6308a59af98 100644 --- a/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild +++ b/sys-devel/nvptx-tools/nvptx-tools-0_pre20240809.ebuild @@ -1,16 +1,16 @@ -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains" -HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx" +HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx https://gcc.gnu.org/wiki/Offloading" if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools" inherit git-r3 else - MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b" + MY_COMMIT="a0c1fff6534a4df9fb17937c3c4a4b1071212029" SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/${PN}-${MY_COMMIT} diff --git a/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild index a73728161032..b6308a59af98 100644 --- a/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild +++ b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild @@ -1,16 +1,16 @@ -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains" -HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx" +HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx https://gcc.gnu.org/wiki/Offloading" if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools" inherit git-r3 else - MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b" + MY_COMMIT="a0c1fff6534a4df9fb17937c3c4a4b1071212029" SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/${PN}-${MY_COMMIT} diff --git a/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch b/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch new file mode 100644 index 000000000000..b29d7b087538 --- /dev/null +++ b/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/898598 +https://github.com/coreutils/gnulib/commit/3c136a2cc38d71083f123231a8b9ad4b01930789 + +diff '--color=auto' -ruN patch-2.7.6.orig/configure patch-2.7.6/configure +--- patch-2.7.6.orig/configure 2018-02-03 14:41:50.000000000 +0100 ++++ patch-2.7.6/configure 2024-11-19 23:19:08.710565121 +0100 +@@ -17130,6 +17130,7 @@ + /* end confdefs.h. */ + #include <unistd.h> + #include <fcntl.h> ++ #include <sys/stat.h> + + int + main () diff --git a/sys-devel/patch/patch-2.7.6-r6.ebuild b/sys-devel/patch/patch-2.7.6-r6.ebuild new file mode 100644 index 000000000000..25168b8c544b --- /dev/null +++ b/sys-devel/patch/patch-2.7.6-r6.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Utility to apply diffs to files" +HOMEPAGE="https://www.gnu.org/software/patch/patch.html" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/patch.git" + inherit git-r3 +else + SRC_URI="mirror://gnu/patch/${P}.tar.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/patch/${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 + +LICENSE="GPL-3+" +SLOT="0" +IUSE="static test xattr" +RESTRICT="!test? ( test )" + +RDEPEND="xattr? ( sys-apps/attr )" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( sys-apps/ed ) + verify-sig? ( sec-keys/openpgp-keys-patch ) +" + +PATCHES=( + "${FILESDIR}"/${P}-fix-test-suite.patch + "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch + "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch + "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch + "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch + "${FILESDIR}"/${PN}-2.7.6-configure-mkdir.patch +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + + cd "${S}" || die + ./bootstrap || die + elif use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} + fi + + default +} + +src_configure() { + use static && append-ldflags -static + + local myeconfargs=( + $(use_enable xattr) + # rename to gpatch for better BSD compatibility + --program-prefix=g + ) + # Do not let $ED mess up the search for `ed` 470210. + ac_cv_path_ED=$(type -P ed) \ + econf "${myeconfargs[@]}" +} + +src_test() { + emake check gl_public_submodule_commit= +} + +src_install() { + default + + # symlink to the standard name + dosym gpatch /usr/bin/patch + dosym gpatch.1 /usr/share/man/man1/patch.1 +} diff --git a/sys-devel/reflex/reflex-20240906.ebuild b/sys-devel/reflex/reflex-20240906.ebuild index a4bba5868907..669c54565b3e 100644 --- a/sys-devel/reflex/reflex-20240906.ebuild +++ b/sys-devel/reflex/reflex-20240906.ebuild @@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${P}.tgz.as LICENSE="FLEX" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86" BDEPEND=" app-alternatives/yacc diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest index fab54bd14563..b5b8c90bbcec 100644 --- a/sys-devel/rust-std/Manifest +++ b/sys-devel/rust-std/Manifest @@ -6,3 +6,4 @@ DIST rustc-1.79.0-src.tar.xz 162359512 BLAKE2B 753c0e9c537644d1a12b4d38024c22952 DIST rustc-1.80.1-src.tar.xz 199234944 BLAKE2B 39891362f2a4bc249f5d943e3ded48d2add9cd9c0ee3c085d7fbefbfbc784f1e029308d9486cd35a6c03b77243077dc1196c75980faeea0d4319cee057509b6a SHA512 3c746108a86eeb734c1a8c8f63ba1a45e2cb03a8cb553395a167d07dc3ce5d8d9ea365ddd95533b6952d915069b86cad7ad218d27861e0889f8e878136bd32ab DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad0670be6872f691b4c9f36faf06803f072720ebd04f06745c355d807991b38312cc830b12d6d3f50b0574bb7325340b7 SHA512 b8a837ced521d2ca2c7f228a0640da591384519e4dbc1ae768524d50616da6abbd2f7bdae3777caebc0447dac91bf76481282ce5a2264d7f30e173caa6321a51 DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0 +DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a32094187b3812dee628b327a5b2faca57235abc54d033c586c071c8bfa0c7360bb28761aaa42fe18414e388db704d81231 SHA512 64db57949c6ac1df6a3f4c6bd0938685a5fb1bc3d318b34ccfcfccb0f9eff1cffd4d8a53a190ef0409eeca9ad12bc6234c2c1de69196cc74ae02d6afa20d0ce6 diff --git a/sys-devel/rust-std/rust-std-1.83.0.ebuild b/sys-devel/rust-std/rust-std-1.83.0.ebuild new file mode 100644 index 000000000000..8e1c916b7dbe --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.83.0.ebuild @@ -0,0 +1,154 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" +S="${WORKDIR}/${P/-std/c}-src" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} |