aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-03-09 01:08:53 -0800
committerGregory M. Tuner <gmt@be-evil.net>2014-03-09 01:08:53 -0800
commitcbeeec57738132417e420e31c3b0013316ef5318 (patch)
treeb8618f1eccc200a2daf4a525e135b166e4d67829 /eclass
parentunmask x11-libs/gdk-pixbuf-2.30.6-r2, ... (diff)
downloadgmt-cbeeec57738132417e420e31c3b0013316ef5318.tar.gz
gmt-cbeeec57738132417e420e31c3b0013316ef5318.tar.bz2
gmt-cbeeec57738132417e420e31c3b0013316ef5318.zip
backport multilib aarch64 handling for multilib_env
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/multilib.eclass22
1 files changed, 21 insertions, 1 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index bf59bb4..515bc08 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -320,8 +320,28 @@ get_modname() {
# a crosscompiler (and thus they aren't set in the profile)
multilib_env() {
local CTARGET=${1:-${CTARGET}}
+ local cpu=${CTARGET%%*-}
+
+ case ${cpu} in
+ aarch64*)
+ # Not possible to do multilib with aarch64 and a single toolchain.
+ export CFLAGS_arm=${CFLAGS_arm-}
+ case ${cpu} in
+ aarch64*be) export CHOST_arm="armv8b-${CTARGET#*-}";;
+ *) export CHOST_arm="armv8l-${CTARGET#*-}";;
+ esac
+ CHOST_arm=${CHOST_arm/%-gnu/-gnueabi}
+ export CTARGET_arm=${CHOST_arm}
+ export LIBDIR_arm="lib"
+
+ export CFLAGS_arm64=${CFLAGS_arm64-}
+ export CHOST_arm64=${CTARGET}
+ export CTARGET_arm64=${CHOST_arm64}
+ export LIBDIR_arm64="lib64"
- case ${CTARGET} in
+ : ${MULTILIB_ABIS=arm64}
+ : ${DEFAULT_ABI=arm64}
+ ;;
x86_64*)
export CFLAGS_x86=${CFLAGS_x86--m32}
export CHOST_x86=${CTARGET/x86_64/i686}