sys-devel/llvm: add patch for compiler-rt on Darwin/Prefix
authorFabian Groffen <grobian@gentoo.org>
Sun, 4 Sep 2016 15:03:09 +0000 (17:03 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sun, 4 Sep 2016 15:04:42 +0000 (17:04 +0200)
Package-Manager: portage-2.2.28

sys-devel/llvm/files/3.8.1/compiler-rt/darwin-default-sysroot.patch [new file with mode: 0644]
sys-devel/llvm/llvm-3.8.1.ebuild
sys-devel/llvm/llvm-3.9.0.ebuild

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 (file)
index 0000000..9122ce9
--- /dev/null
@@ -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()
+ 
index cc390c5fb7d48a31816b98c978e81343b10dcc0e..8734298eca1e50835e6e2e925468e7aea9b63659 100644 (file)
@@ -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
index 3752c6d98e946466e64ac9e28cae2e583da2e7da..9fde6d4dc9fc8ad35b2b469baead02b90fa33fee 100644 (file)
@@ -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