diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/multilib.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 956f3aeed889..350b6f949d12 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -450,6 +450,11 @@ multilib_toolchain_setup() { done export _DEFAULT_ABI_SAVED="true" + # Set CBUILD only if not cross-compiling. + if [[ ${CBUILD} == "${CHOST}" ]]; then + export CBUILD=$(get_abi_CHOST $1) + fi + # Set the CHOST native first so that we pick up the native # toolchain and not a cross-compiler by accident #202811. export CHOST=$(get_abi_CHOST ${DEFAULT_ABI}) @@ -459,7 +464,6 @@ multilib_toolchain_setup() { export FC="$(tc-getFC) $(get_abi_CFLAGS)" export LD="$(tc-getLD) $(get_abi_LDFLAGS)" export CHOST=$(get_abi_CHOST $1) - export CBUILD=$(get_abi_CHOST $1) export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig fi |