commit:     159c9d730cdd4ed188ef9aa4ad9a36e322461ce2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 15:03:09 2016 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Sep  4 15:04:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=159c9d73

sys-devel/llvm: add patch for compiler-rt on Darwin/Prefix

Package-Manager: portage-2.2.28

 .../files/3.8.1/compiler-rt/darwin-default-sysroot.patch   | 14 ++++++++++++++
 sys-devel/llvm/llvm-3.8.1.ebuild                           |  2 ++
 sys-devel/llvm/llvm-3.9.0.ebuild                           |  2 ++
 3 files changed, 18 insertions(+)

diff --git 
a/sys-devel/llvm/files/3.8.1/compiler-rt/darwin-default-sysroot.patch 
b/sys-devel/llvm/files/3.8.1/compiler-rt/darwin-default-sysroot.patch
new file mode 100644
index 00000000..9122ce9
--- /dev/null
+++ b/sys-devel/llvm/files/3.8.1/compiler-rt/darwin-default-sysroot.patch
@@ -0,0 +1,14 @@
+find_darwin_sdk_dir: fall back to / for sysroot
+
+--- a/projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
++++ b/projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+@@ -17,6 +17,9 @@
+       ERROR_FILE /dev/null
+     )
+   endif()
++  if("" STREQUAL "${var_internal}")
++        set(var_internal "/")
++  endif()
+   set(${var} ${var_internal} PARENT_SCOPE)
+ endfunction()
+ 

diff --git a/sys-devel/llvm/llvm-3.8.1.ebuild b/sys-devel/llvm/llvm-3.8.1.ebuild
index cc390c5..8734298 100644
--- a/sys-devel/llvm/llvm-3.8.1.ebuild
+++ b/sys-devel/llvm/llvm-3.8.1.ebuild
@@ -185,6 +185,8 @@ src_prepare() {
 
                eapply 
"${FILESDIR}"/3.9.0/clang/darwin_prefix-include-paths.patch
                eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
+               
+               eapply 
"${FILESDIR}"/3.8.1/compiler-rt/darwin-default-sysroot.patch
 
                sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
                        tools/clang/tools/scan-build/bin/scan-build || die

diff --git a/sys-devel/llvm/llvm-3.9.0.ebuild b/sys-devel/llvm/llvm-3.9.0.ebuild
index 3752c6d..9fde6d4 100644
--- a/sys-devel/llvm/llvm-3.9.0.ebuild
+++ b/sys-devel/llvm/llvm-3.9.0.ebuild
@@ -181,6 +181,8 @@ src_prepare() {
 
                eapply 
"${FILESDIR}"/3.9.0/clang/darwin_prefix-include-paths.patch
                eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
+               
+               eapply 
"${FILESDIR}"/3.8.1/compiler-rt/darwin-default-sysroot.patch
 
                pushd "${S}"/tools/clang >/dev/null || die
                # be able to specify default values for -stdlib and -rtlib at 
build time

Reply via email to