mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
sys-libs/libcxx: Use -print-libgcc-file-name to get clang_rt path
Suggested-by: David Carlos Manuelda Bug: https://bugs.gentoo.org/592326
This commit is contained in:
@@ -94,16 +94,12 @@ multilib_src_configure() {
|
||||
# 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
|
||||
# get the full library list out of 'pretend mode'
|
||||
# and grep it for libclang_rt references
|
||||
local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
|
||||
local i
|
||||
for i in "${args[@]}"; do
|
||||
if [[ ${i} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${i}" )
|
||||
fi
|
||||
done
|
||||
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
|
||||
${LDFLAGS} -print-libgcc-file-name)
|
||||
if [[ ${compiler_rt} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -101,16 +101,12 @@ multilib_src_configure() {
|
||||
# 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
|
||||
# get the full library list out of 'pretend mode'
|
||||
# and grep it for libclang_rt references
|
||||
local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
|
||||
local i
|
||||
for i in "${args[@]}"; do
|
||||
if [[ ${i} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${i}" )
|
||||
fi
|
||||
done
|
||||
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
|
||||
${LDFLAGS} -print-libgcc-file-name)
|
||||
if [[ ${compiler_rt} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -113,16 +113,12 @@ multilib_src_configure() {
|
||||
# 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
|
||||
# get the full library list out of 'pretend mode'
|
||||
# and grep it for libclang_rt references
|
||||
local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
|
||||
local i
|
||||
for i in "${args[@]}"; do
|
||||
if [[ ${i} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${i}" )
|
||||
fi
|
||||
done
|
||||
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
|
||||
${LDFLAGS} -print-libgcc-file-name)
|
||||
if [[ ${compiler_rt} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -113,16 +113,12 @@ multilib_src_configure() {
|
||||
# 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
|
||||
# get the full library list out of 'pretend mode'
|
||||
# and grep it for libclang_rt references
|
||||
local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
|
||||
local i
|
||||
for i in "${args[@]}"; do
|
||||
if [[ ${i} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${i}" )
|
||||
fi
|
||||
done
|
||||
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
|
||||
${LDFLAGS} -print-libgcc-file-name)
|
||||
if [[ ${compiler_rt} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -112,16 +112,12 @@ multilib_src_configure() {
|
||||
# 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
|
||||
# get the full library list out of 'pretend mode'
|
||||
# and grep it for libclang_rt references
|
||||
local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
|
||||
local i
|
||||
for i in "${args[@]}"; do
|
||||
if [[ ${i} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${i}" )
|
||||
fi
|
||||
done
|
||||
local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
|
||||
${LDFLAGS} -print-libgcc-file-name)
|
||||
if [[ ${compiler_rt} == *libclang_rt* ]]; then
|
||||
want_gcc_s=OFF
|
||||
extra_libs+=( "${compiler_rt}" )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user