On 26/12/15 13:48, David Chisnall wrote:
> I think that libobjc2 should now work as well - let me know if it doesn’t.

David,

I've checked out and built libobjc2 for Android. First, I've checked out
branch 1.8.1 [1], and applied some (mostly cosmetic) fixes [2] to make
it build-able for Android by CrystaX NDK. Mostly it was fixes of
compiler warnings, but also I've added back old Makefile, with some
fixes, since generating proper Makefile with cmake looks really tricky
for Android - cmake just don't understand that host and target systems
are different and generate Makefile for host system, even though I've
provided proper CC, CFLAGS, LDFLAGS, etc. So right now bringing back old
good Makefile looks better for me than fighting with cmake.

So, having libobjc2 built for Android, I've compiled and run simple test
[3], just to verify that Objective-C runtime works properly. It works
fine on my ARM Android devices.

Then, I've switched to 'master' branch of libobjc2 repository, and
applied patch [2] on top of it. It required small additions, which makes
no sense to specify here, just because it was trivial, but after that,
when libobjc2 was built from 'master' sources, that simple test started
crashing on my ARM Android devices. Call stack of crash [4] is bit
unclear though. As you can see there, it crashes somewhere inside
objc_msgSend_fpret.

As far as I see, there are many commits between 1.8.1 and master. I'm
going to find one, causing this crash. However, I thought it might be
interesting to you to get feedback on this stage too.


[1] https://github.com/gnustep/libobjc2/tree/1.8.1
[2]
https://github.com/crystax/android-vendor-libobjc2/commit/a10757ac479704faac2b2fa32e9b0150b2a8aa8b
[3]
https://github.com/crystax/android-platform-ndk/blob/master/tests/device/crystax-test-objc-runtime/jni/test.m
[4] https://gist.github.com/dmcrystax/bb2c7e1c3c79e45c039d

P.S. Please note that this is clear Objective-C code, i.e. no yet
Objective-C++ things involved.

-- 
Dmitry Moskalchuk

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to