mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
sys-libs/libcxx: Use tc-get-c-rtlib
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -89,14 +89,10 @@ 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-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
|
||||
if [[ $(tc-get-c-rtlib) == compiler-rt ]]; then
|
||||
want_gcc_s=OFF
|
||||
want_compiler_rt=ON
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
|
||||
# clang-based darwin prefix disables libunwind useflag during
|
||||
|
||||
@@ -97,14 +97,10 @@ 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-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
|
||||
if [[ $(tc-get-c-rtlib) == compiler-rt ]]; then
|
||||
want_gcc_s=OFF
|
||||
want_compiler_rt=ON
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
|
||||
# clang-based darwin prefix disables libunwind useflag during
|
||||
|
||||
@@ -95,15 +95,9 @@ multilib_src_configure() {
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# link against compiler-rt instead of libgcc if this is what clang does
|
||||
local want_compiler_rt=OFF
|
||||
if 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
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# bootstrap: cmake is unhappy if compiler can't link to stdlib
|
||||
local nolib_flags=( -nodefaultlibs -lc )
|
||||
@@ -131,7 +125,7 @@ multilib_src_configure() {
|
||||
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
|
||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
|
||||
-DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
|
||||
@@ -94,15 +94,9 @@ multilib_src_configure() {
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# link against compiler-rt instead of libgcc if this is what clang does
|
||||
local want_compiler_rt=OFF
|
||||
if 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
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# bootstrap: cmake is unhappy if compiler can't link to stdlib
|
||||
local nolib_flags=( -nodefaultlibs -lc )
|
||||
@@ -130,7 +124,7 @@ multilib_src_configure() {
|
||||
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
|
||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
|
||||
-DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
|
||||
@@ -94,15 +94,9 @@ multilib_src_configure() {
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# link against compiler-rt instead of libgcc if this is what clang does
|
||||
local want_compiler_rt=OFF
|
||||
if 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
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# bootstrap: cmake is unhappy if compiler can't link to stdlib
|
||||
local nolib_flags=( -nodefaultlibs -lc )
|
||||
@@ -130,7 +124,7 @@ multilib_src_configure() {
|
||||
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
|
||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
|
||||
-DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
|
||||
@@ -94,15 +94,9 @@ multilib_src_configure() {
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# link against compiler-rt instead of libgcc if this is what clang does
|
||||
local want_compiler_rt=OFF
|
||||
if 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
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# bootstrap: cmake is unhappy if compiler can't link to stdlib
|
||||
local nolib_flags=( -nodefaultlibs -lc )
|
||||
@@ -130,7 +124,7 @@ multilib_src_configure() {
|
||||
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
|
||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
|
||||
-DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
|
||||
@@ -94,15 +94,9 @@ multilib_src_configure() {
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
# link against compiler-rt instead of libgcc if this is what clang does
|
||||
local want_compiler_rt=OFF
|
||||
if 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
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# bootstrap: cmake is unhappy if compiler can't link to stdlib
|
||||
local nolib_flags=( -nodefaultlibs -lc )
|
||||
@@ -130,7 +124,7 @@ multilib_src_configure() {
|
||||
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
|
||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
|
||||
-DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
|
||||
Reference in New Issue
Block a user