Closed ZenithalHourlyRate closed 2 years ago
Check whether -lgcc
exists via searching for function __ashlsi3
.
It has been tested under rv32/64-gcc/clang and all can compile correctly.
Thanks!
Incidentally, none of my libgcc
s have __ashlsi3
--which makes sense, since all RISC-V base ISAs have an instruction for left-shifting by 32 bits. So this doesn't work for me.
But all of my libgcc
s have __divdc3
(division of double _Complex
), and ISA support for that operation is not forthcoming, so I'll use that.
Nevermind, that doesn't work for unrelated reasons. But I think searching for both __ashldi3
and __ashlti3
does work (the former suffices for RV32 and the latter for RV64).
Manually merged via c7e75bf944957e58f16531eb6b8d118a92069346
For Clang/LLVM user with NO cross gcc installed, there is no libgcc available; At this time user can manually export LIBS=-lclang-rt.
For cross gcc user, -lgcc is usually added by the compiler thus there is no need to add this flag in config file. Only when -nostdlib/-nodefaultlibs is specified should we add -lgcc, which is not the case here.
This compiles on a machine with cross gcc installed and another machine with only clang. However, only rv64 is tested.
Note: ./configure not re-generated w.r.t #263