diff --git a/package/gdb/Config.in b/package/gdb/Config.in index daad6c910d..8923f996eb 100644 --- a/package/gdb/Config.in +++ b/package/gdb/Config.in @@ -19,6 +19,7 @@ config BR2_PACKAGE_GDB depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ZLIB # When the external toolchain gdbserver is copied to the # target, we don't allow building a separate gdbserver. The # one from the external toolchain should be used. diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 9bde2beea1..b6a3e2f623 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -47,7 +47,8 @@ endif # also need ncurses. # As for libiberty, gdb may use a system-installed one if present, so # we must ensure ours is installed first. -HOST_GDB_DEPENDENCIES = host-expat host-libiberty host-ncurses +GDB_DEPENDENCIES = zlib +HOST_GDB_DEPENDENCIES = host-expat host-libiberty host-ncurses host-zlib # Disable building documentation GDB_MAKE_OPTS += MAKEINFO=true @@ -145,6 +146,7 @@ GDB_CONF_OPTS = \ --disable-sim \ $(GDB_DISABLE_BINUTILS_CONF_OPTS) \ --without-included-gettext \ + --with-system-zlib \ --disable-werror \ --enable-static \ --without-mpfr @@ -228,13 +230,6 @@ else GDB_CONF_OPTS += --without-lzma endif -ifeq ($(BR2_PACKAGE_ZLIB),y) -GDB_CONF_OPTS += --with-zlib -GDB_DEPENDENCIES += zlib -else -GDB_CONF_OPTS += --without-zlib -endif - ifeq ($(BR2_PACKAGE_GDB_PYTHON),) # This removes some unneeded Python scripts and XML target description # files that are not useful for a normal usage of the debugger. @@ -272,6 +267,7 @@ HOST_GDB_CONF_OPTS = \ --enable-threads \ --disable-werror \ --without-included-gettext \ + --with-system-zlib \ --with-curses \ --without-mpfr \ $(GDB_DISABLE_BINUTILS_CONF_OPTS)