summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta Satoh <nigoro.dev@gmail.com>2016-06-18 14:44:10 +0900
committerPatrice Clement <monsieurp@gentoo.org>2016-06-23 15:26:09 +0000
commit12280fd5851883571f9e0f0ec44432d2bd17e187 (patch)
tree581409fba4941e5d1d670f1aab2ce5a24e596103 /sys-devel/llvm/llvm-3.8.0-r2.ebuild
parentapp-admin/grubconfig: fix SRC_URI (diff)
downloadgentoo-12280fd5851883571f9e0f0ec44432d2bd17e187.tar.gz
gentoo-12280fd5851883571f9e0f0ec44432d2bd17e187.tar.bz2
gentoo-12280fd5851883571f9e0f0ec44432d2bd17e187.zip
sys-devel/llvm: Fix build fails on Gentoo/FreeBSD.
Gentoo-Bug: https://bugs.gentoo.org/578064 Closes: https://github.com/gentoo/gentoo/pull/1693 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'sys-devel/llvm/llvm-3.8.0-r2.ebuild')
-rw-r--r--sys-devel/llvm/llvm-3.8.0-r2.ebuild7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-devel/llvm/llvm-3.8.0-r2.ebuild b/sys-devel/llvm/llvm-3.8.0-r2.ebuild
index 71a927fd779..2a118302554 100644
--- a/sys-devel/llvm/llvm-3.8.0-r2.ebuild
+++ b/sys-devel/llvm/llvm-3.8.0-r2.ebuild
@@ -170,6 +170,9 @@ src_prepare() {
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+ # Workaround, can be compiled with gcc on Gentoo/FreeBSD, bug #578064
+ use kernel_FreeBSD && [[ $(tc-getCC) == *gcc* ]] && append-cppflags "-D_GLIBCXX_USE_C99"
+
if use clang; then
# Automatically select active system GCC's libraries, bugs #406163 and #417913
eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
@@ -198,6 +201,10 @@ src_prepare() {
# https://llvm.org/bugs/show_bug.cgi?id=23793
eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
+ # Fix 'stdarg.h' file not found on Gentoo/FreeBSD, bug #578064
+ # https://llvm.org/bugs/show_bug.cgi?id=26651
+ eapply "${FILESDIR}"/clang-3.8-compiler-rt-fbsd.patch
+
pushd projects/compiler-rt >/dev/null || die
# Fix WX sections, bug #421527