Skip to content

Commit

Permalink
sys-libs/libcxxabi: Bump to 9.0.1rc2
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Dec 7, 2019
1 parent 5b5896e commit b0cb9b8
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-libs/libcxxabi/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ DIST libcxxabi-7.1.0.src.tar.xz 535180 BLAKE2B aa5952e3ca80f7ce2a0a79f3eaf385223
DIST libcxxabi-8.0.1.src.tar.xz 538356 BLAKE2B 52328c5890c9b9271877b953be30cc39be4758101e6b91ee45f06c81e960089523e80b83eb5c354336e4e0a140f7554640acf7b2d4fa619113f705108a314418 SHA512 577cfcb04ebb29ee84d35ed31aa8fecb28fc74b07ef7ff298f0fe2d440f823def73e092359c41d8d8600e6df18f55224ed89674d403c5ae56a7d7973487b8734
DIST libcxxabi-9.0.0.src.tar.xz 552088 BLAKE2B 1b8f2bab00437a223f613cbecd9171f1bc88d0ec2d6096776d0295333c0176ddbe13178d433bed2dc70821b905152fcd30b228ae1dbd3e8846f3b92e7630db7e SHA512 261f32f61814728ce61c830c80192a55e1ba03c50f49712e208052444ac3acc6d7efcbd7b76a505292f9233aad23b00180aca4e72326ae1244385b39f226e625
DIST llvmorg-9.0.1-rc1.tar.gz 113193716 BLAKE2B 1ab52c778a139d33674589c27bf5a4d619dd4df49344b508c16de3ca6fad09c19480ceb615e0d9cf6d1981c7f28e106f087c0cd7bc2ccb844bec7099f5d227c2 SHA512 ed4b11cadbd57aa5f531d598e320a6bd54c67a8c713671af12ce62bc02283515ecbbc65ccbe3b0db3bad517cc4e6386cc3565be9eb9b9d06ca2a598428abf557
DIST llvmorg-9.0.1-rc2.tar.gz 113203311 BLAKE2B 6e426060853e1587febedb75189444a1451236b713f800a4f3401c54318e48b0f5e0c484e9e4ef261faceed9b43b445a4153b061d4dadcc617047f9320b4f56a SHA512 fececd9365645920b9afdad1e94d5e10553ad4a39d84b3ac811b86014c395d51f7e4dabe54bb095a99481400c408bee3c9a2044168724d5e094e3258587a5d2c
119 changes: 119 additions & 0 deletions sys-libs/libcxxabi/libcxxabi-9.0.1_rc2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1

DESCRIPTION="Low level support for a standard C++ library"
HOMEPAGE="https://libcxxabi.llvm.org/"
# libcxx is needed uncondtionally for the headers
LLVM_COMPONENTS=( libcxx{abi,} )
llvm.org_set_globals

LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
KEYWORDS=""
IUSE="+libunwind +static-libs test elibc_musl"
RESTRICT="!test? ( test )"

RDEPEND="
libunwind? (
|| (
>=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
>=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
)
)"
# llvm-6 for new lit options
DEPEND="${RDEPEND}
>=sys-devel/llvm-6"
BDEPEND="
test? ( >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"

# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo

python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}

pkg_setup() {
llvm_pkg_setup
use test && python-any-r1_pkg_setup
}

multilib_src_configure() {
# 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
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
${LDFLAGS} -print-libgcc-file-name)
if [[ ${compiler_rt} == *libclang_rt* ]]; then
want_compiler_rt=ON
fi
fi

local libdir=$(get_libdir)
local mycmakeargs=(
-DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
-DLIBCXXABI_ENABLE_SHARED=ON
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
-DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}

-DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}

[[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"

mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
)
fi
cmake-utils_src_configure
}

build_libcxx() {
local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
local CMAKE_USE_DIR=${WORKDIR}/libcxx
local BUILD_DIR=${BUILD_DIR}/libcxx
local mycmakeargs=(
-DLIBCXX_LIBDIR_SUFFIX=
-DLIBCXX_ENABLE_SHARED=OFF
-DLIBCXX_ENABLE_STATIC=ON
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
-DLIBCXX_CXX_ABI=libcxxabi
-DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-DLIBCXX_HAS_GCC_S_LIB=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
)

cmake-utils_src_configure
cmake-utils_src_compile
}

multilib_src_test() {
# build a local copy of libc++ for testing to avoid circular dep
build_libcxx
mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die

local -x LIT_PRESERVES_TMP=1
cmake-utils_src_make check-libcxxabi
}

multilib_src_install_all() {
insinto /usr/include/libcxxabi
doins -r include/.
}

0 comments on commit b0cb9b8

Please sign in to comment.