Contribution Announcement: Kotlin/Native supportin...
# kontributors
a
Contribution Announcement: Kotlin/Native supporting RiscV https://youtrack.jetbrains.com/issue/KT-43854/Kotlin-Native-Linux-RISC-V-targets I just wanted to inform you, that I am writing my master thesis (final thesis of a university degree in germany) about my experience in extending the Kotlin/Native compiler to support RiscV and how I made it work. I am not really allowed to get support on that, except on tipps and hints, but the final document has to be written by my own. I am not sure, when I am allowed to release the output. I will clarify this with my contact at university. If i manage to support Kotlin/Native for RiscV processors, I will publish the result in the form of a PR. Thats what we agreed from beginning on. Current State: Added
linux_riscv
as native target Added cross-compile-toolchain (but not generated with the kotlin-native/tools/toolchain_builder/ utils. Its pretty outdated and I could not make it work within a few days, which I set as time constraint to test that) Compiled the Runtime for RiscV target + compiled stdlib for RiscV target Compiled a Hello World application as executable and executed it on Qemu ☑️ But, I had to increase the Linker version, since all dependencies were build with the ‘relaxation’ feature, which is not supported by the current Linker (ld.lld 11.1.0) ➡️ Therefore I built a newer version of the LLVM Backend and used its Linker which resulted in a working Hello World Executable for RiscV 👨‍💻 Currently I am working on writing the thesis • basics • important concepts • rough explanation how Kotlin/Native compiler works • what changes I had to apply • which challenges occurred • … and I am still • experimenting with compile flags • trying to use no relaxation for the entire build to avoid updating the Linker • trying to upgrade the llvm backend so that the linker does not have to be increased individually • testing if all expected stdlib functions are working • … For my final Contribution PR I will have to get in contact with the Jetbrains Kotlin Team how a newer Linker can be provided (independent of entire LLVM-Dependency) and how the Cross-compile-toolchain can be provided.
🎉 5
s
Hi!
For my final Contribution PR I will have to get in contact with the Jetbrains Kotlin Team how a newer Linker can be provided (independent of entire LLVM-Dependency) and how the Cross-compile-toolchain can be provided.
Please contact me for that.
1
a
I am going to, when I create the PR or I am having questions before that 🙂
👍 1