diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-08-09 12:31:54 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-08-09 12:31:54 +0200 |
commit | b375c11c5cf0467364ff8f217f6de6cc49551d92 (patch) | |
tree | f6cb626ce404e1f16d75bdb1d0db266d8fa92ee9 /sys-libs/libcxx | |
parent | dev-python/dbus-python: Tested on ~amd64-fbsd, bug #662076 (diff) | |
download | gentoo-b375c11c5cf0467364ff8f217f6de6cc49551d92.tar.gz gentoo-b375c11c5cf0467364ff8f217f6de6cc49551d92.tar.bz2 gentoo-b375c11c5cf0467364ff8f217f6de6cc49551d92.zip |
sys-libs/libcxx: Use -print-libgcc-file-name to get clang_rt path
Suggested-by: David Carlos Manuelda
Bug: https://bugs.gentoo.org/592326
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r-- | sys-libs/libcxx/libcxx-5.0.2.ebuild | 16 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-6.0.1.ebuild | 16 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-6.0.9999.ebuild | 16 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-7.0.9999.ebuild | 16 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-9999.ebuild | 16 |
5 files changed, 30 insertions, 50 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 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 |