summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest11
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild23
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.1.9999.ebuild23
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild23
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild23
-rw-r--r--sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild23
-rw-r--r--sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch79
7 files changed, 180 insertions, 25 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 017e6fa5d30d..0a36b8c73771 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,13 +1,14 @@
+AUX 9999/compiler-rt-prefix-paths.patch 3794 BLAKE2B f6e8992658e665bd9cc13bae00c9d7757d01438a73ffd8809be67bbcd1c6d3956e9965890fd84e573c9ef6cc74a7fc7a349e2e5eec21387150c8ef2ae2bf055d SHA512 23a05ce3805678e855be2a4678102e72fe81cb86208357df0dc95b85c7268fe95025603908dd114b27742f39432c4c860859904b287cf52f5a5b337b131bcb9e
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2
DIST llvmorg-11.0.1-rc1.tar.gz 122777435 BLAKE2B 23b520d33cf4b641027ee52bb10c6171d60356c9167d5b94012929e6e547c526cda1a6177c295ed19592dfb83b020f63b2cef4cabc70ce9a2a8e098fe654a3cd SHA512 605c7bbff1610f335be8ea4f1204df797fed21185a54c77565f6ff2d00794d1967e9c5fab7c87633e242f2f999bdffb76da83f756d261c1ca476114599409ae1
DIST llvmorg-11.0.1-rc2.tar.gz 122793330 BLAKE2B 5d42f7bd7ba253ac3ca08cf9901c79db5b51b86f0f66c8e63f4f9808ca5fb72cacccfad098b4f6701a34b0d77bdd66fe3839a3962a251eae53776240a2e13b06 SHA512 acda5a5be38cc8aae730c34cd1bb8f29a82e2ed3dd9734ca293ff092d5b30c8c255ab3054245b8f6ed541d5dbf8bc674b744bb2f81788db8826f69a204dda0c3
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
EBUILD compiler-rt-10.0.1.ebuild 2770 BLAKE2B 68ee449ac28f519a2cc0ec03b73aac5c770064f0350b5d1803a861386ac6b295947da9362b26dd6cffd90985f429beaf382ed949fc56da32184c9dab3aaff843 SHA512 2aea27ca4b4ccdc9c295b82c5e19558653945f87aaca03e50158a584044f8b0694f99ceb6c27e9fc5eb4e89cbc7851a4953e5a0a1494a49c46da7079962e3b14
-EBUILD compiler-rt-11.0.0.ebuild 2836 BLAKE2B 675ad6959c74f5d91c85129bb7ec8b3e93445deb4db3b7a4b1e8ce0e93b87081caa96dab4bb06ac67f9a0af318adcddfb17141562e4dde074d942ddaf3e586b1 SHA512 e557ba5f6511817caf5e6bea44835c28fbe6720e62d2ebe3fb22f758678f4054598e0770bdbfc2b3714dc8153fa350b07fba8cc8f42fb98be6cd849a1ea1de6e
-EBUILD compiler-rt-11.0.1.9999.ebuild 2760 BLAKE2B 917e1260aafc22fa4193d4881e52a4c686d5a8673f6958261986b02f3987f159206843e3b62221e2a2af53192f9ef905c9edcf7311befbadb55c9a4b883525f0 SHA512 91498187bf9629e9f58e4b090cfb237c548c4f08b7a284d3a5df29d6803efd9aeb352a4ef6c6ddb23b9bac2f22dd0a06c75ac7039addd1ee920d08fc3a84cfa3
-EBUILD compiler-rt-11.0.1_rc1.ebuild 2760 BLAKE2B 917e1260aafc22fa4193d4881e52a4c686d5a8673f6958261986b02f3987f159206843e3b62221e2a2af53192f9ef905c9edcf7311befbadb55c9a4b883525f0 SHA512 91498187bf9629e9f58e4b090cfb237c548c4f08b7a284d3a5df29d6803efd9aeb352a4ef6c6ddb23b9bac2f22dd0a06c75ac7039addd1ee920d08fc3a84cfa3
-EBUILD compiler-rt-11.0.1_rc2.ebuild 2760 BLAKE2B 917e1260aafc22fa4193d4881e52a4c686d5a8673f6958261986b02f3987f159206843e3b62221e2a2af53192f9ef905c9edcf7311befbadb55c9a4b883525f0 SHA512 91498187bf9629e9f58e4b090cfb237c548c4f08b7a284d3a5df29d6803efd9aeb352a4ef6c6ddb23b9bac2f22dd0a06c75ac7039addd1ee920d08fc3a84cfa3
-EBUILD compiler-rt-12.0.0.9999.ebuild 2760 BLAKE2B 917e1260aafc22fa4193d4881e52a4c686d5a8673f6958261986b02f3987f159206843e3b62221e2a2af53192f9ef905c9edcf7311befbadb55c9a4b883525f0 SHA512 91498187bf9629e9f58e4b090cfb237c548c4f08b7a284d3a5df29d6803efd9aeb352a4ef6c6ddb23b9bac2f22dd0a06c75ac7039addd1ee920d08fc3a84cfa3
+EBUILD compiler-rt-11.0.0.ebuild 3550 BLAKE2B 22caa09dc7940915c946b5350c3cb4b667f5ddcaf780aab6b7c431c469607e615262db3c384bb13df8700caa0f8baaa5a826194e4c0f98af933a7861ce5ab50c SHA512 06b3db5823e1691aaf2db458ed4ab48fdcdedbc78ab5918324966dab6ec8a51a10bf92c88f4c08ac29931f89f1091615f45c8334aa32bf2cc3d5aa995291866c
+EBUILD compiler-rt-11.0.1.9999.ebuild 3474 BLAKE2B d82405d0c344cd1eb33d45cb8377519111166f67328b39e654ea3ba10d5ee2d96c3bbfac370e58f3afef3b83d046490b5a8c4edbc7080485cf97ea72c9a00ca2 SHA512 270be5b046b5892d6e2d795505e6b869af9f5afc91b05785708377828cf0ab624ce22c01da775bf43c287c647d22732f7638b3455cd55716bd203833cfdd113a
+EBUILD compiler-rt-11.0.1_rc1.ebuild 3474 BLAKE2B d82405d0c344cd1eb33d45cb8377519111166f67328b39e654ea3ba10d5ee2d96c3bbfac370e58f3afef3b83d046490b5a8c4edbc7080485cf97ea72c9a00ca2 SHA512 270be5b046b5892d6e2d795505e6b869af9f5afc91b05785708377828cf0ab624ce22c01da775bf43c287c647d22732f7638b3455cd55716bd203833cfdd113a
+EBUILD compiler-rt-11.0.1_rc2.ebuild 3474 BLAKE2B d82405d0c344cd1eb33d45cb8377519111166f67328b39e654ea3ba10d5ee2d96c3bbfac370e58f3afef3b83d046490b5a8c4edbc7080485cf97ea72c9a00ca2 SHA512 270be5b046b5892d6e2d795505e6b869af9f5afc91b05785708377828cf0ab624ce22c01da775bf43c287c647d22732f7638b3455cd55716bd203833cfdd113a
+EBUILD compiler-rt-12.0.0.9999.ebuild 3474 BLAKE2B d82405d0c344cd1eb33d45cb8377519111166f67328b39e654ea3ba10d5ee2d96c3bbfac370e58f3afef3b83d046490b5a8c4edbc7080485cf97ea72c9a00ca2 SHA512 270be5b046b5892d6e2d795505e6b869af9f5afc91b05785708377828cf0ab624ce22c01da775bf43c287c647d22732f7638b3455cd55716bd203833cfdd113a
EBUILD compiler-rt-9.0.1.ebuild 2916 BLAKE2B 4725960cfa3ff697f1b17d709c7a9f463aa8aaf2da33592b6c5d129fc4acb51181a4712c1afce01c0b97e441685cc5932524f02cbacb339f5c7c315813e4ec72 SHA512 2b038aeb653043691f046ae2930cac58ada17ece1f7da2699e1e9ce4dbe1903f21366ca82cb3d08605875f0b24fc0a9707bbde2ea6a039c080f0d54268071f0f
MISC metadata.xml 333 BLAKE2B 24e417cb7b8ab7730b18a3e1e5e29d008042e4fd53cf1ba3cc9d18719160b0410854ddfae52315c690138e61fb0196015968fa09b98af6470cd8bdecc09205ef SHA512 97daa7452a696b7297c47f5f637a33425f82b51426060a75b3de6bc812f9ddcd3c70ae068bc3e88ce937ab1eb10d59b0ab48a2d2c0397a112b8b6a754e333bdc
diff --git a/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
index ae00599b1645..45cc6aa7b63f 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -29,6 +29,10 @@ BDEPEND="
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT} )
${PYTHON_DEPS}"
+PATCHES=(
+ "${FILESDIR}/9999/${PN}-prefix-paths.patch"
+)
+
python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -42,7 +46,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -83,8 +92,14 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-11.0.1.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.1.9999.ebuild
index 38a2cbc81fbb..07412646ab2a 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.1.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.1.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -31,6 +31,10 @@ BDEPEND="
LLVM_COMPONENTS=( compiler-rt )
llvm.org_set_globals
+PATCHES=(
+ "${FILESDIR}/9999/${PN}-prefix-paths.patch"
+)
+
python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -44,7 +48,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -85,8 +94,14 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild
index 38a2cbc81fbb..07412646ab2a 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -31,6 +31,10 @@ BDEPEND="
LLVM_COMPONENTS=( compiler-rt )
llvm.org_set_globals
+PATCHES=(
+ "${FILESDIR}/9999/${PN}-prefix-paths.patch"
+)
+
python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -44,7 +48,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -85,8 +94,14 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild
index 38a2cbc81fbb..07412646ab2a 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -31,6 +31,10 @@ BDEPEND="
LLVM_COMPONENTS=( compiler-rt )
llvm.org_set_globals
+PATCHES=(
+ "${FILESDIR}/9999/${PN}-prefix-paths.patch"
+)
+
python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -44,7 +48,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -85,8 +94,14 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild
index 38a2cbc81fbb..07412646ab2a 100644
--- a/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -31,6 +31,10 @@ BDEPEND="
LLVM_COMPONENTS=( compiler-rt )
llvm.org_set_globals
+PATCHES=(
+ "${FILESDIR}/9999/${PN}-prefix-paths.patch"
+)
+
python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -44,7 +48,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -85,8 +94,14 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
)
fi
diff --git a/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch b/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch
new file mode 100644
index 000000000000..c27e3c44f684
--- /dev/null
+++ b/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch
@@ -0,0 +1,79 @@
+--- a/compiler-rt/cmake/config-ix.cmake 2020-10-07 05:10:48.000000000 -0500
++++ b/compiler-rt/cmake/config-ix.cmake 2020-12-13 16:17:43.000000000 -0600
+@@ -424,10 +424,7 @@
+ ${DARWIN_COMMON_LINK_FLAGS}
+ ${DARWIN_osx_MIN_VER_FLAG}=${SANITIZER_MIN_OSX_VERSION})
+
+- if(DARWIN_osx_SYSROOT)
+- list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT})
+- list(APPEND DARWIN_osx_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT})
+- endif()
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
+
+ # Figure out which arches to use for each OS
+ darwin_get_toolchain_supported_archs(toolchain_arches)
+--- a/compiler-rt/cmake/base-config-ix.cmake 2020-12-13 16:17:13.000000000 -0600
++++ b/compiler-rt/cmake/base-config-ix.cmake 2020-12-13 16:18:59.000000000 -0600
+@@ -102,23 +102,8 @@
+ endif()
+
+ if(APPLE)
+- # On Darwin if /usr/include/c++ doesn't exist, the user probably has Xcode but
+- # not the command line tools (or is using macOS 10.14 or newer). If this is
+- # the case, we need to find the OS X sysroot to pass to clang.
+- if(NOT EXISTS /usr/include/c++)
+- execute_process(COMMAND xcrun -sdk macosx --show-sdk-path
+- OUTPUT_VARIABLE OSX_SYSROOT
+- ERROR_QUIET
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+- if (NOT OSX_SYSROOT OR NOT EXISTS ${OSX_SYSROOT})
+- message(WARNING "Detected OSX_SYSROOT ${OSX_SYSROOT} does not exist")
+- else()
+- message(STATUS "Found OSX_SYSROOT: ${OSX_SYSROOT}")
+- set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}")
+- endif()
+- else()
+- set(OSX_SYSROOT_FLAG "")
+- endif()
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
++ set(OSX_SYSROOT_FLAG "")
+
+ option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On)
+ option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off)
+--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-10-07 05:10:48.000000000 -0500
++++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-12-13 16:21:32.000000000 -0600
+@@ -273,7 +273,8 @@
+ ${ARGN})
+ set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}")
+ add_library(${libname} STATIC ${LIB_SOURCES})
+- if(DARWIN_${LIB_OS}_SYSROOT)
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
++ if(DARWIN_${LIB_OS}_SYSROOT AND NOT "${LIB_OS}" STREQUAL "osx")
+ set(sysroot_flag -isysroot ${DARWIN_${LIB_OS}_SYSROOT})
+ endif()
+
+--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake 2020-10-07 05:10:48.000000000 -0500
++++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake 2020-12-13 18:12:27.000000000 -0600
+@@ -277,9 +277,10 @@
+ if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
+ list(APPEND extra_cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}")
+ endif()
++ # Do not add --sysroot flag on Gentoo Prefix (search paths handled by cmake)
+- if(CMAKE_SYSROOT)
++ if(CMAKE_SYSROOT AND NOT APPLE)
+ list(APPEND extra_cflags_${libname} "--sysroot=${CMAKE_SYSROOT}")
+ endif()
+ string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}")
+ string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
+ ${CMAKE_C_COMPILE_OBJECT})
+--- a/compiler-rt/lib/tsan/CMakeLists.txt 2020-12-13 19:42:02.000000000 -0600
++++ b/compiler-rt/lib/tsan/CMakeLists.txt 2020-12-13 19:42:38.000000000 -0600
+@@ -244,6 +244,7 @@
+ # and Clang's versions. As a workaround do not use --sysroot=. on FreeBSD/NetBSD
+ # until this is addressed.
+ if(COMPILER_RT_HAS_SYSROOT_FLAG AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
++ AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin"
+ AND NOT CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+ file(GLOB _tsan_generic_sources rtl/tsan*)
+ file(GLOB _tsan_platform_sources rtl/tsan*posix* rtl/tsan*mac*
+