Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dep/soname/
Date: Mon, 14 Sep 2020 07:29:59
Message-Id: 1600066359.4c3b7adb63d3fef8963877291a490600a1a55443.zmedico@gentoo
1 commit: 4c3b7adb63d3fef8963877291a490600a1a55443
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 11 21:42:14 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 14 06:52:39 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4c3b7adb
7
8 Recognize riscv_{ilp32,ilp32d} ABIs
9
10 Bug: https://bugs.gentoo.org/742446
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 lib/portage/dep/soname/multilib_category.py | 11 +++++++++--
14 1 file changed, 9 insertions(+), 2 deletions(-)
15
16 diff --git a/lib/portage/dep/soname/multilib_category.py b/lib/portage/dep/soname/multilib_category.py
17 index 301c62a35..fb2839e01 100644
18 --- a/lib/portage/dep/soname/multilib_category.py
19 +++ b/lib/portage/dep/soname/multilib_category.py
20 @@ -14,7 +14,7 @@
21 # m68k_{32,64}
22 # mips_{eabi32,eabi64,n32,n64,o32,o64}
23 # ppc_{32,64}
24 -# riscv_{lp64,lp64d}
25 +# riscv_{ilp32,ilp32d,lp64,lp64d}
26 # s390_{32,64}
27 # sh_{32,64}
28 # sparc_{32,64}
29 @@ -99,6 +99,8 @@ def _compute_suffix_riscv(elf_header):
30 Compute riscv multilib suffix. In order to avoid possible
31 misidentification, only the following ABIs are recognized:
32
33 + * ilp32
34 + * ilp32d
35 * lp64
36 * lp64d
37 """
38 @@ -111,8 +113,13 @@ def _compute_suffix_riscv(elf_header):
39 elif elf_header.e_flags == EF_RISCV_RVC | EF_RISCV_FLOAT_ABI_DOUBLE:
40 name = "lp64d"
41
42 - return name
43 + elif elf_header.ei_class == ELFCLASS32:
44 + if elf_header.e_flags == EF_RISCV_RVC:
45 + name = "ilp32"
46 + elif elf_header.e_flags == EF_RISCV_RVC | EF_RISCV_FLOAT_ABI_DOUBLE:
47 + name = "ilp32d"
48
49 + return name
50
51 _specialized_funcs = {
52 "mips": _compute_suffix_mips,