commit 7a6c3b9de73b7daf1ac292e023a6c95ffc5afeea
Author: Alexey Sokolov <sokolov@google.com>
Date:   Sat Aug 26 17:38:47 2023 +0100

    fixes

diff --git a/profiles/base/use.mask b/profiles/base/use.mask
index dad9b1707..4fe2a198e 100644
--- a/profiles/base/use.mask
+++ b/profiles/base/use.mask
@@ -4,6 +4,10 @@
 # This file is only for generic masks. For arch-specific masks (i.e.
 # mask everywhere, unmask on arch/*) use arch/base.
 
+# Alexey Sokolov <alexey+gentoo@asokolov.org> (2023-08-07)
+# Only needed during bootstrap of prefix
+bootstrap-prefix
+
 # Hans de Graaff <graaff@gentoo.org> (2023-04-10)
 # Ruby 2.7 is masked for removal.
 ruby_targets_ruby27
diff --git a/profiles/features/llvm/make.defaults b/profiles/features/llvm/make.defaults
index 54254b71b..b21737ab8 100644
--- a/profiles/features/llvm/make.defaults
+++ b/profiles/features/llvm/make.defaults
@@ -11,7 +11,7 @@ CXX="clang++"
 LD="ld.lld"
 
 # linker flags
-LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
+#LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
 
 ## hardening flags
 #SOME_HARDENING_CFLAGS="-fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
diff --git a/profiles/features/prefix/use.mask b/profiles/features/prefix/use.mask
index 482ce57f0..1aaa46b7a 100644
--- a/profiles/features/prefix/use.mask
+++ b/profiles/features/prefix/use.mask
@@ -16,3 +16,6 @@ pam
 # Andreas Sturmlechner <asturm@gentoo.org> (2020-06-06)
 # sci-libs/mkl does not have prefix keywords
 mkl
+
+# Allow bootstrapping the prefix
+-bootstrap-prefix
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/eapi b/profiles/prefix/darwin/macos/13.0/arm64/clang/eapi
new file mode 100644
index 000000000..7ed6ff82d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/make.defaults b/profiles/prefix/darwin/macos/13.0/arm64/clang/make.defaults
new file mode 100644
index 000000000..9807a87ed
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/make.defaults
@@ -0,0 +1,4 @@
+LD=ld64.lld
+#CFLAGS="${CFLAGS} -Wl,-search_paths_first -L${EPREFIX}/usr/lib -Wl,-rpath,${EPREFIX}/usr/lib"
+#CXXFLAGS="${CXXFLAGS} -Wl,-search_paths_first -L${EPREFIX}/usr/lib -Wl,-rpath,${EPREFIX}/usr/lib"
+#LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L${EPREFIX}/usr/lib -Wl,-rpath,${EPREFIX}/usr/lib"
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/package.mask b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.mask
new file mode 100644
index 000000000..b043b22d6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.mask
@@ -0,0 +1,2 @@
+# If installed, causes some miscompilation somewhere, and cmake crashes during bootstrap
+sys-devel/binutils-apple
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/package.unmask b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.unmask
new file mode 100644
index 000000000..d92abec60
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.unmask
@@ -0,0 +1,4 @@
+# For Darwin bootstraps
+sys-devel/native-cctools
+# For Darwin bootstraps
+sys-devel/native-cctools
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/package.use b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.use
new file mode 100644
index 000000000..3b74ba66f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/package.use
@@ -0,0 +1,30 @@
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/packages b/profiles/prefix/darwin/macos/13.0/arm64/clang/packages
new file mode 100644
index 000000000..0b46fa6d3
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/packages
@@ -0,0 +1 @@
+-*sys-devel/binutils-apple
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/clang/parent b/profiles/prefix/darwin/macos/13.0/arm64/clang/parent
new file mode 100644
index 000000000..845cedb73
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/clang/parent
@@ -0,0 +1,2 @@
+..
+../../../../../../features/llvm
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/package.unmask b/profiles/prefix/darwin/macos/13.0/arm64/package.unmask
new file mode 100644
index 000000000..361ed2e7a
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/package.unmask
@@ -0,0 +1,10 @@
+# For Darwin bootstraps
+sys-devel/native-cctools
+# For Darwin bootstraps
+sys-devel/native-cctools
+# For Darwin bootstraps
+sys-devel/native-cctools
+# For Darwin bootstraps
+sys-devel/native-cctools
+# For Darwin bootstraps
+sys-devel/native-cctools
diff --git a/profiles/prefix/darwin/macos/13.0/arm64/package.use b/profiles/prefix/darwin/macos/13.0/arm64/package.use
new file mode 100644
index 000000000..648c3941b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/13.0/arm64/package.use
@@ -0,0 +1,75 @@
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
+# Disable bootstrapping libcxx* with libunwind
+sys-libs/libcxxabi -libunwind
+sys-libs/libcxx -libunwind
+# Most binary Linux distributions seem to fancy toolchains that
+# do not do c++ support (need to install a separate package).
+sys-libs/ncurses -cxx
+sys-devel/binutils -cxx
+# gmp has cxx flag enabled by default. When dealing with a host
+# compiler without cxx support this causes configure failure.
+# In addition, The stage2 g++ is only for compiling stage3 compiler,
+# because the host libstdc++.so runtime may be not compatible and
+# stage2 libstdc++.so might conflict with that of stage3.  The
+# trade-off is just not to use cxx.
+dev-libs/gmp -cxx
+sys-devel/binutils -gold
diff --git a/profiles/use.desc b/profiles/use.desc
index bca8dffc4..231e71bd4 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -29,6 +29,7 @@ big-endian - Big-endian toolchain support
 bindist - Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
 blas - Add support for the virtual/blas numerical library
 bluetooth - Enable Bluetooth Support
+bootstrap-prefix - !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for bootstrapping Gentoo Prefix
 branding - Enable Gentoo specific branding
 build - !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
 bzip2 - Use the bzlib compression library
diff --git a/sys-apps/debianutils/debianutils-4.11.2.ebuild b/sys-apps/debianutils/debianutils-4.11.2.ebuild
index 4402e3b85..512be05f5 100644
--- a/sys-apps/debianutils/debianutils-4.11.2.ebuild
+++ b/sys-apps/debianutils/debianutils-4.11.2.ebuild
@@ -33,6 +33,7 @@ PATCHES=(
 src_prepare() {
 	default
 	eautoreconf
+	sed -i -e 's/int cleanup_tmpfile/void cleanup_tmpfile/' run-parts.c || die
 }
 
 src_configure() {
diff --git a/sys-apps/portage/files/portage-3.0.49-prefix-stage2.patch b/sys-apps/portage/files/portage-3.0.49-prefix-stage2.patch
new file mode 100644
index 000000000..2ca9d74ea
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.49-prefix-stage2.patch
@@ -0,0 +1,16 @@
+During first part of stage3, some programs are installed from EPREFIX/tmp to EPREFIX which break this qa check
+The check I'm adding is heavy-handed, but I don't know how to fix this better
+
+TODO: check whether portage-3.0.30-prefix-stack.patch fixes the same issue
+
+--- a/bin/install-qa-check.d/05prefix
++++ b/bin/install-qa-check.d/05prefix
+@@ -95,6 +95,8 @@ install_qa_check_prefix() {
+ 				# reasons
+ 				sed -i -e '1s:^#! \?'"${line[0]}"':#!'"${EPREFIX}"${line[0]}':' "${rf}"
+ 				continue
++			elif [[ -n "${PORTAGE_OVERRIDE_EPREFIX}"  ]] ; then
++				continue
+ 			else
+ 				# this is definitely wrong: script in ${PATH} and invalid shebang
+ 				echo "${fn#${D}}:${line[0]} (script ${fn##*/} installed in PATH but interpreter ${line[0]} not found)" \
diff --git a/sys-apps/portage/portage-3.0.49.ebuild b/sys-apps/portage/portage-3.0.49.ebuild
index 148d1f425..a1178dd66 100644
--- a/sys-apps/portage/portage-3.0.49.ebuild
+++ b/sys-apps/portage/portage-3.0.49.ebuild
@@ -92,6 +92,7 @@ python_prepare_all() {
 		# disabled in 3.0.24: does not apply, while useful, rarely used if ever
 		# "${FILESDIR}"/${PN}-3.0.30-ebuildshell.patch # 155161
 		"${FILESDIR}"/${PN}-3.0.30-interrevisions.patch # 832062
+		"${FILESDIR}"/${PN}-3.0.49-prefix-stage2.patch
 	)
 
 	distutils-r1_python_prepare_all
diff --git a/sys-devel/clang-common/clang-common-16.0.6-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.6-r1.ebuild
index 358dca01c..4454ca55d 100644
--- a/sys-devel/clang-common/clang-common-16.0.6-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.6-r1.ebuild
@@ -10,10 +10,11 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="
 	default-compiler-rt default-libcxx default-lld llvm-libunwind
 	hardened stricter
+	bootstrap-prefix
 "
 
 PDEPEND="
@@ -67,6 +68,7 @@ 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.
@@ -175,6 +177,25 @@ src_install() {
 			@gentoo-common.cfg
 		EOF
 	done
+
+	if use kernel_Darwin; then
+		cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+			# Gentoo Prefix on Darwin
+			-Wl,-search_paths_first
+			-Wl,-rpath,${EPREFIX}/usr/lib
+			-L ${EPREFIX}/usr/lib
+			-isystem ${EPREFIX}/usr/include
+			-isysroot ${EPREFIX}/MacOSX.sdk
+		EOF
+		if use bootstrap-prefix ; then
+			cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+				-Wl,-rpath,${EPREFIX}/../usr/lib
+			EOF
+		fi
+		cat >> "${ED}/etc/clang/clang++.cfg" <<-EOF || die
+			-lc++abi
+		EOF
+	fi
 }
 
 pkg_preinst() {
diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
index 6483c7c0c..8c1458899 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
@@ -10,7 +10,7 @@ HOMEPAGE="https://clang.llvm.org/"
 
 LICENSE="metapackage"
 SLOT="${PV%%.*}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="+compiler-rt libcxx openmp +sanitize"
 REQUIRED_USE="sanitize? ( compiler-rt )"
 
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
index c4e73ad72..8a6a4b270 100644
--- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
@@ -12,7 +12,7 @@ S=${WORKDIR}
 
 LICENSE="public-domain"
 SLOT="${PV}"
-KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
+KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos"
 IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
 
 # Blocker for bug #872416
diff --git a/sys-devel/clang/clang-16.0.6.ebuild b/sys-devel/clang/clang-16.0.6.ebuild
index 2e8a27ba4..20370951c 100644
--- a/sys-devel/clang/clang-16.0.6.ebuild
+++ b/sys-devel/clang/clang-16.0.6.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
 SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos"
 IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 RESTRICT="!test? ( test )"
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
index 4b849cdd1..cecf6cc8f 100644
--- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
@@ -12,7 +12,7 @@ S=${WORKDIR}
 
 LICENSE="public-domain"
 SLOT="${PV}"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~riscv ~x86 ~arm64-macos"
 IUSE="multilib-symlinks +native-symlinks"
 
 RDEPEND="
diff --git a/sys-devel/lld/lld-16.0.6.ebuild b/sys-devel/lld/lld-16.0.6.ebuild
index 69d4c5905..ec21f13f8 100644
--- a/sys-devel/lld/lld-16.0.6.ebuild
+++ b/sys-devel/lld/lld-16.0.6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~arm64-macos"
 IUSE="debug test zstd"
 RESTRICT="!test? ( test )"
 
diff --git a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
index 4dd4fe395..fe40f75db 100644
--- a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
+++ b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
@@ -10,7 +10,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 
 RDEPEND="
 	!sys-devel/llvm:0
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
index bd3ab9fa4..531b47105 100644
--- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
@@ -12,7 +12,7 @@ S=${WORKDIR}
 
 LICENSE="public-domain"
 SLOT="${PV}"
-KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="multilib-symlinks +native-symlinks"
 
 RDEPEND="
diff --git a/sys-devel/llvm/llvm-16.0.6.ebuild b/sys-devel/llvm/llvm-16.0.6.ebuild
index 96270daf4..2b04ab31b 100644
--- a/sys-devel/llvm/llvm-16.0.6.ebuild
+++ b/sys-devel/llvm/llvm-16.0.6.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
 SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="
 	+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
 	xml z3 zstd
@@ -48,7 +48,6 @@ BDEPEND="
 	sys-devel/gnuconfig
 	kernel_Darwin? (
 		<sys-libs/libcxx-${LLVM_VERSION}.9999
-		>=sys-devel/binutils-apple-5.1
 	)
 	doc? ( $(python_gen_any_dep '
 		dev-python/recommonmark[${PYTHON_USEDEP}]
diff --git a/sys-devel/slibtool/slibtool-0.5.34.ebuild b/sys-devel/slibtool/slibtool-0.5.34.ebuild
index 1d121794e..c77bfd033 100644
--- a/sys-devel/slibtool/slibtool-0.5.34.ebuild
+++ b/sys-devel/slibtool/slibtool-0.5.34.ebuild
@@ -18,7 +18,7 @@ else
 	SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz"
 	SRC_URI+=" verify-sig? ( https://dl.midipix.org/slibtool/${P}.tar.xz.sig )"
 
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
+	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
 
 	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-midipix )"
 fi
diff --git a/sys-libs/binutils-libs/binutils-libs-2.40-r5.ebuild b/sys-libs/binutils-libs/binutils-libs-2.40-r5.ebuild
index 50fa72363..cf39edbdc 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.40-r5.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.40-r5.ebuild
@@ -22,7 +22,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
 LICENSE="|| ( GPL-3 LGPL-3 )"
 SLOT="0/${PV%_p?}"
 IUSE="64-bit-bfd cet multitarget nls static-libs test"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
 RESTRICT="!test? ( test )"
 
 BDEPEND="
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
index 6cc57799a..cb5d13cee 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 RESTRICT="!test? ( test ) !clang? ( test )"
 
diff --git a/sys-libs/libcxx/libcxx-16.0.6.ebuild b/sys-libs/libcxx/libcxx-16.0.6.ebuild
index ca63d0624..11c91d10c 100644
--- a/sys-libs/libcxx/libcxx-16.0.6.ebuild
+++ b/sys-libs/libcxx/libcxx-16.0.6.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxx.llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
 IUSE="+clang +libcxxabi static-libs test"
 REQUIRED_USE="test? ( clang )"
 RESTRICT="!test? ( test )"
diff --git a/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild b/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild
index 6298cb7cb..0c7bc329b 100644
--- a/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxxabi.llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
 IUSE="+clang static-libs test"
 REQUIRED_USE="test? ( clang )"
 RESTRICT="!test? ( test )"
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6.ebuild
index 2d3feb7a3..2989b340a 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
 IUSE="+clang debug static-libs test"
 REQUIRED_USE="test? ( clang )"
 RESTRICT="!test? ( test )"