diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2020-09-11 17:59:37 +0300 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2020-09-11 18:01:57 +0300 |
commit | 976ef028d3a1c18cfa64f3880a8a2754da35afea (patch) | |
tree | 02f0a73e5f0156cd3cf903d8d1ad50a7abae8e2a | |
parent | dev-lang/gprolog: remove old version (diff) | |
download | gentoo-976ef028d3a1c18cfa64f3880a8a2754da35afea.tar.gz gentoo-976ef028d3a1c18cfa64f3880a8a2754da35afea.tar.bz2 gentoo-976ef028d3a1c18cfa64f3880a8a2754da35afea.zip |
multilib*.eclass: Add support for rv32 abi
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r-- | eclass/multilib-build.eclass | 14 | ||||
-rw-r--r-- | eclass/multilib.eclass | 30 |
2 files changed, 38 insertions, 6 deletions
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 620bdcedce58..dc4f8a2bd159 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -49,6 +49,8 @@ _MULTILIB_FLAGS=( # abi_ppc_64:ppc64 abi_riscv_lp64d:lp64d abi_riscv_lp64:lp64 + abi_riscv_ilp32d:ilp32d + abi_riscv_ilp32:ilp32 abi_s390_32:s390 abi_s390_64:s390x ) @@ -492,12 +494,18 @@ multilib_prepare_wrappers() { # error "abi_mips_o32 not supported by the package." # endif #elif defined(__riscv) -# if defined(__riscv_float_abi_double) +# if (__WORDSIZE == 64) && defined(__riscv_float_abi_double) # error "abi_riscv_lp64d not supported by the package." -# elif defined(__riscv_float_abi_single) +# elif (__WORDSIZE == 64) && defined(__riscv_float_abi_single) # error "abi_riscv_lp64f not supported by the package." -# else +# elif (__WORDSIZE == 64) # error "abi_riscv_lp64 not supported by the package." +# elif (__WORDSIZE == 32) && defined(__riscv_float_abi_double) +# error "abi_riscv_ilp32d not supported by the package." +# elif (__WORDSIZE == 32) && defined(__riscv_float_abi_single) +# error "abi_riscv_ilp32f not supported by the package." +# else +# error "abi_riscv_ilp32 not supported by the package." # endif #elif defined(__sparc__) # if defined(__arch64__) diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 342d21a2e1c3..9c7042fcd299 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -397,19 +397,43 @@ multilib_env() { : ${DEFAULT_ABI=ppc64} ;; riscv64*) - export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d} + export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64imafdc} export CHOST_lp64d=${CTARGET} export CTARGET_lp64d=${CTARGET} export LIBDIR_lp64d="lib64/lp64d" - export CFLAGS_lp64=${CFLAGS_lp64--mabi=lp64} + export CFLAGS_lp64=${CFLAGS_lp64--mabi=lp64 -march=rv64imac} export CHOST_lp64=${CTARGET} export CTARGET_lp64=${CTARGET} export LIBDIR_lp64="lib64/lp64" - : ${MULTILIB_ABIS=lp64d lp64} + export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d -march=rv32imafdc} + export CHOST_ilp32d=${CTARGET/riscv64/riscv32} + export CTARGET_ilp32d=${CTARGET/riscv64/riscv32} + export LIBDIR_ilp32d="lib32/ilp32d" + + export CFLAGS_ilp32=${CFLAGS_ilp32--mabi=ilp32 -march=rv32imac} + export CHOST_ilp32=${CTARGET/riscv64/riscv32} + export CTARGET_ilp32=${CTARGET/riscv64/riscv32} + export LIBDIR_ilp32="lib32/ilp32" + + : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} : ${DEFAULT_ABI=lp64d} ;; + riscv32*) + export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d} + export CHOST_ilp32d=${CTARGET} + export CTARGET_ilp32d=${CTARGET} + export LIBDIR_ilp32d="lib32/ilp32d" + + export CFLAGS_ilp32=${CFLAGS_ilp32--mabi=ilp32 -march=rv32imac} + export CHOST_ilp32=${CTARGET} + export CTARGET_ilp32=${CTARGET} + export LIBDIR_ilp32="lib32/ilp32" + + : ${MULTILIB_ABIS=ilp32d ilp32} + : ${DEFAULT_ABI=ilp32d} + ;; s390x*) export CFLAGS_s390=${CFLAGS_s390--m31} # the 31 is not a typo export CHOST_s390=${CTARGET/s390x/s390} |