sys-libs/libcxxabi: fix a compile error on musl
authorLei Zhang <zhanglei.april@gmail.com>
Fri, 30 Sep 2016 10:28:28 +0000 (18:28 +0800)
committerMichał Górny <mgorny@gentoo.org>
Sun, 6 Nov 2016 19:56:42 +0000 (20:56 +0100)
Closes: https://github.com/gentoo/gentoo/pull/2491
Package-Manager: portage-2.3.1

sys-libs/libcxxabi/libcxxabi-3.9.0.ebuild

index 48c45199c980c8d3f8758604b0df665beec59f8e..2d5c58e671a708b6355c26af80a22537cbca79dc 100644 (file)
@@ -18,7 +18,7 @@ SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
 LICENSE="|| ( UoI-NCSA MIT )"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="libunwind +static-libs test"
+IUSE="elibc_musl libunwind +static-libs test"
 
 RDEPEND="
        libunwind? (
@@ -79,6 +79,9 @@ multilib_src_configure() {
                        -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
                )
        fi
+       if use elibc_musl; then
+               local -x CPPFLAGS="${CPPFLAGS} -D_LIBCPP_HAS_MUSL_LIBC=1"
+       fi
        cmake-utils_src_configure
 }