1 |
commit: 2205e11665041841492696deb3ed5be99f5c805d |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 23 21:38:28 2021 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 2 11:18:58 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2205e116 |
7 |
|
8 |
multilib.eclass: adopt riscv conventions of the 20.0 profiles |
9 |
|
10 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/23487 |
12 |
Bug: https://bugs.gentoo.org/797679 |
13 |
|
14 |
eclass/multilib.eclass | 32 ++++++++++++++++++++++++-------- |
15 |
1 file changed, 24 insertions(+), 8 deletions(-) |
16 |
|
17 |
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass |
18 |
index b14b0ef77857..fadd371f3ca7 100644 |
19 |
--- a/eclass/multilib.eclass |
20 |
+++ b/eclass/multilib.eclass |
21 |
@@ -412,7 +412,18 @@ multilib_env() { |
22 |
: ${DEFAULT_ABI=ppc64} |
23 |
;; |
24 |
riscv64*) |
25 |
- export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64imafdc} |
26 |
+ : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} |
27 |
+ : ${DEFAULT_ABI=lp64d} |
28 |
+ |
29 |
+ # the default abi is set to the 1-level libdir default |
30 |
+ |
31 |
+ local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}" |
32 |
+ local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable} |
33 |
+ export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib64} |
34 |
+ |
35 |
+ # all other abi are set to the 2-level libdir default |
36 |
+ |
37 |
+ export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64gc} |
38 |
export CHOST_lp64d=${CTARGET} |
39 |
export CTARGET_lp64d=${CTARGET} |
40 |
export LIBDIR_lp64d=${LIBDIR_lp64d-lib64/lp64d} |
41 |
@@ -431,12 +442,20 @@ multilib_env() { |
42 |
export CHOST_ilp32=${CTARGET/riscv64/riscv32} |
43 |
export CTARGET_ilp32=${CTARGET/riscv64/riscv32} |
44 |
export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32} |
45 |
- |
46 |
- : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} |
47 |
- : ${DEFAULT_ABI=lp64d} |
48 |
;; |
49 |
riscv32*) |
50 |
- export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d} |
51 |
+ : ${MULTILIB_ABIS=ilp32d ilp32} |
52 |
+ : ${DEFAULT_ABI=ilp32d} |
53 |
+ |
54 |
+ # the default abi is set to the 1-level libdir default |
55 |
+ |
56 |
+ local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}" |
57 |
+ local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable} |
58 |
+ export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib} |
59 |
+ |
60 |
+ # all other abi are set to the 2-level libdir default |
61 |
+ |
62 |
+ export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d -march=rv32imafdc} |
63 |
export CHOST_ilp32d=${CTARGET} |
64 |
export CTARGET_ilp32d=${CTARGET} |
65 |
export LIBDIR_ilp32d=${LIBDIR_ilp32d-lib32/ilp32d} |
66 |
@@ -445,9 +464,6 @@ multilib_env() { |
67 |
export CHOST_ilp32=${CTARGET} |
68 |
export CTARGET_ilp32=${CTARGET} |
69 |
export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32} |
70 |
- |
71 |
- : ${MULTILIB_ABIS=ilp32d ilp32} |
72 |
- : ${DEFAULT_ABI=ilp32d} |
73 |
;; |
74 |
s390x*) |
75 |
export CFLAGS_s390=${CFLAGS_s390--m31} # the 31 is not a typo |