<Na_Klar>
I'm comming further with my try to port crystal to riscv. I use the bootstrap script and everything compiled fine so far execpt crystal won't. this is the log: https://paste.debian.net/1232285/ .. unfortunately the ruby error is not saying anything sane. what can I do here?
<Na_Klar>
.. looks to me like there is a memory issue with the C module ..
<Na_Klar>
ah no, it seems like it is a target triple problem again. the relevant ruby error line say: Unable to find target for this triple (no targets are registered). For compiling llvm and gems I had to use ./configure --build=riscv64-unknown-linux-gnu to workaround auto-guessing the target. seems like the ruby compiler also expects a triple, which it couldn't find, but irritating is that there seems no target to be registered at all ..
<FromGitter>
<Blacksmoke16> Rust also uses LLVM, so the target triple should be the same, assuming you know/figure out which one to use
<Na_Klar>
llvm-config on that machine gave the triple above. with that I could compile llvm (from the bootstrap script) as well as gems. (both needed to be configured with the target, because auto-guessing failed.)
<FromGitter>
<Blacksmoke16> ah gotcha
<Na_Klar>
but now it is the script which compiles crystal which fails with the pasted error. the error implies that there is not target registered and no target found.
<FromGitter>
<Blacksmoke16> what if you just try cross compiling?
<Na_Klar>
when I look into the code it seems like a C. module is trying to set some pointer in the memory .. dunno what that have to do with targets ...
<Na_Klar>
I could try that now, since I have a little more knowledge about how that works, but my original aim was to bootstrap crystal to at least 0.3 ..
<FromGitter>
<Blacksmoke16> in theory you should just be able to use your local crystal, cross compile it to that target, move some files over there, link it, and be good to go
ua__ has joined #crystal-lang
ua_ has quit [Ping timeout: 240 seconds]
<FromGitter>
<Blacksmoke16> which should give you current version crystal on it
<FromGitter>
<Blacksmoke16> which could be used to play around with bindings and stuff to get it to compile itself
<Na_Klar>
hm, a first quick try to cross-compile resulted in Unsupported architecture for target triple ..
<FromGitter>
<Blacksmoke16> welp, guess theres some groundwork required for that to work then
<Na_Klar>
llvm is version 7.0.1 .. since which version does llvm support riscv64 again? (not sure, was it 9?)