From 2741d9ed50d6288366939917f5770e115e9bcaa0 Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Mon, 9 Mar 2020 20:23:08 -0700 Subject: Do not strip gdb binary Bug: https://github.com/android/ndk/issues/1173 Change-Id: I1748371baf4aea5952436864b9d217e668d856d4 --- ndk/checkbuild.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'ndk/checkbuild.py') diff --git a/ndk/checkbuild.py b/ndk/checkbuild.py index 72f1a3f18..32f6d2c0f 100755 --- a/ndk/checkbuild.py +++ b/ndk/checkbuild.py @@ -1132,18 +1132,11 @@ class Gdb(ndk.builds.Module): """Returns the lazily initialized gdb builder for this module.""" if self._gdb_builder is None: no_build_or_host = False - no_strip = False additional_flags = [] if self.host == ndk.hosts.Host.Darwin: # Awful Darwin hack. For some reason GDB doesn't produce a gdb # executable when using --build/--host. no_build_or_host = True - # -s caused mysterious linking error on old macOS like: - # "ld: internal error: atom not found in symbolIndex(...)" - # Seems old ld64 wrongly stripped some symbols. - # Remove this when build server upgrades to xcode 7.3 - # (ld64-264.3.101) or above. - no_strip = True additional_flags.append('-Wl,-rpath,@loader_path/../lib') if self.host == ndk.hosts.Host.Linux: additional_flags.append('-Wl,-rpath,$$$$\\ORIGIN/../lib') @@ -1156,7 +1149,9 @@ class Gdb(ndk.builds.Module): self.host, use_clang=True, no_build_or_host=no_build_or_host, - no_strip=no_strip, + # Since we statically link libpython, python dynamic libraries may + # depend on symbols in gdb binary. + no_strip=True, additional_flags=additional_flags) return self._gdb_builder -- cgit v1.2.3