summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-08-03 17:49:18 +0200
committerMichał Górny <mgorny@gentoo.org>2021-08-03 17:49:42 +0200
commit20e30ceb263f76b54978b849e8c4d648d84d7a5a (patch)
tree83739ebdd00bfacd39eb57d893f78e7152f35af5 /sys-libs/libcxxabi
parentdev-perl/Cache-Memcached: keyword 1.300.0-r2 for ~riscv (diff)
downloadgentoo-20e30ceb263f76b54978b849e8c4d648d84d7a5a.tar.gz
gentoo-20e30ceb263f76b54978b849e8c4d648d84d7a5a.tar.bz2
gentoo-20e30ceb263f76b54978b849e8c4d648d84d7a5a.zip
sys-libs/libcxxabi: Fix building in 13+
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs/libcxxabi')
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild16
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.0_rc1.ebuild16
-rw-r--r--sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild16
3 files changed, 27 insertions, 21 deletions
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild
index 953c0c81796c..88b0bb90ab56 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild
@@ -31,7 +31,6 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)"
-# libcxx is needed uncondtionally for the headers
LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
llvm.org_set_globals
@@ -49,6 +48,11 @@ pkg_setup() {
}
multilib_src_configure() {
+ # we need a configured libc++ for __config_site
+ wrap_libcxx cmake_src_configure
+ cp -R "${WORKDIR}"/libcxx/include/. \
+ "${BUILD_DIR}"/libcxx/include/c++/v1 || die
+
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -68,7 +72,7 @@ multilib_src_configure() {
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
@@ -86,7 +90,7 @@ multilib_src_configure() {
cmake_src_configure
}
-build_libcxx() {
+wrap_libcxx() {
local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
local CMAKE_USE_DIR=${WORKDIR}/libcxx
local BUILD_DIR=${BUILD_DIR}/libcxx
@@ -103,13 +107,11 @@ build_libcxx() {
-DLIBCXX_INCLUDE_TESTS=OFF
)
- cmake_src_configure
- cmake_src_compile
+ "${@}"
}
multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
+ wrap_libcxx cmake_src_compile
mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
local -x LIT_PRESERVES_TMP=1
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0_rc1.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.0_rc1.ebuild
index 953c0c81796c..88b0bb90ab56 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.0_rc1.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.0_rc1.ebuild
@@ -31,7 +31,6 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)"
-# libcxx is needed uncondtionally for the headers
LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
llvm.org_set_globals
@@ -49,6 +48,11 @@ pkg_setup() {
}
multilib_src_configure() {
+ # we need a configured libc++ for __config_site
+ wrap_libcxx cmake_src_configure
+ cp -R "${WORKDIR}"/libcxx/include/. \
+ "${BUILD_DIR}"/libcxx/include/c++/v1 || die
+
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -68,7 +72,7 @@ multilib_src_configure() {
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
@@ -86,7 +90,7 @@ multilib_src_configure() {
cmake_src_configure
}
-build_libcxx() {
+wrap_libcxx() {
local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
local CMAKE_USE_DIR=${WORKDIR}/libcxx
local BUILD_DIR=${BUILD_DIR}/libcxx
@@ -103,13 +107,11 @@ build_libcxx() {
-DLIBCXX_INCLUDE_TESTS=OFF
)
- cmake_src_configure
- cmake_src_compile
+ "${@}"
}
multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
+ wrap_libcxx cmake_src_compile
mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
local -x LIT_PRESERVES_TMP=1
diff --git a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
index 953c0c81796c..88b0bb90ab56 100644
--- a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
@@ -31,7 +31,6 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)"
-# libcxx is needed uncondtionally for the headers
LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
llvm.org_set_globals
@@ -49,6 +48,11 @@ pkg_setup() {
}
multilib_src_configure() {
+ # we need a configured libc++ for __config_site
+ wrap_libcxx cmake_src_configure
+ cp -R "${WORKDIR}"/libcxx/include/. \
+ "${BUILD_DIR}"/libcxx/include/c++/v1 || die
+
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -68,7 +72,7 @@ multilib_src_configure() {
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
@@ -86,7 +90,7 @@ multilib_src_configure() {
cmake_src_configure
}
-build_libcxx() {
+wrap_libcxx() {
local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
local CMAKE_USE_DIR=${WORKDIR}/libcxx
local BUILD_DIR=${BUILD_DIR}/libcxx
@@ -103,13 +107,11 @@ build_libcxx() {
-DLIBCXX_INCLUDE_TESTS=OFF
)
- cmake_src_configure
- cmake_src_compile
+ "${@}"
}
multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
+ wrap_libcxx cmake_src_compile
mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
local -x LIT_PRESERVES_TMP=1