فهرست منبع

package/gdb: invert the logic to add the dependency on gmp

The handling of the GMP dependency needs a bit of change. Until now,
the GMP dependency was needed when building full GDB (host or target)
in version 11.x or 12.x, so we were explicitly checking whether those
versions were enabled.

Now that only GDB 10.x and the ARC-specific version of GDB are the
only remaining ones not needing GMP, we invert the logic: only those
two versions do not trigger the addition of the GMP dependency.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Thomas Petazzoni 3 سال پیش
والد
کامیت
7b977af16e
2فایلهای تغییر یافته به همراه8 افزوده شده و 9 حذف شده
  1. 1 2
      package/gdb/Config.in
  2. 7 7
      package/gdb/gdb.mk

+ 1 - 2
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"

+ 7 - 7
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