diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-10-10 22:32:09 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-10 22:52:37 +0200 |
commit | dbc5f4c188646927815d288e746e5b3fe7615719 (patch) | |
tree | 0539f1d678e44a4341c791f0ddfd117482dcce45 | |
parent | eclass/tests/toolchain-funcs.sh: Handle missing ld.gold gracefully (diff) | |
download | gentoo-dbc5f4c188646927815d288e746e5b3fe7615719.tar.gz gentoo-dbc5f4c188646927815d288e746e5b3fe7615719.tar.bz2 gentoo-dbc5f4c188646927815d288e746e5b3fe7615719.zip |
sys-devel/llvm: Use tc-get-cxx-stdlib
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | sys-devel/llvm/llvm-13.0.1.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-14.0.6-r2.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-15.0.2.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-15.0.3.9999.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-16.0.0.9999.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-16.0.0_pre20221006.ebuild | 14 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-16.0.0_pre20221010.ebuild | 14 |
7 files changed, 7 insertions, 91 deletions
diff --git a/sys-devel/llvm/llvm-13.0.1.ebuild b/sys-devel/llvm/llvm-13.0.1.ebuild index 2d52bf8cfe60..598476d25566 100644 --- a/sys-devel/llvm/llvm-13.0.1.ebuild +++ b/sys-devel/llvm/llvm-13.0.1.ebuild @@ -174,18 +174,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -367,7 +355,7 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-14.0.6-r2.ebuild b/sys-devel/llvm/llvm-14.0.6-r2.ebuild index 01b9bbfd4b9d..0f53397cf7ae 100644 --- a/sys-devel/llvm/llvm-14.0.6-r2.ebuild +++ b/sys-devel/llvm/llvm-14.0.6-r2.ebuild @@ -186,18 +186,6 @@ src_prepare() { rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -381,7 +369,7 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-15.0.2.ebuild b/sys-devel/llvm/llvm-15.0.2.ebuild index 5f8f61bdd695..79d2ff39fb45 100644 --- a/sys-devel/llvm/llvm-15.0.2.ebuild +++ b/sys-devel/llvm/llvm-15.0.2.ebuild @@ -180,18 +180,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -379,7 +367,7 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-15.0.3.9999.ebuild b/sys-devel/llvm/llvm-15.0.3.9999.ebuild index 010e27a1349e..1f47134cba77 100644 --- a/sys-devel/llvm/llvm-15.0.3.9999.ebuild +++ b/sys-devel/llvm/llvm-15.0.3.9999.ebuild @@ -180,18 +180,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -379,7 +367,7 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.0.9999.ebuild index 946713e022db..4eebbc15117c 100644 --- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild @@ -184,18 +184,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -391,7 +379,7 @@ multilib_src_configure() { # the commit id in the SOVERSION to contain the breakage suffix+="git${EGIT_VERSION::8}" fi - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221006.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221006.ebuild index fef201259b9f..91463ab2ffbd 100644 --- a/sys-devel/llvm/llvm-16.0.0_pre20221006.ebuild +++ b/sys-devel/llvm/llvm-16.0.0_pre20221006.ebuild @@ -184,18 +184,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -391,7 +379,7 @@ multilib_src_configure() { # the commit id in the SOVERSION to contain the breakage suffix+="git${EGIT_VERSION::8}" fi - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221010.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221010.ebuild index 946713e022db..4eebbc15117c 100644 --- a/sys-devel/llvm/llvm-16.0.0_pre20221010.ebuild +++ b/sys-devel/llvm/llvm-16.0.0_pre20221010.ebuild @@ -184,18 +184,6 @@ src_prepare() { llvm.org_src_prepare } -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - get_distribution_components() { local sep=${1-;} @@ -391,7 +379,7 @@ multilib_src_configure() { # the commit id in the SOVERSION to contain the breakage suffix+="git${EGIT_VERSION::8}" fi - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then # Smart hack: alter version suffix -> SOVERSION when linking # against libc++. This way we won't end up mixing LLVM libc++ # libraries with libstdc++ clang, and the other way around. |