diff options
Diffstat (limited to 'sys-libs/libcxx/libcxx-5.0.2.ebuild')
-rw-r--r-- | sys-libs/libcxx/libcxx-5.0.2.ebuild | 16 |
1 files changed, 6 insertions, 10 deletions
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 |