gdb: support building remote/cross gdb for host

gdbserver is already present in the image but a remote/cross gdb
for the target arch was missing.

Add this so we can easily remote-debug programs.

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2020-04-22 16:18:48 +02:00
parent 07fa29fdac
commit f699a62097

View File

@ -9,10 +9,11 @@ PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/gdb/" PKG_SITE="http://www.gnu.org/software/gdb/"
PKG_URL="https://ftp.gnu.org/gnu/gdb/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://ftp.gnu.org/gnu/gdb/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain zlib ncurses expat" PKG_DEPENDS_TARGET="toolchain zlib ncurses expat"
PKG_DEPENDS_HOST="toolchain:host zlib:host ncurses:host expat:host"
PKG_LONGDESC="GNU Project debugger, allows you to see what is going on inside another program while it executes." PKG_LONGDESC="GNU Project debugger, allows you to see what is going on inside another program while it executes."
PKG_BUILD_FLAGS="+size" PKG_BUILD_FLAGS="+size"
PKG_CONFIGURE_OPTS_TARGET="bash_cv_have_mbstate_t=set \ PKG_CONFIGURE_OPTS_COMMON="bash_cv_have_mbstate_t=set \
--disable-shared \ --disable-shared \
--enable-static \ --enable-static \
--with-auto-load-safe-path=/ \ --with-auto-load-safe-path=/ \
@ -22,7 +23,6 @@ PKG_CONFIGURE_OPTS_TARGET="bash_cv_have_mbstate_t=set \
--with-intel-pt=no \ --with-intel-pt=no \
--with-babeltrace=no \ --with-babeltrace=no \
--with-expat=yes \ --with-expat=yes \
--with-libexpat-prefix=${SYSROOT_PREFIX}/usr \
--disable-source-highlight \ --disable-source-highlight \
--disable-nls \ --disable-nls \
--disable-sim \ --disable-sim \
@ -36,6 +36,12 @@ PKG_CONFIGURE_OPTS_TARGET="bash_cv_have_mbstate_t=set \
--enable-libssp \ --enable-libssp \
--disable-werror" --disable-werror"
PKG_CONFIGURE_OPTS_TARGET="${PKG_CONFIGURE_OPTS_COMMON} \
--with-libexpat-prefix=${SYSROOT_PREFIX}/usr"
PKG_CONFIGURE_OPTS_HOST="${PKG_CONFIGURE_OPTS_COMMON} \
--target=${TARGET_NAME}"
pre_configure_target() { pre_configure_target() {
CC_FOR_BUILD="$HOST_CC" CC_FOR_BUILD="$HOST_CC"
CFLAGS_FOR_BUILD="$HOST_CFLAGS" CFLAGS_FOR_BUILD="$HOST_CFLAGS"