From b375c11c5cf0467364ff8f217f6de6cc49551d92 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 9 Aug 2018 12:31:54 +0200 Subject: sys-libs/libcxx: Use -print-libgcc-file-name to get clang_rt path Suggested-by: David Carlos Manuelda Bug: https://bugs.gentoo.org/592326 --- sys-libs/libcxx/libcxx-5.0.2.ebuild | 16 ++++++---------- sys-libs/libcxx/libcxx-6.0.1.ebuild | 16 ++++++---------- sys-libs/libcxx/libcxx-6.0.9999.ebuild | 16 ++++++---------- sys-libs/libcxx/libcxx-7.0.9999.ebuild | 16 ++++++---------- sys-libs/libcxx/libcxx-9999.ebuild | 16 ++++++---------- 5 files changed, 30 insertions(+), 50 deletions(-) (limited to 'sys-libs/libcxx') diff --git a/sys-libs/libcxx/libcxx-5.0.2.ebuild b/sys-libs/libcxx/libcxx-5.0.2.ebuild index 885f8b131826..bd65e51b774b 100644 --- a/sys-libs/libcxx/libcxx-5.0.2.ebuild +++ b/sys-libs/libcxx/libcxx-5.0.2.ebuild @@ -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 diff --git a/sys-libs/libcxx/libcxx-6.0.1.ebuild b/sys-libs/libcxx/libcxx-6.0.1.ebuild index b7dda42427a2..6c5c866f9c61 100644 --- a/sys-libs/libcxx/libcxx-6.0.1.ebuild +++ b/sys-libs/libcxx/libcxx-6.0.1.ebuild @@ -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 diff --git a/sys-libs/libcxx/libcxx-6.0.9999.ebuild b/sys-libs/libcxx/libcxx-6.0.9999.ebuild index 7454f776ff64..8b1b4efcd6e8 100644 --- a/sys-libs/libcxx/libcxx-6.0.9999.ebuild +++ b/sys-libs/libcxx/libcxx-6.0.9999.ebuild @@ -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 diff --git a/sys-libs/libcxx/libcxx-7.0.9999.ebuild b/sys-libs/libcxx/libcxx-7.0.9999.ebuild index 64bc9accf263..e5777074eeda 100644 --- a/sys-libs/libcxx/libcxx-7.0.9999.ebuild +++ b/sys-libs/libcxx/libcxx-7.0.9999.ebuild @@ -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 diff --git a/sys-libs/libcxx/libcxx-9999.ebuild b/sys-libs/libcxx/libcxx-9999.ebuild index a4fdb61c8c7d..4272b2117944 100644 --- a/sys-libs/libcxx/libcxx-9999.ebuild +++ b/sys-libs/libcxx/libcxx-9999.ebuild @@ -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 -- cgit v1.2.3-65-gdbad