Bootstrapping path discovered for RISC-V 64bit

  • Open
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Ekaitz Zarraga
Owner
unassigned
Submitted by
Ekaitz Zarraga
Severity
normal

Debbugs page

Ekaitz Zarraga wrote 8 months ago
26411bab-0d65-dc55-e55d-7d0a0c96de50@elenq.tech
Hi,

Thanks to NlNet we have found a bootstrapping path for RISC-V 64 and we
created an alternative `commencement.scm` draft that builds from source
up to a GCC-9.

At the moment, that GCC-9 does not provide C++ support in my Guix
packages. I tried to add it but I had issues. We made it work for
live-bootstrap (Andrius did), and now it's time to move that to Guix but
it's getting a little bit difficult with GCC's build-system.

I'm opening this issue to make the handover to Guix. I have already
worked with Efraim and he agreed to continue with this work until it's
upstreamed. Also Janneke is working on a version of this commencement
module that adds support for x86, so we could use that for everything
instead of relying in two different bootstrapping paths.

This will take some time to integrate. There are a couple of packages
that I didn't bootstrap yet (but it's possible to bootstrap them):
`flex` and `bison`. Mostly because we wanted to fix

The Gash package is replaced with a non-bootstrapped Bash because
there's an issue in Gash that hangs the bootstrapping process. We have
reported it upstream. We should use Gash once the issue is fixed.

Also, we only made the path until a modern GCC, not all the rest of it,
that we should be able to reuse from the current `commencement.scm` module.

This is the link to the repo:


I'm more than open to help Guix include the RISC-V bootstrapping process
upstream, so if you have any question, suggestion or anything else, feel
free to directly contact me.

As a note, in this series of blogposts I shared the 2 year process until
today, and almost everything is documented:


Also, I'd like to publicly thank everyone who took part in this process.
Especially Andrius, for all those sleepless nights we spent fixing weird
compiler errors.

Let's make this finally happen!

Ekaitz
Efraim Flashner wrote 8 months ago
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)
ZoV1cqT61lIlzPYQ@3900XT
On Wed, Jul 03, 2024 at 05:16:55PM +0200, Ekaitz Zarraga wrote:
Toggle quote (17 lines)
> Hi,
>
> Thanks to NlNet we have found a bootstrapping path for RISC-V 64 and we
> created an alternative `commencement.scm` draft that builds from source up
> to a GCC-9.
>
> At the moment, that GCC-9 does not provide C++ support in my Guix packages.
> I tried to add it but I had issues. We made it work for live-bootstrap
> (Andrius did), and now it's time to move that to Guix but it's getting a
> little bit difficult with GCC's build-system.
>
> I'm opening this issue to make the handover to Guix. I have already worked
> with Efraim and he agreed to continue with this work until it's upstreamed.
> Also Janneke is working on a version of this commencement module that adds
> support for x86, so we could use that for everything instead of relying in
> two different bootstrapping paths.

It may be possible that we end up diverging slightly in parts of the
bootstrap; glibc didn't get support for riscv64 until relatively
recently, although we will have to see about combining your work on
backporting (successfully!) riscv64 support to gcc-4.6.4 with the
existing version of 4.6.4 in commencement.scm. In reality I foresee it
with more comments in commencement.scm and some conditionals to try to
keep the different architectures working within the same packages.

Toggle quote (5 lines)
> This will take some time to integrate. There are a couple of packages that I
> didn't bootstrap yet (but it's possible to bootstrap them): `flex` and
> `bison`. Mostly because we wanted to fix
> <https://issues.guix.gnu.org/52311>, too.

Piece by piece, we'll get there :) Plus we have live-bootstrap to look
at for inspiration.

Toggle quote (28 lines)
> The Gash package is replaced with a non-bootstrapped Bash because there's an
> issue in Gash that hangs the bootstrapping process. We have reported it
> upstream. We should use Gash once the issue is fixed.
>
> Also, we only made the path until a modern GCC, not all the rest of it, that
> we should be able to reuse from the current `commencement.scm` module.
>
> This is the link to the repo:
>
> https://github.com/ekaitz-zarraga/commencement.scm
>
> I'm more than open to help Guix include the RISC-V bootstrapping process
> upstream, so if you have any question, suggestion or anything else, feel
> free to directly contact me.
>
> As a note, in this series of blogposts I shared the 2 year process until
> today, and almost everything is documented:
>
> https://ekaitz.elenq.tech/tag/bootstrapping-gcc-in-risc-v.html
>
> Also, I'd like to publicly thank everyone who took part in this process.
> Especially Andrius, for all those sleepless nights we spent fixing weird
> compiler errors.
>
> Let's make this finally happen!
>
> Ekaitz

So close!

I have a couple of changes I've worked on at
https://github.com/Millak/commencement.scmbut I'm also still working on
getting that modern GCC to build.

--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmaFdW8ACgkQQarn3Mo9
g1HEwRAAjT+QIh0RmziAu5l0eS1atk92vfnNRVaOwGsw8zGNiADoG73/D6JLl5QA
zQnCjrsADSaIYyZeFqskRj9eto2QIqNs0TT0LjdMe0a4tStRX9cHzTmWBLyzDOTM
KnTRckjGeEfWLhAJYjJsSv2T6DerrWCtbZLGCQV/nxlocNlMaYB2HDwyuvU85gKk
cdVS91/jHuTTVXEXI7ba1gNmlQq9lpdS64zFpveReNc8FLfCbM8f6X3IkwbIsCPc
anRR3efVJ4tsblxZBrsZYNRnJFVDSxyKnoa6nhFgDkhRnx/cBNhrdkrC7ZuB6gm1
QfRhE/UY9pxbjOYJ7ezrTM0WCMXGCZ2P7hkA3nEMCYt4Ck8pYHnyYoPbwUXRXvKT
t3IgDCDYA2WrjpDOi1sEH6hAyj1xaDUh5oTh4tY8JFbsEbW0yWLG56Z3KxkIMK6M
ZnJlzd3BFPTMqWcWzFGp3+UuZwSm/dzvPFR5N7Pr+GTDa8SwDfpwy6NuGY/Q/5x4
JBXfEoTK89iSwcpfe+JulIs+nqHkKeQhVqUnUbpkEVc+cJDEKDsTjVoq/tK9Kup2
FMT0ahW/GJJWkKwpuYRNO52Lmh2sWIwhigFc4z4T40FUdz9EPxojHRPbbjsfGSd0
LHwt6oRlRefS9r6MqTRM7kVGkdchQpTfV2E4CsFtphLom1X7AZs=
=LB1z
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71921@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71921
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help