Hi All,
> Search the list for riscv32. I remember someone is working on this.
I've been (slowly) working on a rv32 tcc port (git repo here:
https://github.com/sellicott/tcc-riscv32)The current status of the project
is work-in-progress.
It's finished enough to compile and link simple "hello world" type programs
on a rv32 emulator. I'm currently working through getting all the tests to
pass then bootstrap the compiler with itself. (right now I'm working on a
bug with the ternary operator)
The cross compiler isn't completely broken, but it still breaks somewhere
in the microcontroller hardware initialization code before main on an
esp32c3 microcontroller.
For now I am planning on getting the native compiler fully functional
before working any more on the cross compiler.

> I cannot find a linux/debian/bsd distribution that supports riscv32.
> This makes it a little more difficult to support this.
As for this, I had to make an openembedded image for rv32 linux to build
the native version of rv32 tcc. Unfortunately buildroot won't work since
the project doesn't have an option to build a native version of gcc to run
inside the emulator.
The process for building the image is slow and takes up way too much disk
space for my liking but instructions are here (
https://github.com/riscv/meta-riscv). At that point you also need to build
in git and gcc into the image so that you can clone and build the tcc port
natively.
If you just want to play with the tcc cross compiler, that is much easier.
I have notes for that here: (
https://github.com/cnlohr/espwebc3/blob/main/docs/notes.md#tcc-port-to-riscv32
)

Hopefully this is helpful.
-Sam Ellicott
Soli Deo Gloria
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to