[gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/, sys-libs/compiler-rt/files/9999/, ...

2021-01-28 Thread Michał Górny
commit: caad5bb444065318e0df4baa0758ef19e80991c2
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Jan 29 01:33:03 2021 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan 29 01:33:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caad5bb4

sys-libs/compiler-rt: Strip the prefix patch for 12+

The prefix patch no longer applies to 12.0.0_rc1 and newer.  Replace
it with an empty file to fix the build while making it easy to readd
a new patch.

Signed-off-by: Michał Górny  gentoo.org>

 sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild |  2 +-
 sys-libs/compiler-rt/compiler-rt-11.0.1.ebuild |  2 +-
 sys-libs/compiler-rt/compiler-rt-11.1.0_rc1.ebuild |  2 +-
 sys-libs/compiler-rt/compiler-rt-11.1.0_rc2.ebuild |  2 +-
 .../compiler-rt-prefix-paths.patch |  0
 .../files//compiler-rt-prefix-paths.patch  | 79 --
 6 files changed, 4 insertions(+), 83 deletions(-)

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 88873e2d937..03faac95341 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
@@ -30,7 +30,7 @@ BDEPEND="
${PYTHON_DEPS}"
 
 PATCHES=(
-   "${FILESDIR}//${PN}-prefix-paths.patch"
+   "${FILESDIR}/11.1.0/${PN}-prefix-paths.patch"
 )
 
 python_check_deps() {

diff --git a/sys-libs/compiler-rt/compiler-rt-11.0.1.ebuild 
b/sys-libs/compiler-rt/compiler-rt-11.0.1.ebuild
index 01907446d0f..a24b2a25ff8 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.1.ebuild
@@ -32,7 +32,7 @@ LLVM_COMPONENTS=( compiler-rt )
 llvm.org_set_globals
 
 PATCHES=(
-   "${FILESDIR}//${PN}-prefix-paths.patch"
+   "${FILESDIR}/11.1.0/${PN}-prefix-paths.patch"
 )
 
 python_check_deps() {

diff --git a/sys-libs/compiler-rt/compiler-rt-11.1.0_rc1.ebuild 
b/sys-libs/compiler-rt/compiler-rt-11.1.0_rc1.ebuild
index 07412646ab2..fb43d386c33 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.1.0_rc1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.1.0_rc1.ebuild
@@ -32,7 +32,7 @@ LLVM_COMPONENTS=( compiler-rt )
 llvm.org_set_globals
 
 PATCHES=(
-   "${FILESDIR}//${PN}-prefix-paths.patch"
+   "${FILESDIR}/11.1.0/${PN}-prefix-paths.patch"
 )
 
 python_check_deps() {

diff --git a/sys-libs/compiler-rt/compiler-rt-11.1.0_rc2.ebuild 
b/sys-libs/compiler-rt/compiler-rt-11.1.0_rc2.ebuild
index 07412646ab2..fb43d386c33 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.1.0_rc2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.1.0_rc2.ebuild
@@ -32,7 +32,7 @@ LLVM_COMPONENTS=( compiler-rt )
 llvm.org_set_globals
 
 PATCHES=(
-   "${FILESDIR}//${PN}-prefix-paths.patch"
+   "${FILESDIR}/11.1.0/${PN}-prefix-paths.patch"
 )
 
 python_check_deps() {

diff --git a/sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch 
b/sys-libs/compiler-rt/files/11.1.0/compiler-rt-prefix-paths.patch
similarity index 100%
copy from sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch
copy to sys-libs/compiler-rt/files/11.1.0/compiler-rt-prefix-paths.patch

diff --git a/sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch 
b/sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch
index c27e3c44f68..e69de29bb2d 100644
--- a/sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch
+++ b/sys-libs/compiler-rt/files//compiler-rt-prefix-paths.patch
@@ -1,79 +0,0 @@
 a/compiler-rt/cmake/config-ix.cmake2020-10-07 05:10:48.0 
-0500
-+++ b/compiler-rt/cmake/config-ix.cmake2020-12-13 16:17:43.0 
-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.0 
-0600
-+++ b/compiler-rt/cmake/base-config-ix.cmake   2020-12-13 16:18:59.0 
-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()
--  

[gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/, sys-libs/compiler-rt/files/9999/

2020-12-27 Thread Fabian Groffen
commit: 3abc427bfdc80cc1f640f70bf3ed18d07a57941a
Author: Jacob Floyd  gmail  com>
AuthorDate: Sun Dec 20 22:01:50 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Dec 27 09:49:32 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3abc427b

sys-libs/compiler-rt: Fix Darwin prefix paths

Gentoo Prefix does not follow standard Apple practice of using --sysroot
or --isysroot on everything because we have to account for two "root"s.
1) EPREFIX is "root"
2) EPREFIX/MacOSX.sdk is also sysroot as it provides system headers.

So, adjust sys-libs/compiler-rt to prevent them from adding the sysroot
flags on Darwin.

Also adjust some CMAKE args to ensure it is using EPREFIX/MacOSX.sdk
instead of looking things up with xcrun.

Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd  gmail.com>
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild | 14 +++-
 .../compiler-rt/compiler-rt-11.0.1..ebuild | 14 +++-
 sys-libs/compiler-rt/compiler-rt-11.0.1_rc1.ebuild | 14 +++-
 sys-libs/compiler-rt/compiler-rt-11.0.1_rc2.ebuild | 14 +++-
 .../compiler-rt/compiler-rt-12.0.0..ebuild | 14 +++-
 .../files//compiler-rt-prefix-paths.patch  | 79 ++
 6 files changed, 139 insertions(+), 10 deletions(-)

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 ae00599b164..e7c52642928 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.0.ebuild
@@ -29,6 +29,10 @@ BDEPEND="
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT} )
${PYTHON_DEPS}"
 
+PATCHES=(
+   "${FILESDIR}//${PN}-prefix-paths.patch"
+)
+
 python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -83,8 +87,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..ebuild 
b/sys-libs/compiler-rt/compiler-rt-11.0.1..ebuild
index 38a2cbc81fb..e93bdde90a8 100644
--- a/sys-libs/compiler-rt/compiler-rt-11.0.1..ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-11.0.1..ebuild
@@ -31,6 +31,10 @@ BDEPEND="
 LLVM_COMPONENTS=( compiler-rt )
 llvm.org_set_globals
 
+PATCHES=(
+   "${FILESDIR}//${PN}-prefix-paths.patch"
+)
+
 python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -85,8 +89,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 38a2cbc81fb..e93bdde90a8 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
@@ -31,6 +31,10 @@ BDEPEND="
 LLVM_COMPONENTS=( compiler-rt )
 llvm.org_set_globals
 
+PATCHES=(
+   "${FILESDIR}//${PN}-prefix-paths.patch"
+)
+
 python_check_deps() {
use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -85,8 +89,14 @@ src_configure() {
 
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then