SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones. To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
dlopen()ing NULL (the main program) and dlsym()ing on that handle does
not work on Android as in GNU/Linux. So don't bother with that, just
call dlsym(RTLD_DEFAULT, symbol) instead.
But, it doesn't help, it won't find the type_infos anyway, as they are
weak symbols and the dlsym() at least in Android 4.0 does not like
weak symbols, "Symbol is not global."
So the fallback branch that dynamically generates a type_info, which
normally should get used only for inter-process UNO (and thus
presumably never on Android) is taken instead.
But, that didn't work either at least with NDK r7 thanks to a bug in
its libgnustl_shared.so. But we now patch that at run-time in
android_main() in sal/osl/android/jni/lo-bootstrap.c.
Are we having fun yet?
This commit for the old build system. (Don't bother for components not
relevant for Android.)
The Android package installer (as invoked through "adb install", from
"ant debug install") silently ignores native libraries in app packages
(.apk files) whose names don't start with "lib" and end with ".so".
The package builder (as invoked through "ant debug") in the SDK gladly
includes also thusly named native libraries in the .apk, though. Yay
for consistency.
The inline assembly code executes a function call and functions are
free to use eax, ecx and edx without preservation. We must thus mark
ecx as a clobber register.
Unlikely to work yet, but at least builds for the simulator.
We can not use dynamic code generation on iOS, so we use a fixed set
of code snippets, genertated by a Perl script. Experimentation seems
to indicate that a relatively small set of static code snippets should
be enough in simple use cases with no extensions (that we can't really
support on iOS anyway) and stuff.
Except for the static set of snippets the code mostly is, or will be,
an ifdefified combination of the gcc3_linux_arm and gcc3_macosx_intel
code. The ABI on iOS ARM devices should be quite close to that on
Linux ARM, knock on wood.