diff --git a/package/gdb/Config.in b/package/gdb/Config.in index c50c3d517a..273b3072ae 100644 --- a/package/gdb/Config.in +++ b/package/gdb/Config.in @@ -51,8 +51,7 @@ config BR2_PACKAGE_GDB_DEBUGGER bool "full debugger" depends on BR2_USE_WCHAR depends on !BR2_sh - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_11 - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_12 + select BR2_PACKAGE_GMP if !BR2_GDB_VERSION_10 && !BR2_arc select BR2_PACKAGE_NCURSES comment "full gdb on target needs a toolchain w/ wchar" diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index dd126b42ce..d2bbfcb290 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -65,8 +65,9 @@ GDB_DEPENDENCIES += host-flex host-bison HOST_GDB_DEPENDENCIES += host-flex host-bison endif -# Add the necessary host-gmp dependency for the newer releases of GDB -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12),y) +# All newer versions of GDB need host-gmp, so it's only for older +# versions that the dependency can be avoided. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc),) HOST_GDB_DEPENDENCIES += host-gmp endif @@ -154,11 +155,10 @@ GDB_CONF_OPTS += \ --without-curses endif -# When GDB >= 11.x (because it's enabled for the host) and we're -# building the full gdb for the target, we need gmp as a -# dependency. For now the default gdb version in Buildroot doesn't -# require gmp. -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12):$(BR2_PACKAGE_GDB_DEBUGGER),y:y) +# Starting from GDB 11.x, gmp is needed as a dependency to build full +# gdb. So we avoid the dependency only for GDB 10.x and the special +# version used on ARC. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc):$(BR2_PACKAGE_GDB_DEBUGGER),:y) GDB_CONF_OPTS += \ --with-libgmp-prefix=$(STAGING_DIR)/usr GDB_DEPENDENCIES += gmp