Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 686194

Summary: sys-apps/portage: support riscv ABIs
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=742446
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 686768    

Description Zac Medico gentoo-dev 2019-05-18 01:45:36 UTC
From https://github.com/riscv/riscv-gnu-toolchain/blob/master/README.md:

> Supported ABIs are ilp32 (32-bit soft-float), ilp32d (32-bit hard-float), ilp32f
> (32-bit with single-precision in registers and double in memory, niche use only),
> lp64 lp64f lp64d (same but with 64-bit long and pointers).
Comment 1 Zac Medico gentoo-dev 2019-05-18 01:56:30 UTC
Also, https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html mentions:

> There is also the ‘ilp32e’ ABI that can only be used with the ‘rv32e’ architecture.
> This ABI is not well specified at present, and is subject to change.
Comment 3 Larry the Git Cow gentoo-dev 2019-05-18 19:15:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=40d51b2548dd74641aa6db619446a8d9473394a3

commit 40d51b2548dd74641aa6db619446a8d9473394a3
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-05-17 22:45:30 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-05-18 18:42:33 +0000

    Recognize riscv ABIs (bug 686194)
    
    In order to avoid possibe misidentification, only the following ABIs
    are recognized:
    
     * lp64
     * lp64d
    
    The compute_multilib_category function correctly identifies both
    riscv_lp64 and riscv_lp64d files found in the experimental stages
    from https://dev.gentoo.org/~dilfridge/stages/rv64gc-multilib/.
    
    Bug: https://bugs.gentoo.org/686194
    Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dep/soname/multilib_category.py | 51 ++++++++++++++++++++++++++---
 lib/portage/util/elf/constants.py           | 10 +++++-
 2 files changed, 55 insertions(+), 6 deletions(-)