Re: [dev] Status of compilers that suck less for riscv

2022-02-27 Thread Josuah Demangeon
> > What are some compilers for riscv architecture that suck less?
> Short answer: not for now, but I wish I would!

I should reword: I do not *know* any for now, but maybe there are some around!

Like this work for TCC: https://github.com/sellicott/tcc-riscv32
or maybe other small projects like this one: https://github.com/jserv/shecc



Re: [dev] Status of compilers that suck less for riscv

2022-02-27 Thread Josuah Demangeon
> I need support for riscv32. 

By the way, I am curious about what you are working on.



Re: [dev] Status of compilers that suck less for riscv

2022-02-27 Thread Josuah Demangeon
> What are some compilers for riscv architecture that suck less?
> I checked the 5 mentioned on suckless website and only tcc has riscv64 files 
> in it.
> I need support for riscv32. 

Short answer: not for now, but I wish I would!

For cross-compiling for embedded, I tried riscv64-unknown-elf-gcc
(which might be riscv32-unknown-elf-gcc on other systems).

It is as good and bad as GCC can be. Bugs (or me using it wrong?)
led me to try LLVM/Clang.

Clang, the other elephant in the room also worked, slightly better,
but it is also much known for its very large code base, taking ages
to compile.

After a while night compiling clang, all I could get is:

[ 83%] Linking CXX executable ../../bin/llvm-lto
ld: error: undefined symbol: llvm::PassBuilder::OptimizationLevel::O0

Therefore, if I do a full clean rebuild of everything, I need to wait
another night to get the next error.

The LLVM people might each have a $1 computer/server or have
robust patience.

I have not looked much further for now (getting ARM devices to blink
for now).

If I encounter something saner, I will let you know here.