Dear Maintainer, we have a package to cross compile RISC-V 64-bit (gcc-riscv64-linux-gnu). Could you, please, also provide a similar package to cross compile RISC-V 32-bit. This package is needed when developing software for 32-bit embedded RISC-V systems. Best regards Heinrich Schuchardt
Hello, providing a gcc-riscv32-linux-gnu cross-compiler in Debian unfortunately isn't possible yet as upstream glibc currently has only support for riscv64, but not for riscv32. Making predictions about the future is obviously difficult, but from looking at the current state of development I would guess that riscv32 support probably won't make it into the glibc 2.28 release which is planned for August 1, 2018, so we are probably talking about a timeframe of "sometime in 2019". I'm CCing the debian-riscv list in case somebody there should have further insights regarding riscv32 support in glibc. Regards, Karsten
I think Heinrich was looking for a bare-metal compiler for microcontroller-class RISC-V rather than one for a hypothetical Debian riscv32 port?
In that case gcc-default-ports is probably the wrong package. Someone has to package it as a different package similar to gcc-arm-none-eabi.
On Fri, 20 Apr 2018 10:22:05 +0200 Aurelien Jarno <aurelien@aurel32.net> wrote: So this should actually be an RFP class bug? Should this one be converted or closed and another one opened?
Control: reassign -1 wnpp Control: retitle -1 RFP: gcc-riscv32-none -- GCC cross compiler for 32-bit RISC-V processors Converting the current bug into an RFP sounds like the right answer. Heinrich, gcc-defaults-ports is for cross-compilers for full Debian architectures, not for bare metal cross-compilers. If you want a 32-bit RISC-V bare metal toolchain within Debian, we suggest that you look at gcc-arm-none-eabi and the mentors page, if you file a request for sponsorship, please XCC it to the debian-riscv list: https://mentors.debian.net/intro-maintainers https://lists.debian.org/debian-riscv/ https://www.debian.org/Bugs/Reporting#xcc
If there is still interest in having this package in Debian (which I think should be called gcc-riscv32-elf if it's to produce ELF binaries), I think I'm well-suited to take this on given I already maintain gcc-sh- elf. It's true that we can't package every cross toolchain, but I think RISC V is pretty special in the free software ecosystem, and I hope this is welcome in the Electronics Team. Note that Binutils is not packaged yet; that will be needed, and I can open an ITP if this mail is received favorably. I anticipate that an ISO C standard library will be wanted. I can make the package build Newlib and a GDB simulator, just as I've done for gcc- sh-elf, in a bootstrappable way. If this is so welcome, would someone from the Electronics Team make me empty Git repos at https://salsa.debian.org/electronics-team/toolchains/binutils-riscv32-elf and https://salsa.debian.org/electronics-team/toolchains/gcc-riscv32-elf respectively? If anyone would like to co-maintain it, help writing autopkgtests, offer words of support, or is looking to learn, do feel free to contact me.
Are the rv32 multi-lib targets in gcc-riscv64-unknown-elf enough here? Keith Packard (CCed) is the maintainer, but I expect they would welcome you and or the electronics team helping with the package. $ riscv64-unknown-elf-gcc -print-multi-lib | grep rv32 rv32e/ilp32e;@march=rv32e@mabi=ilp32e rv32ea/ilp32e;@march=rv32ea@mabi=ilp32e rv32em/ilp32e;@march=rv32em@mabi=ilp32e rv32eac/ilp32e;@march=rv32eac@mabi=ilp32e rv32emac/ilp32e;@march=rv32emac@mabi=ilp32e rv32i/ilp32;@march=rv32i@mabi=ilp32 rv32ia/ilp32;@march=rv32ia@mabi=ilp32 rv32im/ilp32;@march=rv32im@mabi=ilp32 rv32if/ilp32f;@march=rv32if@mabi=ilp32f rv32ifd/ilp32d;@march=rv32ifd@mabi=ilp32d rv32iaf/ilp32f;@march=rv32iaf@mabi=ilp32f rv32iafd/ilp32d;@march=rv32iafd@mabi=ilp32d rv32imf/ilp32f;@march=rv32imf@mabi=ilp32f rv32imfd/ilp32d;@march=rv32imfd@mabi=ilp32d rv32iac/ilp32;@march=rv32iac@mabi=ilp32 rv32imac/ilp32;@march=rv32imac@mabi=ilp32 rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f rv32imafdc/ilp32d;@march=rv32imafdc@mabi=ilp32d
Paul Wise <pabs@debian.org> writes: The triplet is riscv64-unknown-elf because the default target is a 64-bit one, but (as you can see), the toolchain supports both 32- and 64- bit ISAs. I'd love help packaging this; I'm no longer working with risc-v on a regular basis, so I haven't been keeping track of the current 'popular' compiler versions out there. It might be sufficient to simply use the standard Debian GCC source package at this point though? That would probably be far easier to keep current than the previous plan of tracking the SiFive toolchain versions.
Hi, is there still interest into getting this into Debian? I am wondering what the current state is /which blockers exist. This was prompted by wanting to develop on the riscv core on the raspberry pi 2 pico; and having to download a thirdparty toolchain, which is not ideal. I'd be willing to help. best, werdahias
Hi, is there still interest into getting this into Debian? I am wondering what the current state is /which blockers exist. This was prompted by wanting to develop on the riscv core on the raspberry pi 2 pico; and having to download a thirdparty toolchain, which is not ideal. I'd be willing to help. best, werdahias
The riscv64-unknown-elf toolchain is already in Debian and works fine? What are you looking for here?
The riscv64-unknown-elf toolchain is already in Debian and works fine? What are you looking for here?
10.12.2025 01:48:19 Keith Packard <keithp@keithp.com>: Hi Keith, this is true. However, the *riscv32* one is not in the archive. Unless I am missing something here, this is what this bugreport is about, right? best, werdahias PS: Excuse the brevity, sent from mobile
10.12.2025 01:48:19 Keith Packard <keithp@keithp.com>: Hi Keith, this is true. However, the *riscv32* one is not in the archive. Unless I am missing something here, this is what this bugreport is about, right? best, werdahias PS: Excuse the brevity, sent from mobile
The riscv64 version supports both 32- and 64- bit isas as multilib variants; the '64' just indicates what the default ISA is.
The riscv64 version supports both 32- and 64- bit isas as multilib variants; the '64' just indicates what the default ISA is.