diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-12-23 22:38:28 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2022-01-02 12:18:58 +0100 |
commit | 2205e11665041841492696deb3ed5be99f5c805d (patch) | |
tree | 91b367514fdabd02480a65e5b8b42420fa99ddb9 /eclass/multilib.eclass | |
parent | profiles: consolidate arch/riscv files (diff) | |
download | gentoo-2205e11665041841492696deb3ed5be99f5c805d.tar.gz gentoo-2205e11665041841492696deb3ed5be99f5c805d.tar.bz2 gentoo-2205e11665041841492696deb3ed5be99f5c805d.zip |
multilib.eclass: adopt riscv conventions of the 20.0 profiles
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/23487
Bug: https://bugs.gentoo.org/797679
Diffstat (limited to 'eclass/multilib.eclass')
-rw-r--r-- | eclass/multilib.eclass | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index b14b0ef77857..fadd371f3ca7 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -412,7 +412,18 @@ multilib_env() { : ${DEFAULT_ABI=ppc64} ;; riscv64*) - export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64imafdc} + : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} + : ${DEFAULT_ABI=lp64d} + + # the default abi is set to the 1-level libdir default + + local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}" + local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable} + export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib64} + + # all other abi are set to the 2-level libdir default + + export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64gc} export CHOST_lp64d=${CTARGET} export CTARGET_lp64d=${CTARGET} export LIBDIR_lp64d=${LIBDIR_lp64d-lib64/lp64d} @@ -431,12 +442,20 @@ multilib_env() { export CHOST_ilp32=${CTARGET/riscv64/riscv32} export CTARGET_ilp32=${CTARGET/riscv64/riscv32} export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32} - - : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} - : ${DEFAULT_ABI=lp64d} ;; riscv32*) - export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d} + : ${MULTILIB_ABIS=ilp32d ilp32} + : ${DEFAULT_ABI=ilp32d} + + # the default abi is set to the 1-level libdir default + + local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}" + local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable} + export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib} + + # all other abi are set to the 2-level libdir default + + export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d -march=rv32imafdc} export CHOST_ilp32d=${CTARGET} export CTARGET_ilp32d=${CTARGET} export LIBDIR_ilp32d=${LIBDIR_ilp32d-lib32/ilp32d} @@ -445,9 +464,6 @@ multilib_env() { export CHOST_ilp32=${CTARGET} export CTARGET_ilp32=${CTARGET} export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32} - - : ${MULTILIB_ABIS=ilp32d ilp32} - : ${DEFAULT_ABI=ilp32d} ;; s390x*) export CFLAGS_s390=${CFLAGS_s390--m31} # the 31 is not a typo |