summaryrefslogtreecommitdiff
path: root/eclass/multilib.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/multilib.eclass')
-rw-r--r--eclass/multilib.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 63bde5cbb601..bbaab709b4fa 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: multilib.eclass
@@ -294,11 +294,22 @@ get_modname() {
}
# This is for the toolchain to setup profile variables when pulling in
-# a crosscompiler (and thus they aren't set in the profile)
+# a crosscompiler (and thus they aren't set in the profile).
multilib_env() {
local CTARGET=${1:-${CTARGET}}
local cpu=${CTARGET%%*-}
+ if [[ ${CTARGET} = *-musl* ]]; then
+ # musl has no multilib support and can run only in 'lib':
+ # - https://bugs.gentoo.org/675954
+ # - https://gcc.gnu.org/PR90077
+ # - https://github.com/gentoo/musl/issues/245
+ : ${MULTILIB_ABIS=default}
+ : ${DEFAULT_ABI=default}
+ export MULTILIB_ABIS DEFAULT_ABI
+ return
+ fi
+
case ${cpu} in
aarch64*)
# Not possible to do multilib with aarch64 and a single toolchain.