From 7029bfc24ddf8702d76d2aa88d39790b15c47961 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20K=2E=20H=C3=BCttel?= Date: Wed, 29 May 2019 00:57:21 +0200 Subject: [PATCH] toolchain.eclass: add riscv compiler abi configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- eclass/toolchain.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index cf6a95337219..3d997fb65819 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1213,6 +1213,10 @@ toolchain_src_configure() { is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double ) [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double ) ;; + riscv) + # Add --with-abi flags to set default ABI + confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) ) + ;; esac # if the target can do biarch (-m32/-m64), enable it. overhead should @@ -1640,6 +1644,7 @@ gcc-abi-map() { local map=() case ${CTARGET} in mips*) map=("o32 32" "n32 n32" "n64 64") ;; + riscv*) map=("lp64d lp64d" "lp64 lp64") ;; x86_64*) map=("amd64 m64" "x86 m32" "x32 mx32") ;; esac -- 2.26.2