summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-11 17:39:30 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-11 17:40:17 +0200
commitb576af920e4c06b92d124feeefc00b9c9f51d80d (patch)
tree0c7eee9caafc26fcee79ac70cc66c69b38f39a33 /sys-libs
parentwww-apache/mod_h2: add 2.0.10 (diff)
downloadgentoo-b576af920e4c06b92d124feeefc00b9c9f51d80d.tar.gz
gentoo-b576af920e4c06b92d124feeefc00b9c9f51d80d.tar.bz2
gentoo-b576af920e4c06b92d124feeefc00b9c9f51d80d.zip
sys-libs/libcxx: Partially revert "Use tc-get-c-rtlib"
The older versions require clang_rt path, so restore the old code. Reverts: e968fbf5f2132f5ca82b5889f08bec6c2fb65082 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libcxx/libcxx-13.0.1.ebuild12
-rw-r--r--sys-libs/libcxx/libcxx-14.0.6.ebuild12
2 files changed, 16 insertions, 8 deletions
diff --git a/sys-libs/libcxx/libcxx-13.0.1.ebuild b/sys-libs/libcxx/libcxx-13.0.1.ebuild
index 3021d859b872..f7db45b21571 100644
--- a/sys-libs/libcxx/libcxx-13.0.1.ebuild
+++ b/sys-libs/libcxx/libcxx-13.0.1.ebuild
@@ -89,10 +89,14 @@ multilib_src_configure() {
extra_libs+=( -lunwind )
# if we're using libunwind and clang with compiler-rt, we want
# to link to compiler-rt instead of -lgcc_s
- if [[ $(tc-get-c-rtlib) == compiler-rt ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
+ if tc-is-clang; then
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LDFLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ want_gcc_s=OFF
+ want_compiler_rt=ON
+ extra_libs+=( "${compiler_rt}" )
+ fi
fi
elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
# clang-based darwin prefix disables libunwind useflag during
diff --git a/sys-libs/libcxx/libcxx-14.0.6.ebuild b/sys-libs/libcxx/libcxx-14.0.6.ebuild
index 063546f816be..47501e5ea293 100644
--- a/sys-libs/libcxx/libcxx-14.0.6.ebuild
+++ b/sys-libs/libcxx/libcxx-14.0.6.ebuild
@@ -97,10 +97,14 @@ multilib_src_configure() {
extra_libs+=( -lunwind )
# if we're using libunwind and clang with compiler-rt, we want
# to link to compiler-rt instead of -lgcc_s
- if [[ $(tc-get-c-rtlib) == compiler-rt ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
+ if tc-is-clang; then
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LDFLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ want_gcc_s=OFF
+ want_compiler_rt=ON
+ extra_libs+=( "${compiler_rt}" )
+ fi
fi
elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
# clang-based darwin prefix disables libunwind useflag during