| 4 Apr 2024 |
Julien | And the pioneer is a no go ? | 09:36:50 |
Pratham Patel | In reply to @julienmalka:matrix.org And the pioneer is a no go ? Yes. | 09:37:02 |
Pratham Patel | All machines with the C910 core are only good for test builds and cannot be "trusted" (not in context of a backdoor but it is not compliant to the spec). | 09:38:00 |
Pratham Patel | The "v2" of C920 is supposed to be more compliant with the spec but no one has had hands-on with it yet. | 09:38:48 |
| @shalokshalom:kde.org joined the room. | 10:05:05 |
@shalokshalom:kde.org | Hi there. I heard about the attempts to bootstrap the GHC on NixOS RISC-V. I guess you tried the LLVM backend? Sorry if thats a bit naive, I guess there is a very good reason, why this wouldnt work. The Github ticket around this issue also mentions, that this is possible. Is the backend not capable to compile itself? | 10:31:29 |
@shalokshalom:kde.org | * Hi there. I heard about the attempts to bootstrap the GHC on NixOS RISC-V. I guess you tried the LLVM backend? Sorry if thats a bit naive, I guess there is a very good reason, why this wouldnt work. The Github ticket around this issue also mentions, that this is possible. Is the LLVM backend not capable to compile GHC? | 10:32:42 |
@shalokshalom:kde.org | I do see the GraalVM also as a potential tool to bootstrap Haskell on RISC-V, although I havent tried that yet. They provide both JIT and compiled (they call it native image) methods to run on RISC-V, and Haskell supposedly runs on it with the Sulong implementation.
Just wanted to drop it, in case someone didnt knew about that yet (sorry if obviously not helpful, as said.) | 10:37:16 |
Steven Keuchel | You can always build GHC with an unregisterised backend (via C), and use that to bootstrap. But that is painfully slow. There is no NCG backend and not runtime linker yet, but that's in progress. The LLVM backend "works" as of 9.6 (or 9.4 with newer llvm like in debian). | 10:39:52 |
| @eyjhb:eyjhb.dk joined the room. | 11:21:01 |
Alex | In reply to @skeuchel:matrix.org You can always build GHC with an unregisterised backend (via C), and use that to bootstrap. But that is painfully slow. There is no NCG backend and not runtime linker yet, but that's in progress. The LLVM backend "works" as of 9.6 (or 9.4 with newer llvm like in debian). In my testing using an unregisterised boot GHC, it usually takes around 20 hours to natively build GHC on the JH7110 SoC. Longer if other builds are running in parallel (I've had one GHC build take ~35 hours).
I can't comment on how much faster registerised via LLVM is because my registerised builds keep segfaulting... | 12:19:51 |
Steven Keuchel | Here are my estimates
On the pioneer:
Unregisterised release+profiled_libs: >30h
Unregisterised quick+no_profiled_libs: 18h
Registerised release+profiled_libs: 12h
Registerised quick+no_profiled_libs: 9h
Using qemu user-mode
Registerised release+profiled_libs: 8h
Registerised quick+no_profiled_libs: 6h
| 12:24:11 |
Alex | GHC is quite tricky to compile, so I'd be pleasantly surprised if Sulong were capable of handling it.
Historically, using Hugs to run GHC on itself has been an option, but AFAIK Hugs doesn't support 64-bit ISAs and it also has a relatively low limit on program size that makes bootstrapping GHC even on x86 a nightmare. I don't know what it would take to support RV64GC and I haven't explored patching Hugs to raise the program size limitations. | 12:24:58 |
Alex | Also Hugs requires an ancient version of GCC. | 12:25:47 |