From 95eeb895a5b34a53290a07e64fcd196be64f9242 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 7 Feb 2016 19:05:09 -0500 Subject: [PATCH] gdb: Change default solib search path Add /system/lib(64) and /system/vendor/lib(64) to the default solib search path so that system shared libraries are found. Error mentioned in issue #73. --- packages/gdb/build.sh | 1 + packages/gdb/gdb-solib.c.patch | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 packages/gdb/gdb-solib.c.patch diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index fbd73c4f..82023ff0 100755 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gdb/ TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages" TERMUX_PKG_DEPENDS="liblzma, libexpat, readline" TERMUX_PKG_VERSION=7.10.1 +TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz # gdb can not build with our normal --disable-static: https://sourceware.org/bugzilla/show_bug.cgi?id=15916 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-system-readline --with-curses --enable-static ac_cv_func_getpwent=no ac_cv_func_getpwnam=no" diff --git a/packages/gdb/gdb-solib.c.patch b/packages/gdb/gdb-solib.c.patch new file mode 100644 index 00000000..998b7ef0 --- /dev/null +++ b/packages/gdb/gdb-solib.c.patch @@ -0,0 +1,20 @@ +diff -u -r ../gdb-7.10.1/gdb/solib.c ./gdb/solib.c +--- ../gdb-7.10.1/gdb/solib.c 2015-12-05 10:16:45.000000000 -0500 ++++ ./gdb/solib.c 2016-02-07 17:29:11.431584611 -0500 +@@ -1703,6 +1703,16 @@ + add_alias_cmd ("solib-absolute-prefix", "sysroot", class_support, 0, + &showlist); + ++#ifdef __ANDROID__ ++ /* Termux modification to find system shared libraries. */ ++ solib_search_path = ++# ifdef __LP64__ ++ "/system/lib64:/system/vendor/lib64"; ++# else ++ "/system/lib:/system/vendor/lib"; ++# endif ++#endif ++ + add_setshow_optional_filename_cmd ("solib-search-path", class_support, + &solib_search_path, _("\ + Set the search path for loading non-absolute shared library symbol files."), -- 2.11.0