So we have been observing weird issue(s) on arm that is apparently libunwind.a related when building program(s), e.g. gmic, with NDK r19b.
After some tests I found that seemingly libunwind.a is omitted / ignored during linking, if -lunwind is placed after -lm (which is the current default behaviour, as -lunwind is now linked via the "fake" libgcc.a linker script, while -lm is pulled in by "CXX" and hence placed right after -lc++ and before -lgcc).
On the other hand, I realized that the current libc++_shared.so does not have linkage to libm.so anymore (while my /system/lib/libc++.so does, if that's relevant).
So is this a bug of the libunwind.a? Or maybe the NDK toolchain? Or have we been doing something wrong?
Also, is the -lm still necessary with current libc++_shared.so?
Ref.: https://github.com/llvm-mirror/clang/blob/release_80/lib/Driver/ToolChains/Gnu.cpp#L475-L487
So we have been observing weird issue(s) on arm that is apparently
libunwind.arelated when building program(s), e.g.gmic, with NDK r19b.After some tests I found that seemingly
libunwind.ais omitted / ignored during linking, if-lunwindis placed after-lm(which is the current default behaviour, as-lunwindis now linked via the "fake"libgcc.alinker script, while-lmis pulled in by "CXX" and hence placed right after-lc++and before-lgcc).On the other hand, I realized that the current
libc++_shared.sodoes not have linkage tolibm.soanymore (while my/system/lib/libc++.sodoes, if that's relevant).So is this a bug of the
libunwind.a? Or maybe the NDK toolchain? Or have we been doing something wrong?Also, is the
-lmstill necessary with currentlibc++_shared.so?Ref.: https://github.com/llvm-mirror/clang/blob/release_80/lib/Driver/ToolChains/Gnu.cpp#L475-L487