Support Loongarch64#1440
Conversation
|
libffi code have been merged into upstream, see: libffi/libffi@f259a6f. I have successfully built JNA based on it, tests pass all. Note: We have Loongarch machines in the GCC compile farm, see: https://cfarm.tetaneutral.net/machines/list/. I think you can build the Loongarch port code with it. |
|
Changes look sane -- there is one TODO in the code. Can you elaborate on if this is still uncertain? |
TODO where I am not very sure, I need to check with my colleagues. Thank you for your valuable comments! |
350c0c1 to
e5646c5
Compare
theaoqi
left a comment
There was a problem hiding this comment.
The change LGTM. I am not sure if we should wait for the libffi update which contains LoongArch.
| } | ||
| else if (Platform.ARCH.equals("loongarch64")) { | ||
| libc = "-gnuabi64"; // TODO: not sure | ||
| } |
There was a problem hiding this comment.
Maybe this could be removed, see https://github.com/loongson/jna/blob/ed826d277fedabbe44d54d392c1219c60c73f0ea/src/com/sun/jna/NativeLibrary.java#L987 . However checking again is suggested by me.
There was a problem hiding this comment.
The comment is outdated, you already did it.
matthiasblaesing
left a comment
There was a problem hiding this comment.
Thank you - generally looks sane to me. The build currently fails as no initial linux-loongarch64.jar is provided. Please initiate it from out-of-date.jar.
In the long run the embedded copy of libffi needs also be updated.
libffi just merged into upstream a few days ago, see: libffi/libffi@f259a6f and jna needs to sync with it. By the way, I think linux-loongarch64.jar has been initialized in build.xml,see: |
It is, if a breaking change of the native interface would have been detected. This is not the case. You need to add the empty file by hand. Have a look at the unittests attached to this PR, which all fail because of this. |
e5646c5 to
44210ec
Compare
|
Hi, @matthiasblaesing . Thank you for your advice, I realized my mistake and fixed it. |
|
Thanks for the update. I have one (maybe two) last request(s) before this good to go in:
|
91ebb08 to
ac553b8
Compare
| -------- | ||
| * [#1433](https://github.com/java-native-access/jna/pull/1433): Add `CFEqual`, `CFDictionaryRef.ByReference`, `CFStringRef.ByReference` to `c.s.j.p.mac.CoreFoundation` - [@shalupov](https://github.com/shalupov) | ||
| * [#978](https://github.com/java-native-access/jna/issues/978): Remove use of finalizers in JNA and improve concurrency for `Memory`, `CallbackReference` and `NativeLibrary` - [@matthiasblaesing](https://github.com/matthiasblaesing). | ||
| * [#1440](https://github.com/java-native-access/jna/pull/1440): Support Loongarch64 - [@Panxuefeng-loongson](https://github.com/Panxuefeng-loongson). |
There was a problem hiding this comment.
“Support for LoongArch64” may be better.
There was a problem hiding this comment.
“Support for LoongArch64” may be better.
Done.
2d84162 to
b0d9853
Compare
Co-Authored-By: Ao Qi <[email protected]>
b0d9853 to
0066b08
Compare
|
Looks good to me. Thank you. |
1 similar comment
|
Looks good to me. Thank you. |
Co-Authored-By: Ao Qi