Hacker News new | ask | show | jobs
by ungzd 3767 days ago
Why Android requires special support? Isn't it just linux with quite standard libc and ABI to interact with Java counterpart?
3 comments

If you look at the changes, you'll see most things are pretty simple:

* CMake files are expanded to handle an Android target.

* Code that checks for specific defines or values like __FREEBSD__ || __LINUX__ now have an added condition to also check for __ANDROID__.

* Some tooling scripts to integrate adb into the Swift SDK.

* Some minor fixes elsewhere.

So, special support is a really minimal set of changes that any platform would need.

In addition to the Bionic short-comings already mentioned here, there appears to be other work to deal with the fact that things must be cross-compiled in a way that you can build a compiler for your host machine, but generate Android binaries (and for each architecture).

Also, there are also a bunch of support things for libICU which is not an official component on Android we are allowed.

Android uses Bionic libc which has its quirks. The Android kernel also has several patches that were at one time quite controversial, though many have moved upstream to the mainline.
Its not just quirks, but bionic doesn't support all the libc apis. For example, bionic does not support pthread_cancel.
No, for example UNIX IPC isn't available.

Google has ripped most of the stuff they see as fluff for Android.

Edit: Any C and C++ API not listed as stable and public on the NDK docs is not guaranteed to exist in all devices.

Google has ripped out most of the stuff that would have made smart phones actual computers rather than smart terminals.
If you think of C and C++ point of view, yes.

On the other hand the Frameworks are quite expressive for applications, but one needs to use Java 6.5 or resort to third party solutions like retrolambda and Kotlin.