Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: riscv@g.o
Subject: Re: [gentoo-dev] How to structure our RISC-V support
Date: Thu, 06 May 2021 20:17:05
Message-Id: 96fa909d025ca0f171bb8050cb4f00d43a6a306d.camel@gentoo.org
In Reply to: [gentoo-dev] How to structure our RISC-V support by "Andreas K. Huettel"
1 On Thu, 2021-05-06 at 22:01 +0200, Andreas K. Huettel wrote:
2 > Howdy.
3 >
4 > I'm sending this not only to the team members on the alias, but also
5 > to the whole dev list for discussion.
6 >
7 > So far I've been trying to support in Gentoo the full risc-v multilib
8 > directory structure and the ABI sets supported by glibc. According to
9 > specs this means for riscv64
10 >
11 > -mabi=rv64gc -march=lp64d
12 > libdir = lib64/lp64d
13 > ("hardfloat")
14 >
15 > -mabi=rv64imac -march=lp64
16 > libdir = lib64/lp64
17 > ("softfloat")
18 >
19 > and theoretically similar for riscv32 (which just landed in glibc and
20 > is still broken in qemu-user).
21 >
22 > However, this leads to several levels of pain (and I definitely dont
23 > have time to deal with it myself):
24 >
25 > a) In many places the two-level libdir (e.g., /usr/lib64/lp64d) leads
26 > to difficulties in build systems. Right now Qt5 and CMake are still
27 > somewhat broken (in *Gentoo*).
28 >
29 > b) Rust only supports rv64gc/lp64d. (Which is arguably what you should
30 > have for decent Linux support.)
31 >
32 > I'm pretty sure these are not the only things, but they are somewhat
33 > symptomatic.
34 >
35 > So, I would like to bring two proposals up for discussion.
36 >
37 > 1) We stop caring about anything except rv64gc/lp64d.
38 > People can still bootstrap other stuff with crossdev etc, but the
39 > Gentoo tree and the riscv keyword reflect that things work with above
40 > -mabi and -march settings.
41 >
42 > 2) We drop the multilib paths and use "normal" lib64, with additional
43 > "safety symlinks" (/usr)/lib64/lp64d -> .
44 > This is what SuSE and (I think) Fedora already does. The symlink
45 > should be there since "lib64" is NOT an official fallback coded into
46 > gcc/glibc/binutils; the only fallback present is "lib" ...
47 >
48 > Opinions?
49 >
50
51 Haven't I told you using two-level libdirs is stupid? So yes, please do
52 that and let us be happy once again.
53
54 That said, where does lp64gc land? Or isnon-multilib one-or-the-other
55 the goal?
56
57 --
58 Best regards,
59 Michał Górny

Replies

Subject Author
Re: [gentoo-dev] How to structure our RISC-V support "Andreas K. Huettel" <dilfridge@g.o>