sys-libs/compiler-rt: prefer compiler from prefix on Darwin
authorFabian Groffen <grobian@gentoo.org>
Tue, 2 Jan 2018 13:20:04 +0000 (14:20 +0100)
committerFabian Groffen <grobian@gentoo.org>
Tue, 2 Jan 2018 13:53:55 +0000 (14:53 +0100)
Patch by Michael Weiser

Bug: https://bugs.gentoo.org/642644
Package-Manager: Portage-2.3.13, Repoman-2.3.3

sys-libs/compiler-rt/compiler-rt-5.0.1.ebuild
sys-libs/compiler-rt/compiler-rt-9999.ebuild

index 9b135a41b328bc75cb1503ba4ff5c1a23cf84a74..d60c84ee2d6748d319abae81b207639b4e71d66c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -77,6 +77,13 @@ src_configure() {
                -DCOMPILER_RT_BUILD_XRAY=OFF
        )
 
+       if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+               mycmakeargs+=(
+                       # disable use of SDK for the system itself
+                       -DDARWIN_macosx_CACHED_SYSROOT=/
+               )
+       fi
+
        if use test; then
                mycmakeargs+=(
                        -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
index 4dd44182ae9b712271e81f7cbde30f15622bd1f4..7c6eb6db761e23329329bb46a3e9196303e47e27 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -81,6 +81,13 @@ src_configure() {
                -DCOMPILER_RT_BUILD_XRAY=OFF
        )
 
+       if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+               mycmakeargs+=(
+                       # disable use of SDK for the system itself
+                       -DDARWIN_macosx_CACHED_SYSROOT=/
+               )
+       fi
+
        if use test; then
                mycmakeargs+=(
                        -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"