adoptium / infrastructure

This repo contains all information about machine maintenance.
Apache License 2.0
84 stars 100 forks source link

Update RISC-V base image to 24.04 #3637

Open luhenry opened 4 days ago

luhenry commented 4 days ago

Currently, riscv64 docker image are based on Ubuntu 20.04. That is to use the earliest available glibc version available for RISC-V, to guarantee broadest compatibility on other distributions. However, this leads to using an ancient GCC compiler (GCC 10) which misses all optimizations and development of GCC 11, 12, 13 and 14.

RISC-V being such a rapidly evolving architecture and SW ecosystem, I want to propose the use of Ubuntu 24.04 as the base image for building Eclipse Temurin on RISC-V. Ubuntu 24.04 is IMO the right target as it has the same glibc version as Fedora 40 (glibc 2.39; https://packages.fedoraproject.org/pkgs/glibc/glibc/; https://packages.ubuntu.com/noble/libc6), distribution which is going to be the base for AlmaLinux 10 and RockyLinux 10.

This update would give us access to GCC 14, which fixes some of the limitations we're running into with older GCC versions, among which: dependency on libatomic, absence of autovectorization, poor bitmanip optimizations, and overall worst code generation.

luhenry commented 4 days ago

cc @sxa @gdams

sxa commented 3 days ago

If the only reason is to get newer gcc functionality then My preference would very much be to do the same as we do on all other linux platforms i.e. build a custom gcc or (ideally, since we're doing this for most Linuxes now) use a devkit build for this.