sys-libs/libcxx: Partially revert "Use tc-get-c-rtlib"

The older versions require clang_rt path, so restore the old code.

Reverts: e968fbf5f2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2022-10-11 17:39:30 +02:00
parent a0ad918872
commit b576af920e
2 changed files with 16 additions and 8 deletions

View File

@@ -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

View File

@@ -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