jruby icon indicating copy to clipboard operation
jruby copied to clipboard

Jruby supports a new architecture

Open Panxuefeng-loongson opened this issue 3 years ago • 2 comments

Hi all:

I want jruby to support a new architecture for Loongarch, Loongarch is a risc architecture. I try to compile jruby in LoongArch, but failed. Are there any prerequisites for jruby to support the new architecture? Thanks

Panxuefeng-loongson avatar Jun 28 '22 02:06 Panxuefeng-loongson

The main platform specific requirements would reside in the JNR project, specifically jffi: https://github.com/jnr/jffi

We would also want constants for the flavor of OS on Loongarch in jnr-constants: https://github.com/jnr/jffi

And other JNR projects may need tweaks for calling conventions in FFI, C function stereotypes, and so on. But it's not too difficult.

Within JRuby itself, we would need to add an entry for the architecture and if the operating system is exotic, and entry for the operating system as well. I assume you have a JVM that works on your platform so that is most of the challenge already solved.

I have not researched Loongarch very much yet, but I am familiar with Loongson MIPS running under Kylin Linux and we have made efforts to support it in JRuby. It would of course greatly help our efforts to support this platform if we had access to actual hardware. Perhaps you can recommend a way to do this?

headius avatar Jun 28 '22 08:06 headius

Thank you for your reply. In the jnr/jffi project, I have launched a pr: https://github.com/jnr/jffi/pull/125. This submission is just an attempt and may not be correct, please provide your valuable comments.

We have Loongarch machines in the GCC compile farm, see: https://cfarm.tetaneutral.net/machines/list/. Upstream already supports libffi loongarch port. I think many pre-dependencies already have. We intend to actively push jruby to support loongarch.

@theaoqi is our team leader, if I can't answer your question, he will also make constructive comments.

Panxuefeng-loongson avatar Jun 28 '22 09:06 Panxuefeng-loongson

Can we get this going again? I tried to wake up the jnr-ffi PR, which appears to have stalled due to an error. We would like to finish LoongArch support!

headius avatar Oct 17 '22 18:10 headius

Can we get this going again? I tried to wake up the jnr-ffi PR, which appears to have stalled due to an error. We would like to finish LoongArch support!

Hi:

The jnr-ffi test has all passed, I want you to review my patch. What do I need to do next to get the jruby loongarch port done?

Thanks

Panxuefeng-loongson avatar Oct 21 '22 06:10 Panxuefeng-loongson

I believe everything has been released and merged for LoongArch64 support in JRuby, yes? @Panxuefeng-loongson If there's any additional work needed, please open new issues or PRs. Everything currently merged and released will be included in JRuby 9.4.1.0.

headius avatar Jan 31 '23 23:01 headius

I am very sorry I forgot to follow up on this issue. If there's any additional work needed for LoongArch, I will open new issues or PRs. Now, I will close this issue.

Panxuefeng-loongson avatar Feb 01 '23 01:02 Panxuefeng-loongson