From 1804d2ae908b26fe4e3d3a38646c7d6ffa733d92 Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@koprulu.sector>
Date: Wed, 24 Jan 2024 10:45:40 +0000
Subject: gentoo auto-resync : 24:01:2024 - 10:45:40

---
 sys-devel/Manifest.gz                              | Bin 7858 -> 7867 bytes
 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.41-r5.ebuild | 508 +++++++++++++++++++
 sys-devel/binutils/Manifest                        |   2 +-
 sys-devel/binutils/binutils-2.41-r5.ebuild         |   2 +-
 sys-devel/clang-common/Manifest                    |   1 +
 .../clang-common/clang-common-19.0.0.9999.ebuild   | 257 ++++++++++
 sys-devel/clang-runtime/Manifest                   |   1 +
 .../clang-runtime/clang-runtime-19.0.0.9999.ebuild |  39 ++
 sys-devel/clang-toolchain-symlinks/Manifest        |   1 +
 .../clang-toolchain-symlinks-19.ebuild             |  58 +++
 sys-devel/clang/Manifest                           |   1 +
 sys-devel/clang/clang-19.0.0.9999.ebuild           | 472 ++++++++++++++++++
 sys-devel/crossdev/Manifest                        |   2 +-
 sys-devel/crossdev/crossdev-20240117.ebuild        |   2 +-
 sys-devel/lld-toolchain-symlinks/Manifest          |   1 +
 .../lld-toolchain-symlinks-19.ebuild               |  37 ++
 sys-devel/lld/Manifest                             |   1 +
 sys-devel/lld/lld-19.0.0.9999.ebuild               |  89 ++++
 sys-devel/llvm-common/Manifest                     |   1 +
 .../llvm-common/llvm-common-19.0.0.9999.ebuild     |  53 ++
 sys-devel/llvm-toolchain-symlinks/Manifest         |   1 +
 .../llvm-toolchain-symlinks-19.ebuild              |  46 ++
 sys-devel/llvm/Manifest                            |   1 +
 sys-devel/llvm/llvm-19.0.0.9999.ebuild             | 535 +++++++++++++++++++++
 sys-devel/llvmgold/Manifest                        |   1 +
 sys-devel/llvmgold/llvmgold-19.ebuild              |  22 +
 27 files changed, 2132 insertions(+), 4 deletions(-)
 create mode 100644 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
 create mode 100644 sys-devel/clang-common/clang-common-19.0.0.9999.ebuild
 create mode 100644 sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
 create mode 100644 sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
 create mode 100644 sys-devel/clang/clang-19.0.0.9999.ebuild
 create mode 100644 sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
 create mode 100644 sys-devel/lld/lld-19.0.0.9999.ebuild
 create mode 100644 sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild
 create mode 100644 sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
 create mode 100644 sys-devel/llvm/llvm-19.0.0.9999.ebuild
 create mode 100644 sys-devel/llvmgold/llvmgold-19.ebuild

(limited to 'sys-devel')

diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index 38d6dffad34b..2fc8dd4489fb 100644
Binary files a/sys-devel/Manifest.gz and b/sys-devel/Manifest.gz differ
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 32d522d529a2..7f1c8d7a199f 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -9,6 +9,7 @@ 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-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
 DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
+DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
 EBUILD binutils-hppa64-2.37_p1-r2.ebuild 13286 BLAKE2B 120e55db5b3d5d072765b9e73f1740ad7ec68e3bcc564816caf7fd7f0d2a6f7826ed7ef20e932a1e0d74c362fc94ce91b3507f1b0b8eb4e4693020954851132a SHA512 187b721fd6bacffa89c5035737cf7b28f9a9a72f26da9af3cc680c362692490f34e756edf1bcc969643698d4fe54125701c0d9b47456482fad28bb1d7e406714
 EBUILD binutils-hppa64-2.38-r2.ebuild 13299 BLAKE2B 270ba4d89b0ab64e5eba9fd255da8b21a883257c39322b49c7f0967055a82e5eaeca58c5113b43ba7bab53b4f006ca81c12cd06d2d775ab6a6c7f7ebf10a9a01 SHA512 0119e75dbeabb4ea32b2700684c8793a5bd9927134dcf3d314755a8fa0990719384c3c1314dcdc77364650b85560a8d1706e5184b1dcf328cda7eb58f2735830
@@ -17,4 +18,5 @@ EBUILD binutils-hppa64-2.40-r5.ebuild 14304 BLAKE2B 4e9f79625045e4a3f25133cf6ad6
 EBUILD binutils-hppa64-2.40-r7.ebuild 14304 BLAKE2B 46acf1ddc52015edbb1f5496c4dd5fc55859e8c3a3ea4365d931e01bb1cd48a538b745dc7d228413f90e63db4077c0bacda7d2a4528746455db9216f7db92fde SHA512 fc8e321f66cf8fd9b3c03bc78cc0d51dc7d0fbc24b0d83347fb34f817753d4fa4be1b4f139b3e24d749ca47e6788f65eec0262185759b13a577b246a292843a9
 EBUILD binutils-hppa64-2.41-r1.ebuild 14490 BLAKE2B e2edc7fb455218f1d4f8af33e64114ec4f422c9430ec4e62951e8fc78d5ff7e4c7097ef750f4f5930f4f405308ca3238862ec2b2663f3c01ecf7362554b1578f SHA512 799c4c11b55efe156f726b7cd1db204a24c9250b2cfbb64206f6e4e76f0a0ccb781e05486595cd6010a4bea0882f308bccd1712964b244c78969c2fe4a4a3264
 EBUILD binutils-hppa64-2.41-r3.ebuild 14489 BLAKE2B 79eb4d787a2aee35229c3a9fd32804449db0245adb9a0a02674a59767347958d276bec7d88df2850daf236c1369fb569c0a7f95c4d57cdb1c01394c9fd818c5b SHA512 2bee9236bb1a27809e2e236b29e7e1378a7eff9ace039973c448912403d55057da5d0694c13daf9137f300a3bb1549f40863ea1df64ff2f455a63a837b82137a
+EBUILD binutils-hppa64-2.41-r5.ebuild 14490 BLAKE2B 7273507b53bbf90c4653874be33c5d40d2406ddfff9ba160c75d28c16d9c701dae65df6532a72098f18679477b85850f7d6e0154cb3b61b2e4101eda4947a7ce SHA512 93cab605fe8b0f8c71146587b83af14b351517b6506ca6985f9814ede58b5f7b4c851750b58e92dcfa6ccef1cdf384c3febcdd83748f185f711d1df6990c5f0e
 MISC metadata.xml 1004 BLAKE2B 069a799bb001c8c22afecebe6156098546f39e9e03c2ac194172ef6f0f49de976db90bfef03c634cdb696d9484d38bb5f2abb3fcbf7c6cda7cb14a39e5f4a87f SHA512 faa4cb332dd6eeff2ecd4dbfec67693bffcaafba588fb2ef6f64ea5e978c24646d0a555c39983497e660be1cd0518bf15dbc03f89584533f9271d58afb4a3f56
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
new file mode 100644
index 000000000000..3f322c6559f0
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
@@ -0,0 +1,508 @@
+# 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 multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# 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=5
+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://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
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	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
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		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."
+		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
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# 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 elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	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 )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	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
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# 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.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# 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)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-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)
+	)
+
+	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]
+	emake tooldir="${EPREFIX}${TOOLPATH}" 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} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index a6b017c3712c..7bdcab314cbc 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -42,6 +42,6 @@ EBUILD binutils-2.40-r9.ebuild 14487 BLAKE2B 4e0d5ff6c86da083ad85b37b607ea5fabe4
 EBUILD binutils-2.41-r2.ebuild 14821 BLAKE2B 38ddc81a48036856b55b8e25ed5595032bf388cf08c49c908bac6e2fb301e9eb3e13855de97a97e1f0f71ba5f1cd56b7555c5f3835c0d979ed3b59cfc571f277 SHA512 fa732d0021b15e68aee2d16b6863ffa0f45cfe33b75b9dbdc6036e3587c729d8e4096f2fa1a40fd04654b3693715d37ed9e860c2bfe19fd40d0e904c13d9a767
 EBUILD binutils-2.41-r3.ebuild 14821 BLAKE2B 9bf23c07ec922a5009ba9e90530af3ff421657d685afa91ef28c53bb1b1483e1d9e433e8d2513b20cb5307eab378520ac747495ae8774dbe62d30741b728f660 SHA512 686bbf93eee8cdc8f7b12111d58f04c4907688c872e9f5e562a9fb4537180c059e730930d84ddb5a57602154b32df2540f9e1e5daee56b129dcf65222f6e0063
 EBUILD binutils-2.41-r4.ebuild 15017 BLAKE2B 909a353d0b0c991306453725d153d0e2a0edf297d6bd1737bbeb48db619d30c210e7f67f5c1c9e5e10d40fa99fb42c2415ed5852da18b3ac4697087a25667dde SHA512 d1c248345f8276e675deb28e21d66add9b3d49fc5aaae49a32930741ca18de86dc78aed5584d5f7e991b3f121d686cfd2aba5e5664e2798297404906b08dbbc7
-EBUILD binutils-2.41-r5.ebuild 15019 BLAKE2B b54c1e04fbef3fdb91ec589bec44c60ab5586654cf9e38f856b01f173a58d5a5a0434376ec33b036f4c2a2cca76402c7090a81e653a19a76a2cd0a360f5ff56d SHA512 6e76bd765cbbcb2cf127e1b69da07a7cd2196ea5eee1d67ba6474109b799e554619d3dcc31bfebbfcf9ab962b7c1e57a42039fc8e82687b48ace5eadd577d6cf
+EBUILD binutils-2.41-r5.ebuild 15017 BLAKE2B 6286298e40cdbb2485d1e178eabe4540ea58eda710c7392da535d0dcb0abb91324bf8e3032b825d08033a67f8799b4bc0ead8f0d3852c4abec302a374359eb01 SHA512 75b4773ff11271046e370e91eeff6a46071222e5ad06cab594d0fa240f314f57008849150be6ec58600713d0eaa12b428b230b604b5fb1183ad9d78280f4dc01
 EBUILD binutils-9999.ebuild 15018 BLAKE2B 5e8c1d55fda95c53d3702baa9f62275a6305640a6d4918557837ec50e53ecf46df5bd0e70f5f63541de4f4e4109c7db724b7daef639b9707b38a3fca5318668b SHA512 061bcba8011f311c3445ee01970358c8d2f0bb5f4132cbacf305792106924f07880a3d299e9b73a23be536bb02a158433670b92f4e7d613a09653bac237fe641
 MISC metadata.xml 995 BLAKE2B 85ccdd924f8c459a4cd7e608dff59c7281523da0d9457b0094b97e140cd07a300cb38383d9402808859100ca0bf219ce86e367bb5282216121bd81f68d588c17 SHA512 3ee538640e5d8c0efe6b8cf1de299e0d78965dece1ad814384844e8e24db72b11ca30d5fb68dfae2e71046d35aee0e71ee3ecbda3730ca49446dd0b2cd0f817c
diff --git a/sys-devel/binutils/binutils-2.41-r5.ebuild b/sys-devel/binutils/binutils-2.41-r5.ebuild
index 5d564c277fc1..1dd8b1bda2cf 100644
--- a/sys-devel/binutils/binutils-2.41-r5.ebuild
+++ b/sys-devel/binutils/binutils-2.41-r5.ebuild
@@ -32,7 +32,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
 fi
 
 #
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index 0c7fbcda24a0..63fbf30c4926 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -14,4 +14,5 @@ EBUILD clang-common-18.0.0.9999.ebuild 7650 BLAKE2B b8d648f4bf5b1713b5d6b6b0f8f0
 EBUILD clang-common-18.0.0_pre20240106.ebuild 7650 BLAKE2B b8d648f4bf5b1713b5d6b6b0f8f0c748e27137dc377496df12ed3621c9aacdc7efb299f84d92925e9fe4d6e06ce7a770f4c3e7c311e789fde2bec20d5c131d25 SHA512 de7ee9e4c0ef261ffca3567ebe4d74dcab3ec2c4032af0c2c11cb40634b88f044a83031317b7c54e5e3420d6345a38b49e472669b762dd56d4fa81e4be0f2ffe
 EBUILD clang-common-18.0.0_pre20240113.ebuild 7650 BLAKE2B b8d648f4bf5b1713b5d6b6b0f8f0c748e27137dc377496df12ed3621c9aacdc7efb299f84d92925e9fe4d6e06ce7a770f4c3e7c311e789fde2bec20d5c131d25 SHA512 de7ee9e4c0ef261ffca3567ebe4d74dcab3ec2c4032af0c2c11cb40634b88f044a83031317b7c54e5e3420d6345a38b49e472669b762dd56d4fa81e4be0f2ffe
 EBUILD clang-common-18.0.0_pre20240120.ebuild 7650 BLAKE2B b8d648f4bf5b1713b5d6b6b0f8f0c748e27137dc377496df12ed3621c9aacdc7efb299f84d92925e9fe4d6e06ce7a770f4c3e7c311e789fde2bec20d5c131d25 SHA512 de7ee9e4c0ef261ffca3567ebe4d74dcab3ec2c4032af0c2c11cb40634b88f044a83031317b7c54e5e3420d6345a38b49e472669b762dd56d4fa81e4be0f2ffe
+EBUILD clang-common-19.0.0.9999.ebuild 7650 BLAKE2B b8d648f4bf5b1713b5d6b6b0f8f0c748e27137dc377496df12ed3621c9aacdc7efb299f84d92925e9fe4d6e06ce7a770f4c3e7c311e789fde2bec20d5c131d25 SHA512 de7ee9e4c0ef261ffca3567ebe4d74dcab3ec2c4032af0c2c11cb40634b88f044a83031317b7c54e5e3420d6345a38b49e472669b762dd56d4fa81e4be0f2ffe
 MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..dbc4a213e1c4
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="
+	default-compiler-rt default-libcxx default-lld llvm-libunwind
+	hardened
+"
+
+PDEPEND="
+	sys-devel/clang:*
+	default-compiler-rt? (
+		sys-devel/clang-runtime[compiler-rt]
+		llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+		!llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+	)
+	!default-compiler-rt? ( sys-devel/gcc )
+	default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+	!default-libcxx? ( sys-devel/gcc )
+	default-lld? ( sys-devel/lld )
+	!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
+	done
+
+	newins - "${triple}-clang-cpp.cfg" <<-EOF
+		# This configuration file is used by the ${triple}-clang-cpp driver.
+		@gentoo-common.cfg
+	EOF
+
+	# 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.
+		-fstack-clash-protection
+		-fstack-protector-strong
+		-fPIE
+		-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+	EOF
+
+	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
+	EOF
+
+	dodir /usr/include/gentoo
+
+	cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+	/* __has_include is an extension, but it's fine, because this is only
+	for Clang anyway. */
+	#if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+	# include <stdc-predef.h>
+	#endif
+	EOF
+
+	local fortify_level=$(usex hardened 3 2)
+	# We have to do this because glibc's headers warn if F_S is set
+	# without optimization and that would at the very least be very noisy
+	# during builds and at worst trigger many -Werror builds.
+	cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+	#ifdef __clang__
+	# pragma clang system_header
+	#endif
+	#ifndef _FORTIFY_SOURCE
+	# if defined(__has_feature)
+	#  define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+	# else
+	#  define __GENTOO_HAS_FEATURE(x) 0
+	# endif
+	#
+	# if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+	#  define __GENTOO_NOT_FREESTANDING 1
+	# else
+	#  define __GENTOO_NOT_FREESTANDING 0
+	# endif
+	#
+	# if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+	#  if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+	#   define _FORTIFY_SOURCE ${fortify_level}
+	#  endif
+	# endif
+	# undef __GENTOO_HAS_FEATURE
+	# undef __GENTOO_NOT_FREESTANDING
+	#endif
+	EOF
+
+	# TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for
+	# non-hardened?
+	if use hardened ; then
+		cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+			# Options below are conditional on USE=hardened.
+			-D_GLIBCXX_ASSERTIONS
+
+			# Analogue to GLIBCXX_ASSERTIONS
+			# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+			# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+			-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
+		EOF
+
+		cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+			# Options below are conditional on USE=hardened.
+			-Wl,-z,now
+		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
+}
+
+pkg_preinst() {
+	if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+	then
+		local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+		if [[ -n ${gcc_path} ]]; then
+			cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+				--gcc-install-dir="${gcc_path%%:*}"
+			EOF
+		fi
+	fi
+}
diff --git a/sys-devel/clang-runtime/Manifest b/sys-devel/clang-runtime/Manifest
index 34f42ba113ee..074c05812fd6 100644
--- a/sys-devel/clang-runtime/Manifest
+++ b/sys-devel/clang-runtime/Manifest
@@ -5,4 +5,5 @@ EBUILD clang-runtime-18.0.0.9999.ebuild 1339 BLAKE2B 60f0ce6dc250d959f058872d748
 EBUILD clang-runtime-18.0.0_pre20240106.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a
 EBUILD clang-runtime-18.0.0_pre20240113.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a
 EBUILD clang-runtime-18.0.0_pre20240120.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a
+EBUILD clang-runtime-19.0.0.9999.ebuild 1339 BLAKE2B 4a5ee8a332faf2da21256df048867b1458a5ccb2d733d00ee3788bfbc28b3daf4ce2ae2455ab03c9ebb192d964feae2cd5806b5fef23eaa9401d57b35386aa57 SHA512 fac3e259b5a7b5e105b3d5fd2f8e9a9b6236642867e4c4a67106ec999dfaf0a30a97a3905685043a0ab9f38b15b7b8a5a814a97921e37029b9d0beac7ba7085a
 MISC metadata.xml 661 BLAKE2B 24688c511713ea102b83c71d226d519981b3aee0e05ef7a56d6a80be829efd843194e45cb4fd801f0bb976b6f1976386d6a2b05d2bc907fe2aa42b22b85b7d1f SHA512 2b5ab8783c90795f2e7d1673d876048ed9745f4911fb7a860df56deac13a6dfeba4581a84562eae54eff757c45042ca3fab75c7800313ae61df9ce69780a9294
diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..323c0b62c062
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+	compiler-rt? (
+		~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+		sanitize? (
+			~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+		)
+	)
+	libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+	openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+	if tc-is-clang; then
+		ewarn "You seem to be using clang as a system compiler.  As of clang-16,"
+		ewarn "upstream has turned a few warnings that commonly occur during"
+		ewarn "configure script runs into errors by default.  This causes some"
+		ewarn "configure tests to start failing, sometimes resulting in silent"
+		ewarn "breakage, missing functionality or runtime misbehavior.  It is"
+		ewarn "not yet clear whether the change will remain or be reverted."
+		ewarn
+		ewarn "For more information, please see:"
+		ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+	fi
+}
diff --git a/sys-devel/clang-toolchain-symlinks/Manifest b/sys-devel/clang-toolchain-symlinks/Manifest
index 60a6e0dfac11..50f25b2a3265 100644
--- a/sys-devel/clang-toolchain-symlinks/Manifest
+++ b/sys-devel/clang-toolchain-symlinks/Manifest
@@ -2,4 +2,5 @@ EBUILD clang-toolchain-symlinks-15-r2.ebuild 1141 BLAKE2B 21117f19b6d2aa9ff91a44
 EBUILD clang-toolchain-symlinks-16-r2.ebuild 1148 BLAKE2B 0dc5db3a5c817cb04fdc32a201cc4257f3df1e82a7086b275a1209ea7ef6a172f45a318743ffdc2099262028a369c2c657d07565aaf16dc8f0d991e2d73109ca SHA512 612bdab9aefe89fae98bfba5962bae334cf8b4c1c60e7e0f44137de012dc6f1728a10355395b30c7acf88ac1088e82a193120d2d9a34988102a1e383f71abec6
 EBUILD clang-toolchain-symlinks-17.ebuild 1152 BLAKE2B f0d39d4fac569f49c5f674fb3d0a6721cf8d509a5ffa38306d7eb370cc59003b0173bc8c9f196b5146d99c6d98af7c9351d1c7d25a8bdcaade0d5e3825da6e28 SHA512 488bdc0dafc43914f4de6bcd76bb414aaeb1d41c9a0881a26c9f0aa3b002e714a4a02407651e495617d5d8f761f762774ea396942e764c7d525ee331a6746c79
 EBUILD clang-toolchain-symlinks-18.ebuild 1063 BLAKE2B 7789bac94f03e818f99b75a4d241386aaa6e729b67e21da1b356de55d2c63534ef908de4cacdc99e803278b1c518af5b302023a9947adb34ab93d64877d611cb SHA512 52ff13fa432e3f6cae5ab0e323b16a78beda457f0bdd1bf80bee222f4e8946032e4261be36381ddef2227f98699ab18d37feb8dc64b905377d81fff26bef4d2e
+EBUILD clang-toolchain-symlinks-19.ebuild 1063 BLAKE2B 07ac0ca66a30f4052a0add8ac3ae29705143a8d5ffe7de03b757b867615197f743155a5077abcbb63ad22c730ff0b9044a1db084d858e92ff0ac572f8da32a91 SHA512 67c542c73bb8d70821b2b7ca987071348537fcc1a09dd50c95a565e9461f8da9f29a56b486732d8c73554cf117df42cf78be9801329cd392ffdd8562626c97d3
 MISC metadata.xml 904 BLAKE2B d2c8a31355b0f3bea6c5b4c72d198f40bf14b6908f5a3f765b48fffb2ba3e4f09a8bb37c87ea4e7d9b4e1de0a3ad2c80bdca6feb45538c973119f27ba6329ad8 SHA512 846548593c071d6905b56984c6924086d5f03929c813be986c89c57a6924d1976975b29769ee60a2796287753aa3453608794af8d36cf48b76c55920778c27d4
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..3496a0f89b67
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+	!<sys-devel/gcc-config-2.6
+	sys-devel/clang:${SLOT}
+"
+
+src_install() {
+	local tools=()
+
+	if use native-symlinks; then
+		tools+=(
+			cc:clang
+			cpp:clang-cpp
+			c++:clang++
+		)
+	fi
+	if use gcc-symlinks; then
+		tools+=(
+			gcc:clang
+			g++:clang++
+		)
+	fi
+
+	local chosts=( "${CHOST}" )
+	if use multilib-symlinks; then
+		local abi
+		for abi in $(get_all_abis); do
+			chosts+=( "$(get_abi_CHOST "${abi}")" )
+		done
+	fi
+
+	local chost t
+	local dest=/usr/lib/llvm/${SLOT}/bin
+	dodir "${dest}"
+	for t in "${tools[@]}"; do
+		dosym "${t#*:}" "${dest}/${t%:*}"
+	done
+	for chost in "${chosts[@]}"; do
+		for t in "${tools[@]}"; do
+			dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+		done
+	done
+}
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index e3cb896d4d27..56d8190cffe1 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -19,4 +19,5 @@ EBUILD clang-18.0.0.9999.ebuild 12030 BLAKE2B be1d7f543125a0ef72ef4b14bb5349325b
 EBUILD clang-18.0.0_pre20240106.ebuild 12030 BLAKE2B be1d7f543125a0ef72ef4b14bb5349325bb7c1d5d9ff3d07db8507e9cf4ace7843c863b192e12e868b06e5868f9f99aa2bc5c3e83554e35ea1de0c8615cbdac8 SHA512 0aa5c4b8db0335d0dfddb40efcf9b1f904c549c27716a585b2410a2f1249c879f83ccb82c20a50eb0981fbb939ff68d5ef20afa11658824b02a98eb0b8cb4fa7
 EBUILD clang-18.0.0_pre20240113.ebuild 12030 BLAKE2B be1d7f543125a0ef72ef4b14bb5349325bb7c1d5d9ff3d07db8507e9cf4ace7843c863b192e12e868b06e5868f9f99aa2bc5c3e83554e35ea1de0c8615cbdac8 SHA512 0aa5c4b8db0335d0dfddb40efcf9b1f904c549c27716a585b2410a2f1249c879f83ccb82c20a50eb0981fbb939ff68d5ef20afa11658824b02a98eb0b8cb4fa7
 EBUILD clang-18.0.0_pre20240120.ebuild 12030 BLAKE2B be1d7f543125a0ef72ef4b14bb5349325bb7c1d5d9ff3d07db8507e9cf4ace7843c863b192e12e868b06e5868f9f99aa2bc5c3e83554e35ea1de0c8615cbdac8 SHA512 0aa5c4b8db0335d0dfddb40efcf9b1f904c549c27716a585b2410a2f1249c879f83ccb82c20a50eb0981fbb939ff68d5ef20afa11658824b02a98eb0b8cb4fa7
+EBUILD clang-19.0.0.9999.ebuild 12030 BLAKE2B be1d7f543125a0ef72ef4b14bb5349325bb7c1d5d9ff3d07db8507e9cf4ace7843c863b192e12e868b06e5868f9f99aa2bc5c3e83554e35ea1de0c8615cbdac8 SHA512 0aa5c4b8db0335d0dfddb40efcf9b1f904c549c27716a585b2410a2f1249c879f83ccb82c20a50eb0981fbb939ff68d5ef20afa11658824b02a98eb0b8cb4fa7
 MISC metadata.xml 1318 BLAKE2B 704c1a64297b25da1b2e0eec23cbdf4791273da1babf23292160b6163d43438e62fe214df7afa09232893599951918440954c17a9bfa0c6f829a7d706f564192 SHA512 4677ad146739dd41e025a2335eec353a3d35ac8db7482948fee611566d84b41c4e6bdd75bc3d78f8933d4d9818a36bf222e1aa89e52f945501ff918479fea3b6
diff --git a/sys-devel/clang/clang-19.0.0.9999.ebuild b/sys-devel/clang/clang-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..f5f1a7728b48
--- /dev/null
+++ b/sys-devel/clang/clang-19.0.0.9999.ebuild
@@ -0,0 +1,472 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm llvm.org multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+# MSVCSetupApi.h: MIT
+# sorttable.js: MIT
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
+	static-analyzer? ( dev-lang/perl:* )
+	xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	${DEPEND}
+	>=sys-devel/clang-common-${PV}
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	doc? ( $(python_gen_cond_dep '
+		dev-python/myst-parser[${PYTHON_USEDEP}]
+		dev-python/sphinx[${PYTHON_USEDEP}]
+	') )
+	xml? ( virtual/pkgconfig )
+"
+PDEPEND="
+	~sys-devel/clang-runtime-${PV}
+	sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=(
+	clang clang-tools-extra cmake
+	llvm/lib/Transforms/Hello
+)
+LLVM_MANPAGES=1
+LLVM_TEST_COMPONENTS=(
+	llvm/utils
+)
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+#    target. However, you will need appropriate crt* files (installed
+#    e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+#    in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+pkg_setup() {
+	LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	# create extra parent dir for relative CLANG_RESOURCE_DIR access
+	mkdir -p x/y || die
+	BUILD_DIR=${WORKDIR}/x/y/clang
+
+	llvm.org_src_prepare
+
+	# add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
+	eprefixify \
+		lib/Lex/InitHeaderSearch.cpp \
+		lib/Driver/ToolChains/Darwin.cpp || die
+
+	if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+		sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+	fi
+}
+
+check_distribution_components() {
+	if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+		local all_targets=() my_targets=() l
+		cd "${BUILD_DIR}" || die
+
+		while read -r l; do
+			if [[ ${l} == install-*-stripped:* ]]; then
+				l=${l#install-}
+				l=${l%%-stripped*}
+
+				case ${l} in
+					# meta-targets
+					clang-libraries|distribution)
+						continue
+						;;
+					# tools
+					clang|clangd|clang-*)
+						;;
+					# static libraries
+					clang*|findAllSymbols)
+						continue
+						;;
+					# conditional to USE=doc
+					docs-clang-html|docs-clang-tools-html)
+						use doc || continue
+						;;
+				esac
+
+				all_targets+=( "${l}" )
+			fi
+		done < <(${NINJA} -t targets all)
+
+		while read -r l; do
+			my_targets+=( "${l}" )
+		done < <(get_distribution_components $"\n")
+
+		local add=() remove=()
+		for l in "${all_targets[@]}"; do
+			if ! has "${l}" "${my_targets[@]}"; then
+				add+=( "${l}" )
+			fi
+		done
+		for l in "${my_targets[@]}"; do
+			if ! has "${l}" "${all_targets[@]}"; then
+				remove+=( "${l}" )
+			fi
+		done
+
+		if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+			eqawarn "get_distribution_components() is outdated!"
+			eqawarn "   Add: ${add[*]}"
+			eqawarn "Remove: ${remove[*]}"
+		fi
+		cd - >/dev/null || die
+	fi
+}
+
+get_distribution_components() {
+	local sep=${1-;}
+
+	local out=(
+		# common stuff
+		clang-cmake-exports
+		clang-headers
+		clang-resource-headers
+		libclang-headers
+
+		aarch64-resource-headers
+		arm-common-resource-headers
+		arm-resource-headers
+		core-resource-headers
+		cuda-resource-headers
+		hexagon-resource-headers
+		hip-resource-headers
+		hlsl-resource-headers
+		mips-resource-headers
+		opencl-resource-headers
+		openmp-resource-headers
+		ppc-htm-resource-headers
+		ppc-resource-headers
+		riscv-resource-headers
+		systemz-resource-headers
+		utility-resource-headers
+		ve-resource-headers
+		webassembly-resource-headers
+		windows-resource-headers
+		x86-resource-headers
+
+		# libs
+		clang-cpp
+		libclang
+	)
+
+	if multilib_is_native_abi; then
+		out+=(
+			# common stuff
+			bash-autocomplete
+			libclang-python-bindings
+
+			# tools
+			amdgpu-arch
+			c-index-test
+			clang
+			clang-format
+			clang-linker-wrapper
+			clang-offload-bundler
+			clang-offload-packager
+			clang-refactor
+			clang-repl
+			clang-rename
+			clang-scan-deps
+			diagtool
+			hmaptool
+			nvptx-arch
+
+			# needed for cross-compiling Clang
+			clang-tblgen
+		)
+
+		if use extra; then
+			out+=(
+				# extra tools
+				clang-apply-replacements
+				clang-change-namespace
+				clang-doc
+				clang-include-cleaner
+				clang-include-fixer
+				clang-move
+				clang-pseudo
+				clang-query
+				clang-reorder-fields
+				clang-tidy
+				clang-tidy-headers
+				clangd
+				find-all-symbols
+				modularize
+				pp-trace
+			)
+		fi
+
+		if llvm_are_manpages_built; then
+			out+=( docs-clang-man )
+			use extra && out+=( docs-clang-tools-man )
+		fi
+
+		if use doc; then
+			out+=( docs-clang-html )
+			use extra && out+=( docs-clang-tools-html )
+		fi
+
+		use static-analyzer && out+=(
+			clang-check
+			clang-extdef-mapping
+			scan-build
+			scan-build-py
+			scan-view
+		)
+	fi
+
+	printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		-DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+		-DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+		-DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
+		# relative to bindir
+		-DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
+
+		-DBUILD_SHARED_LIBS=OFF
+		-DCLANG_LINK_CLANG_DYLIB=ON
+		-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+		-DCLANG_INCLUDE_TESTS=$(usex test)
+
+		-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+
+		# these are not propagated reliably, so redefine them
+		-DLLVM_ENABLE_EH=ON
+		-DLLVM_ENABLE_RTTI=ON
+
+		# libgomp support fails to find headers without explicit -I
+		# furthermore, it provides only syntax checking
+		-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+		# disable using CUDA to autodetect GPU, just build for all
+		-DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+		# disable linking to HSA to avoid automagic dep,
+		# load it dynamically instead
+		-DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
+
+		-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+		-DCLANG_ENABLE_LIBXML2=$(usex xml)
+		-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+		-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+		# TODO: CLANG_ENABLE_HLSL?
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if ! use elibc_musl; then
+		mycmakeargs+=(
+			-DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+		)
+	fi
+
+	use test && mycmakeargs+=(
+		-DLLVM_BUILD_TESTS=ON
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+	)
+
+	if multilib_is_native_abi; then
+		local build_docs=OFF
+		if llvm_are_manpages_built; then
+			build_docs=ON
+			mycmakeargs+=(
+				-DLLVM_BUILD_DOCS=ON
+				-DLLVM_ENABLE_SPHINX=ON
+				-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+				-DSPHINX_WARNINGS_AS_ERRORS=OFF
+			)
+			if use extra; then
+				mycmakeargs+=(
+					-DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+				)
+			fi
+		fi
+		mycmakeargs+=(
+			-DCLANG_INCLUDE_DOCS=${build_docs}
+		)
+	fi
+	if multilib_native_use extra; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
+			-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
+		)
+	else
+		mycmakeargs+=(
+			-DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+		)
+	fi
+
+	if [[ -n ${EPREFIX} ]]; then
+		mycmakeargs+=(
+			-DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+		)
+	fi
+
+	if tc-is-cross-compiler; then
+		has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+			die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+		local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
+		mycmakeargs+=(
+			-DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+			-DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
+		)
+	fi
+
+	# LLVM can have very high memory consumption while linking,
+	# exhausting the limit on 32-bit linker executable
+	use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+	cmake_src_configure
+
+	multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+	cmake_build distribution
+}
+
+multilib_src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	local test_targets=( check-clang )
+	if multilib_native_use extra; then
+		test_targets+=(
+			check-clang-tools
+			check-clangd
+		)
+	fi
+	cmake_build "${test_targets[@]}"
+}
+
+src_install() {
+	MULTILIB_WRAPPED_HEADERS=(
+		/usr/include/clang/Config/config.h
+	)
+
+	multilib-minimal_src_install
+
+	# Move runtime headers to /usr/lib/clang, where they belong
+	mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
+	# move (remaining) wrapped headers back
+	if use extra; then
+		mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+	fi
+	mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+
+	# Apply CHOST and version suffix to clang tools
+	local clang_tools=( clang clang++ clang-cl clang-cpp )
+	local abi i
+
+	# cmake gives us:
+	# - clang-X
+	# - clang -> clang-X
+	# - clang++, clang-cl, clang-cpp -> clang
+	# we want to have:
+	# - clang-X
+	# - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+	# - clang, clang++, clang-cl, clang-cpp -> clang*-X
+	# also in CHOST variant
+	for i in "${clang_tools[@]:1}"; do
+		rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+		dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+		dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
+	done
+
+	# now create target symlinks for all supported ABIs
+	for abi in $(get_all_abis); do
+		local abi_chost=$(get_abi_CHOST "${abi}")
+		for i in "${clang_tools[@]}"; do
+			dosym "${i}-${LLVM_MAJOR}" \
+				"/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+			dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+				"/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
+		done
+	done
+}
+
+multilib_src_install() {
+	DESTDIR=${D} cmake_build install-distribution
+
+	# move headers to /usr/include for wrapping & ABI mismatch checks
+	# (also drop the version suffix from runtime headers)
+	rm -rf "${ED}"/usr/include || die
+	mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+	mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+	if multilib_native_use extra; then
+		# don't wrap clang-tidy headers, the list is too long
+		# (they're fine for non-native ABI but enabling the targets is problematic)
+		mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+	fi
+}
+
+multilib_src_install_all() {
+	python_fix_shebang "${ED}"
+	if use static-analyzer; then
+		python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
+	fi
+
+	docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+	llvm_install_manpages
+	# match 'html' non-compression
+	use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+	# +x for some reason; TODO: investigate
+	use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+	if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+		eselect compiler-shadow update all
+	fi
+
+	elog "You can find additional utility scripts in:"
+	elog "  ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+	if use extra; then
+		elog "Some of them are vim integration scripts (with instructions inside)."
+		elog "The run-clang-tidy.py script requires the following additional package:"
+		elog "  dev-python/pyyaml"
+	fi
+}
+
+pkg_postrm() {
+	if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+		eselect compiler-shadow clean all
+	fi
+}
diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest
index a2ad42025c35..9ac9df0cedd2 100644
--- a/sys-devel/crossdev/Manifest
+++ b/sys-devel/crossdev/Manifest
@@ -1,6 +1,6 @@
 DIST crossdev-20230923.tar.xz 30824 BLAKE2B f67d57cfcffcbefe56c9150e97b7189c79a87a8d75e41a2e47441ed23ec248d1b0fd6ef774f81e6086544b9d1551a14a4a49917fdb5366dfc9d1a2439f87d68e SHA512 b9048a19b388eebfe42b2fcb27c100fc574d81a4a2d6a11ef08f8552b49b5690c6e076a379a6c50cf45567faa00dface225a8539dacf44d1bfae12d4ab05ee2b
 DIST crossdev-20240117.tar.xz 30880 BLAKE2B 35c2aadf633ff8155a3a03c6e062e56655e9e9612a785de516ace8da05d2a2a91578290b8bfae6e44b91af3cce327371373df9cfe202ab09a442cecba7418c41 SHA512 ce830ec3f767843541c4e36b3189e42cd180e77b208939864309b32cca7c4156eb7fd73adbcfec7873a4389f98885e6b1291f38346eba5578e8125e9900ccfaa
 EBUILD crossdev-20230923.ebuild 958 BLAKE2B 23979c10f1a59b47b2ecd7028186df140e86c782a87c8e3cd97e6a36428832b533d121f369de973ee202c768c7130509633f220db68f1f782bd63074b401bab8 SHA512 318379f32167cadb1a3c1c696fdb97b9d0816928ce105423f593481803ff7cc3a5d00622f33d0319f22301a106fd4a0cff15a60edaa6c74c8fb5b7b3a56eac6d
-EBUILD crossdev-20240117.ebuild 959 BLAKE2B b3cb6d6b1dd62cd3cd6e763edc0957134082e18800799c912147a6030acd2190b93f2478cdaf17cc9668dbab7b9fd5a0376586b0c2d4f6bca5c98990cb5a0e86 SHA512 1b4cca8764ecdbc9985ca690cd2a37c49124605c5cedc8fbef830a80c4bd1700a7de3be65d7a161921e67f32a0049730e168bbf0ea88728f88d8e17cdc2b6dbe
+EBUILD crossdev-20240117.ebuild 958 BLAKE2B 82e7706d93e772de67fb5b662ffd9ecfebaefad86f6b44022443ff621f644d93c863362e146ae92726d9a1287744e140ccd8bf621f8a876f03da5867a4e347fb SHA512 9962148e4e72f5c310e4780cee57569f3897a056242885875476c8aacd3bbdeca6fba690a8aecfd64d5a64a6a7754e67943496164ba03193a5155de4cf30fe0f
 EBUILD crossdev-99999999.ebuild 966 BLAKE2B 3623e1686ea545fa9368fe3d4e7163e4b6f5fd7ed340877ab58ba20cec830a38424fb0ff21df173ac7878796d4c820f34a51b654ed11b6767d9a4506e8afd470 SHA512 341fadaaefc5106f77d8c7dc6578f0bd8b0533682ef29ab34bd9d9f2f3b06332b9de454652849b3f175a95621756ce03748b77edbd30c1174f72c5408de3a3c6
 MISC metadata.xml 624 BLAKE2B 3f6609db4ad549927d9e7c0f259926de694435707aba7fabd2d08333294bc38bad42b59b7ab9f6372bec292708ebfdb88d88ee0e8dca1ed29389e33427a1d46e SHA512 4605364fe155bb8facae233aa29fadae23fe3d1f012451f8611933252f81aa3d3337ac9d68feabe059c959e2a94a67a85e6d88f7fa08d6d31e2418034b60010a
diff --git a/sys-devel/crossdev/crossdev-20240117.ebuild b/sys-devel/crossdev/crossdev-20240117.ebuild
index 5a167c20e498..060ebf803d66 100644
--- a/sys-devel/crossdev/crossdev-20240117.ebuild
+++ b/sys-devel/crossdev/crossdev-20240117.ebuild
@@ -11,7 +11,7 @@ if [[ ${PV} == "99999999" ]] ; then
 	"
 else
 	SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
 fi
 
 DESCRIPTION="Gentoo Cross-toolchain generator"
diff --git a/sys-devel/lld-toolchain-symlinks/Manifest b/sys-devel/lld-toolchain-symlinks/Manifest
index 0f1a9fbbaec0..65913682a0e8 100644
--- a/sys-devel/lld-toolchain-symlinks/Manifest
+++ b/sys-devel/lld-toolchain-symlinks/Manifest
@@ -2,4 +2,5 @@ EBUILD lld-toolchain-symlinks-15-r2.ebuild 790 BLAKE2B be95621853ffc4825c59f7375
 EBUILD lld-toolchain-symlinks-16-r2.ebuild 790 BLAKE2B be95621853ffc4825c59f7375450fc5e563da475a151c3333224b420a21dc774af6626b9f7e910e07b3ea489721f2c3a95954633882be4b4e9efbec7e24cedbe SHA512 c062c61a96046490b9664d0257ffd94c8b031bb37f461a1e1e16cab6870c34ced5d2d775fd446e5d539d27b6e61ecf9c4b2f8cc6cadf11d27f1a72ccf84a0b3e
 EBUILD lld-toolchain-symlinks-17.ebuild 799 BLAKE2B cd330a8d928bd5cc044370c691f8d0674d782e79e321fa45a744326cc5c2b9fab45835077f04049b57c65fb1f014a37f6a99a3b61dca3271557f6bbe7acff47e SHA512 ac59f36764a151e4ad6677ce4d580241cfabfb0f39d532c2dd6072893af1c894c8009887882f0c35f9e8240d804302062f2a842e87d1fee67cc6467a1a888f9e
 EBUILD lld-toolchain-symlinks-18.ebuild 741 BLAKE2B 40418d032d039797a5676e8ce3bb5ed1fe2e15dcad8464770908f3a116f117ee7c8a22211340133a4b11d1ae0594c8f33d45410967ce92cf793e7fed358c26ed SHA512 68d5b09bc4a2a5d886e6bec536ae2ea960e66d6c231a20c4bdba92e07d6ea77f30d311b65a3768ace807a354a765ec7157531807207c03e77a6ca3bee9ac0a44
+EBUILD lld-toolchain-symlinks-19.ebuild 741 BLAKE2B c7fe69e799f612934d3ac376e7f0a082eec89e14718053f99198cce5485036ed6e2c5ddf0bed429dc08c4abccc4e09fc9f9949d3513539ec73e74e0737c4993e SHA512 fe6bfb302233cd66c0a3deaa03687db079cdd5890a59421c80b170ad8a9d87b28def21a638a95acc156a2335c2fd47aefcfcc1b982650c4ed3415ae5a215a040
 MISC metadata.xml 784 BLAKE2B 044eebb87ddac511186e137d9e255cb3ead2d53aeffafc641cc9a53556b833f06cae439907de8e8ead1090d54f7cc4bcacdbfff52449b6fab5908aa6d354a110 SHA512 50a9ac94efe64f8f6533049f496a19c37e375803ea3920a3729c93f346117ea5b662978570db27e8fffcfaf78f990691c4ab5aaf7dd48a7e2931f713eddedb4b
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..b85bf912c557
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+	sys-devel/lld:${SLOT}
+"
+
+src_install() {
+	use native-symlinks || return
+
+	local chosts=( "${CHOST}" )
+	if use multilib-symlinks; then
+		local abi
+		for abi in $(get_all_abis); do
+			chosts+=( "$(get_abi_CHOST "${abi}")" )
+		done
+	fi
+
+	local dest=/usr/lib/llvm/${SLOT}/bin
+	dodir "${dest}"
+	dosym ld.lld "${dest}/ld"
+	for chost in "${chosts[@]}"; do
+		dosym ld.lld "${dest}/${chost}-ld"
+	done
+}
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index afc63ac2ccbf..c5a2accdd788 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -15,4 +15,5 @@ EBUILD lld-18.0.0.9999.ebuild 2199 BLAKE2B ce9162e5de2ab6d0ffa94f5132f996d3b7f45
 EBUILD lld-18.0.0_pre20240106.ebuild 2199 BLAKE2B ce9162e5de2ab6d0ffa94f5132f996d3b7f45d46937fe6a6d86a9b4cafc1435f27309853e7e00be2938ba8bc4e24a99eafc4a6fa11c9d2f49e6b3b2c3cbfd960 SHA512 e81ca64ee28290e35be514d4b3b1767f5efb21a26812a97291b865407fa7953c27a66145a9b0f6036b09353e6b5ee48c5a682580eaa093b36af28103749ec98c
 EBUILD lld-18.0.0_pre20240113.ebuild 2199 BLAKE2B ce9162e5de2ab6d0ffa94f5132f996d3b7f45d46937fe6a6d86a9b4cafc1435f27309853e7e00be2938ba8bc4e24a99eafc4a6fa11c9d2f49e6b3b2c3cbfd960 SHA512 e81ca64ee28290e35be514d4b3b1767f5efb21a26812a97291b865407fa7953c27a66145a9b0f6036b09353e6b5ee48c5a682580eaa093b36af28103749ec98c
 EBUILD lld-18.0.0_pre20240120.ebuild 2199 BLAKE2B ce9162e5de2ab6d0ffa94f5132f996d3b7f45d46937fe6a6d86a9b4cafc1435f27309853e7e00be2938ba8bc4e24a99eafc4a6fa11c9d2f49e6b3b2c3cbfd960 SHA512 e81ca64ee28290e35be514d4b3b1767f5efb21a26812a97291b865407fa7953c27a66145a9b0f6036b09353e6b5ee48c5a682580eaa093b36af28103749ec98c
+EBUILD lld-19.0.0.9999.ebuild 2199 BLAKE2B ce9162e5de2ab6d0ffa94f5132f996d3b7f45d46937fe6a6d86a9b4cafc1435f27309853e7e00be2938ba8bc4e24a99eafc4a6fa11c9d2f49e6b3b2c3cbfd960 SHA512 e81ca64ee28290e35be514d4b3b1767f5efb21a26812a97291b865407fa7953c27a66145a9b0f6036b09353e6b5ee48c5a682580eaa093b36af28103749ec98c
 MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/lld/lld-19.0.0.9999.ebuild b/sys-devel/lld/lld-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..e72385c1bdb1
--- /dev/null
+++ b/sys-devel/lld/lld-19.0.0.9999.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	~sys-devel/llvm-${PV}[debug=,zstd=]
+	sys-libs/zlib:=
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+	${DEPEND}
+	!sys-devel/lld:0
+"
+BDEPEND="
+	sys-devel/llvm:${LLVM_MAJOR}
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+	)
+"
+PDEPEND="
+	>=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+llvm.org_set_globals
+
+python_check_deps() {
+	python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+	use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+	llvm.org_src_unpack
+
+	# Directory ${WORKDIR}/llvm does not exist with USE="-test",
+	# but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+	# and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+	# (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+	# to existent directory ${WORKDIR}/libunwind/include.
+	mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local mycmakeargs=(
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+		-DBUILD_SHARED_LIBS=ON
+		-DLLVM_INCLUDE_TESTS=$(usex test)
+		-DLLVM_ENABLE_ZLIB=FORCE_ON
+		-DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+	)
+
+	use test && mycmakeargs+=(
+		-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	tc-is-cross-compiler &&	mycmakeargs+=(
+		-DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	local -x LIT_PRESERVES_TMP=1
+	cmake_build check-lld
+}
diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest
index abed1cd214a7..a5fc68df6fdd 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -14,4 +14,5 @@ EBUILD llvm-common-18.0.0.9999.ebuild 925 BLAKE2B 6c17c6fa9b0e8713243f77a3ac6079
 EBUILD llvm-common-18.0.0_pre20240106.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d
 EBUILD llvm-common-18.0.0_pre20240113.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d
 EBUILD llvm-common-18.0.0_pre20240120.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d
+EBUILD llvm-common-19.0.0.9999.ebuild 925 BLAKE2B 18510f8adb0e892eb63bdbf8a6154f56e23ed026ee6f0bf05bbccbafea843beb228bf57e14b01525fb0b067fdfa897faadbfd61179844a7c397c7f1d3b6fca64 SHA512 0cff75fcbabf14ba1526201d65b79486aefaf559accf5bd479a3643c4351ac997f6d55b2323328fabc4009e887e1cfe70681df5593c62a5b5bbfffb8312ea22d
 MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..2d8f35a84179
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="emacs"
+
+RDEPEND="
+	!sys-devel/llvm:0
+"
+BDEPEND="
+	emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+	default
+
+	use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+	insinto /usr/share/vim/vimfiles
+	doins -r vim/*/
+	# some users may find it useful
+	newdoc vim/README README.vim
+	dodoc vim/vimrc
+
+	if use emacs ; then
+		elisp-install llvm emacs/*.{el,elc}
+		elisp-make-site-file "${SITEFILE}" llvm
+	fi
+}
+
+pkg_postinst() {
+	use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/Manifest b/sys-devel/llvm-toolchain-symlinks/Manifest
index f8ec1745246c..c4f537d9363c 100644
--- a/sys-devel/llvm-toolchain-symlinks/Manifest
+++ b/sys-devel/llvm-toolchain-symlinks/Manifest
@@ -2,4 +2,5 @@ EBUILD llvm-toolchain-symlinks-15-r1.ebuild 1037 BLAKE2B a91128b9fb9ee30983645e1
 EBUILD llvm-toolchain-symlinks-16-r1.ebuild 1044 BLAKE2B 0809ec50dcf6e7dea682fb3261709552ad3ef5738e57725c94be80ef93f67bb421d7efd89e1d98a13383c809eb4a9b51c48d152e0a86f1a8cb74ff889eecde5b SHA512 325e8c03fd70f2da1388d21ab869bea6de30497c10d5b84125228f7e3a2a10d1f23ac0bc62ba42f441196841b7ef886b60bc914a70c8736c0e0b3c8668c31e39
 EBUILD llvm-toolchain-symlinks-17.ebuild 1048 BLAKE2B a622f916c79be24f60bbe82a33a9dbe3b8c49328061e32cfb4f671a2250562a941006a26bdc9bbe2addd3b90b3ffcc72a67a9310103164c586ea6da8d0f200c0 SHA512 fcc7e963b7b7593ee84b38992f0c540e99f0e80346adb7449ea3df2be3f5cc225a08464e013d38ea577ac1fdee4911cf3552605a9e8645b3e66bdbd2a2b3e0b3
 EBUILD llvm-toolchain-symlinks-18.ebuild 948 BLAKE2B a054bfcaac2e56f051dbe557f558ed25532b89cc3f32cdb6f09472120a65bc2ce950649eed44b6a38600eee1a107821624bfd051147e7a9de00a5982e31cd50c SHA512 e2655ef075dbd6929a42ba5e25fa3b6e8759f94043c6fadabffd4c5269fe9ceb55c114c1f8f0a3160eeaebf92d9f7db4ae6b0e35547bce812abf5656cabf03ef
+EBUILD llvm-toolchain-symlinks-19.ebuild 948 BLAKE2B 969a3785aa751670044ac1b37e0f6049916b0ff01833261266b330d530cf569249f11afdbac59fb9029970d65b7906a0ed2312aedca4cfdc1d1722a999fb85a4 SHA512 6cdba225e045f5c2ebbaa0a77603cb70ff89fcfb98b99c3568f8f794a876c716af3721bd81216298f88ada7392bc8fbb2ef92ad42acdfe96844c795e11e62e47
 MISC metadata.xml 815 BLAKE2B 963f1b8425495144d04659d2d8cdabab910f15f9861634bf436a82ccb70b27682b44c47415ca6884956097e92294457d09b5c44e7a2f108c93abb79df8884aa7 SHA512 940a6c63c4c13a1c78c041c02df9bd3d2ac0f19eb552fcfb8134784386a2197956b1dd4950c760ca6ac9e8fb154eb550d59fc6ab1aea9c9236e7e005882d556a
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..a57062acab8c
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+	sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+	use native-symlinks || return
+
+	local tools=(
+		addr2line ar dlltool nm objcopy objdump ranlib readelf size
+		strings strip windres
+	)
+	local chosts=( "${CHOST}" )
+	if use multilib-symlinks; then
+		local abi
+		for abi in $(get_all_abis); do
+			chosts+=( "$(get_abi_CHOST "${abi}")" )
+		done
+	fi
+
+	local chost t
+	local dest=/usr/lib/llvm/${SLOT}/bin
+	dodir "${dest}"
+	for t in "${tools[@]}"; do
+		dosym "llvm-${t}" "${dest}/${t}"
+	done
+	for chost in "${chosts[@]}"; do
+		for t in "${tools[@]}"; do
+			dosym "llvm-${t}" "${dest}/${chost}-${t}"
+		done
+	done
+}
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index c5ef644ba983..83d0b274e95e 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -20,4 +20,5 @@ EBUILD llvm-18.0.0.9999.ebuild 12854 BLAKE2B f41244f8df56293b629bc40ce5cd1e2a9b7
 EBUILD llvm-18.0.0_pre20240106.ebuild 12854 BLAKE2B f41244f8df56293b629bc40ce5cd1e2a9b709c935ca14871e4e76898df8ff3d3df94199e379d98fe57e13d324086e55e95fdc1a3a663241c67f143e0a81953bf SHA512 0232eda261b4f607e59afb870b151b256b64742d369cf1b26eb641e3ce499435b3541c9eb418f8bcca847aedd03d4ecff0b58f0f6b0fcb2106f86d190a40194b
 EBUILD llvm-18.0.0_pre20240113.ebuild 12854 BLAKE2B f41244f8df56293b629bc40ce5cd1e2a9b709c935ca14871e4e76898df8ff3d3df94199e379d98fe57e13d324086e55e95fdc1a3a663241c67f143e0a81953bf SHA512 0232eda261b4f607e59afb870b151b256b64742d369cf1b26eb641e3ce499435b3541c9eb418f8bcca847aedd03d4ecff0b58f0f6b0fcb2106f86d190a40194b
 EBUILD llvm-18.0.0_pre20240120.ebuild 12854 BLAKE2B f41244f8df56293b629bc40ce5cd1e2a9b709c935ca14871e4e76898df8ff3d3df94199e379d98fe57e13d324086e55e95fdc1a3a663241c67f143e0a81953bf SHA512 0232eda261b4f607e59afb870b151b256b64742d369cf1b26eb641e3ce499435b3541c9eb418f8bcca847aedd03d4ecff0b58f0f6b0fcb2106f86d190a40194b
+EBUILD llvm-19.0.0.9999.ebuild 12854 BLAKE2B f41244f8df56293b629bc40ce5cd1e2a9b709c935ca14871e4e76898df8ff3d3df94199e379d98fe57e13d324086e55e95fdc1a3a663241c67f143e0a81953bf SHA512 0232eda261b4f607e59afb870b151b256b64742d369cf1b26eb641e3ce499435b3541c9eb418f8bcca847aedd03d4ecff0b58f0f6b0fcb2106f86d190a40194b
 MISC metadata.xml 2835 BLAKE2B 07816d714509d62c0e0a443cc4af1f1f049497de75431f80a981f662b4f2281a16655be3e733a26099d0d814d5ce26d80cee13aa7a4e8d079168846a8e02670f SHA512 292ccb0a05a0239b5b00c6a84be11b4b385900d6467a6a139af03588c61aff9ac0e4bbcd23e89b2a7d7947f7d8cf8ba9323f2539a6c563a338b73f5ac6ffd00f
diff --git a/sys-devel/llvm/llvm-19.0.0.9999.ebuild b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..9c1e247877cc
--- /dev/null
+++ b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
@@ -0,0 +1,535 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. xxhash: BSD.
+# 3. MD5 code: public-domain.
+# 4. ConvertUTF.h: TODO.
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="
+	+binutils-plugin +debug debuginfod doc exegesis libedit +libffi
+	ncurses test xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+	debuginfod? (
+		net-misc/curl:=
+		dev-cpp/cpp-httplib:=
+	)
+	exegesis? ( dev-libs/libpfm:= )
+	libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+	libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+	ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+	xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+	z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+	${RDEPEND}
+	binutils-plugin? ( sys-libs/binutils-libs )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	dev-lang/perl
+	sys-devel/gnuconfig
+	kernel_Darwin? (
+		<sys-libs/libcxx-${LLVM_VERSION}.9999
+		>=sys-devel/binutils-apple-5.1
+	)
+	doc? ( $(python_gen_any_dep '
+		dev-python/myst-parser[${PYTHON_USEDEP}]
+		dev-python/sphinx[${PYTHON_USEDEP}]
+	') )
+	libffi? ( virtual/pkgconfig )
+"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="
+	${RDEPEND}
+	!sys-devel/llvm:0
+"
+PDEPEND="
+	sys-devel/llvm-common
+	sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+	binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_MANPAGES=1
+LLVM_USE_TARGETS=provide
+llvm.org_set_globals
+
+python_check_deps() {
+	use doc || 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)
+						;;
+					# 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
+}
+
+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+=(
+			# utilities
+			llvm-tblgen
+			FileCheck
+			llvm-PerfectShuffle
+			count
+			not
+			yaml-bench
+			UnicodeNameMappingGenerator
+
+			# tools
+			bugpoint
+			dsymutil
+			llc
+			lli
+			lli-child-target
+			llvm-addr2line
+			llvm-ar
+			llvm-as
+			llvm-bcanalyzer
+			llvm-bitcode-strip
+			llvm-c-test
+			llvm-cat
+			llvm-cfi-verify
+			llvm-config
+			llvm-cov
+			llvm-cvtres
+			llvm-cxxdump
+			llvm-cxxfilt
+			llvm-cxxmap
+			llvm-debuginfo-analyzer
+			llvm-debuginfod-find
+			llvm-diff
+			llvm-dis
+			llvm-dlltool
+			llvm-dwarfdump
+			llvm-dwarfutil
+			llvm-dwp
+			llvm-exegesis
+			llvm-extract
+			llvm-gsymutil
+			llvm-ifs
+			llvm-install-name-tool
+			llvm-jitlink
+			llvm-jitlink-executor
+			llvm-lib
+			llvm-libtool-darwin
+			llvm-link
+			llvm-lipo
+			llvm-lto
+			llvm-lto2
+			llvm-mc
+			llvm-mca
+			llvm-ml
+			llvm-modextract
+			llvm-mt
+			llvm-nm
+			llvm-objcopy
+			llvm-objdump
+			llvm-opt-report
+			llvm-otool
+			llvm-pdbutil
+			llvm-profdata
+			llvm-profgen
+			llvm-ranlib
+			llvm-rc
+			llvm-readelf
+			llvm-readobj
+			llvm-readtapi
+			llvm-reduce
+			llvm-remarkutil
+			llvm-rtdyld
+			llvm-sim
+			llvm-size
+			llvm-split
+			llvm-stress
+			llvm-strings
+			llvm-strip
+			llvm-symbolizer
+			llvm-tli-checker
+			llvm-undname
+			llvm-windres
+			llvm-xray
+			obj2yaml
+			opt
+			sancov
+			sanstats
+			split-file
+			verify-uselistorder
+			yaml2obj
+
+			# python modules
+			opt-viewer
+		)
+
+		if llvm_are_manpages_built; then
+			out+=(
+				# manpages
+				docs-dsymutil-man
+				docs-llvm-dwarfdump-man
+				docs-llvm-man
+			)
+		fi
+		use doc && out+=(
+			docs-llvm-html
+		)
+
+		use binutils-plugin && out+=(
+			LLVMgold
+		)
+		use debuginfod && out+=(
+			llvm-debuginfod
+		)
+	fi
+
+	printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+	local ffi_cflags ffi_ldflags
+	if use libffi; then
+		ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+		ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+	fi
+
+	local libdir=$(get_libdir)
+	local mycmakeargs=(
+		# disable appending VCS revision to the version to improve
+		# direct cache hit ratio
+		-DLLVM_APPEND_VC_REV=OFF
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+		-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+		-DBUILD_SHARED_LIBS=OFF
+		-DLLVM_BUILD_LLVM_DYLIB=ON
+		-DLLVM_LINK_LLVM_DYLIB=ON
+		-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+		# cheap hack: LLVM combines both anyway, and the only difference
+		# is that the former list is explicitly verified at cmake time
+		-DLLVM_TARGETS_TO_BUILD=""
+		-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+		-DLLVM_INCLUDE_BENCHMARKS=OFF
+		-DLLVM_INCLUDE_TESTS=ON
+		-DLLVM_BUILD_TESTS=$(usex test)
+		-DLLVM_INSTALL_GTEST=ON
+
+		-DLLVM_ENABLE_FFI=$(usex libffi)
+		-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+		-DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+		-DLLVM_ENABLE_LIBXML2=$(usex xml)
+		-DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+		-DLLVM_ENABLE_LIBPFM=$(usex exegesis)
+		-DLLVM_ENABLE_EH=ON
+		-DLLVM_ENABLE_RTTI=ON
+		-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+		-DLLVM_ENABLE_ZLIB=FORCE_ON
+		-DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+		-DLLVM_ENABLE_CURL=$(usex debuginfod)
+		-DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
+
+		-DLLVM_HOST_TRIPLE="${CHOST}"
+
+		-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+		-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+
+		# disable OCaml bindings (now in dev-ml/llvm-ocaml)
+		-DOCAMLFIND=NO
+	)
+
+	local suffix=
+	if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+		# the ABI of the main branch is not stable, so let's include
+		# the commit id in the SOVERSION to contain the breakage
+		suffix+="git${EGIT_VERSION::8}"
+	fi
+	if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+		# Smart hack: alter version suffix -> SOVERSION when linking
+		# against libc++. This way we won't end up mixing LLVM libc++
+		# libraries with libstdc++ clang, and the other way around.
+		suffix+="+libcxx"
+		mycmakeargs+=(
+			-DLLVM_ENABLE_LIBCXX=ON
+		)
+	fi
+	mycmakeargs+=(
+		-DLLVM_VERSION_SUFFIX="${suffix}"
+	)
+
+	use test && mycmakeargs+=(
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+	)
+
+	if multilib_is_native_abi; then
+		local build_docs=OFF
+		if llvm_are_manpages_built; then
+			build_docs=ON
+			mycmakeargs+=(
+				-DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+				-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+				-DSPHINX_WARNINGS_AS_ERRORS=OFF
+			)
+		fi
+
+		mycmakeargs+=(
+			-DLLVM_BUILD_DOCS=${build_docs}
+			-DLLVM_ENABLE_OCAMLDOC=OFF
+			-DLLVM_ENABLE_SPHINX=${build_docs}
+			-DLLVM_ENABLE_DOXYGEN=OFF
+			-DLLVM_INSTALL_UTILS=ON
+		)
+		use binutils-plugin && mycmakeargs+=(
+			-DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+		)
+	fi
+
+	# On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+	# libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+	# using libtinfo (actually, libncurses.dylib) from system instead of prefix
+	use kernel_Darwin && mycmakeargs+=(
+		-DTerminfo_LIBRARIES=-lncurses
+	)
+
+	# workaround BMI bug in gcc-7 (fixed in 7.4)
+	# https://bugs.gentoo.org/649880
+	# apply only to x86, https://bugs.gentoo.org/650506
+	if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+			[[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+	then
+		local CFLAGS="${CFLAGS} -mno-bmi"
+		local CXXFLAGS="${CXXFLAGS} -mno-bmi"
+	fi
+
+	# LLVM can have very high memory consumption while linking,
+	# exhausting the limit on 32-bit linker executable
+	use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+	cmake_src_configure
+
+	grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
+			CMakeCache.txt ||
+		die "Incorrect version, did you update _LLVM_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/llvmgold/Manifest b/sys-devel/llvmgold/Manifest
index f265ef944171..ba6d0ce942ee 100644
--- a/sys-devel/llvmgold/Manifest
+++ b/sys-devel/llvmgold/Manifest
@@ -2,4 +2,5 @@ EBUILD llvmgold-15.ebuild 576 BLAKE2B c9493f322fa0e387411df160c28078a514510e684f
 EBUILD llvmgold-16.ebuild 583 BLAKE2B b4c4b79a88e671db744f646cf645788aadbf1a76c86ce3f2d76bb850a5cedb21b0ed92feb1f647188176a6d218adf0b3d0f21da16390188cf91ade0a495fb32e SHA512 39d956efdd7685b0b99e274badd0a42b2a088eb9d8d065670743c93cb24ad617bc1e7f6e92112e67f00393c1d68fe1397b36222546b24ecc58be2eb11d47bd21
 EBUILD llvmgold-17.ebuild 586 BLAKE2B a3de135bc79ae94d8bef64f9cc6514c21ad4d4503e3e19b0a8d52baacb376221b36bf27becd6fe273686b7866c618fdba402f5c51eb9e72c75c25b66c147af76 SHA512 5820c9481a68639c94031902e44696b3c990de33ef99061e5e7f80348d9ff1a9a01c133eb9d11c36f4eb74e508fbf994e7bc38fab7a8bf51ab6e13a23716edc9
 EBUILD llvmgold-18.ebuild 508 BLAKE2B 87a9e84527af4fb4e1dae9a525dbe70da793aefb9ade858519d20722009787189964ac8a849956824b4075eacebe94bb893ba49ea4efbe49b103bdd02be8a961 SHA512 4330524a53d4cf36538fd15baa5fe683874da27b3c96b081c2fc8e6fe73d217391ddc8daecf30b670cf33c17882fba178974c95fb50641524a4c2ff6d58d9741
+EBUILD llvmgold-19.ebuild 508 BLAKE2B 7d5b7e88512381f3a9a7e3ef019b706f6ba00d71e1a69e4f83face525864611602dad8e8c4765b25553647fe02223fcecec91cb6282e16b8d375473cb59a25ef SHA512 f51985a55f4c3b9909c3cdce098bac4f7ff6a29cbf09fd55d1684a00cb7733af904140e9cc2196bea60df1c8f3bfee5579d2f170e902eefeb7380bd9f6a0c955
 MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/llvmgold/llvmgold-19.ebuild b/sys-devel/llvmgold/llvmgold-19.ebuild
new file mode 100644
index 000000000000..cc4a41d311fc
--- /dev/null
+++ b/sys-devel/llvmgold/llvmgold-19.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="LLVMgold plugin symlink for autoloading"
+HOMEPAGE="https://llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="0"
+
+RDEPEND="
+	sys-devel/llvm:${PV}[binutils-plugin]
+	!sys-devel/llvm:0
+"
+
+src_install() {
+	dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
+	dosym "../../../../lib/llvm/${PV}/$(get_libdir)/LLVMgold.so" \
+		"/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
+}
-- 
cgit v1.2.3