diff options
author | Max Kellermann <max@musicpd.org> | 2019-05-03 20:15:30 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-05-03 20:15:50 +0200 |
commit | 36dec47bf70421733ac50c53f75a342752b777ff (patch) | |
tree | ee026b6a28d6a334d829f19811f0c41c54f61bfd /android/build.py | |
parent | 478cedcadf4b45c325d9ed54481a13f13023c0b5 (diff) |
android/build.py: link ARMv7 binary with libunwind
Fixes nullptr dereference when an exception gets thrown because there
is no ".eh_frame" section for unwinding.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/543
Diffstat (limited to 'android/build.py')
-rwxr-xr-x | android/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/android/build.py b/android/build.py index 842784d49..23ec9f256 100755 --- a/android/build.py +++ b/android/build.py @@ -138,6 +138,12 @@ class AndroidNdkToolchain: libstdcxx_ldflags = libstdcxx_flags + ' -L' + libcxx_libs_path libstdcxx_libs = '-lc++_static -lc++abi' + if self.is_armv7: + # On 32 bit ARM, clang generates no ".eh_frame" section; + # instead, the LLVM unwinder library is used for unwinding + # the stack after a C++ exception was thrown + libstdcxx_libs += ' -lunwind' + if use_cxx: self.cxxflags += ' ' + libstdcxx_cxxflags self.ldflags += ' ' + libstdcxx_ldflags |