3 ms·
Why Android requires special support? Isn't it just linux with quite standard libc and ABI to interact with Java counterpart?
by ungzd 11y ago
Why Android requires special support? Isn't it just linux with quite standard libc and ABI to interact with Java counterpart?
- krschultz 11y agoAndroid 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.
- blasteye 11y agoIts not just quirks, but bionic doesn't support all the libc apis. For example, bionic does not support pthread_cancel.
- sspiff 11y agoIf 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.
- ewmailing 11y agoIn 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.
- pjmlp 11y agoNo, 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.
- jacquesm 11y agoGoogle has ripped out most of the stuff that would have made smart phones actual computers rather than smart terminals.
- pjmlp 11y agoIf 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.