From 149ed404d22d6f2bae40c81a212ce479b90a1450 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 26 Jan 2025 12:32:30 +0100 Subject: [PATCH] package/gdb: change the default to GDB 15.x This requires a bit of trickery on BR2_GDB_VERSION. Indeed, when the target variant of gdb is enabled, but not the host variant, the version choice is not available, and a default version is used. However, version 15.x, which is now the default, requires GCC >= 9, so we have to be careful and use GDB 15.x by default if the toolchain has GCC >= 9, or stick to GDB 14.x otherwise. Of course, that will not fly long term, as at some point we'll drop gdb 14.x, but for the time being, let's default to this older gdb release if the target compiler is too old. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- package/gdb/Config.in.host | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 1d718257c6..699c6a96c4 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM choice prompt "GDB debugger Version" - default BR2_GDB_VERSION_14 + default BR2_GDB_VERSION_15 depends on !BR2_arc help Select the version of gdb you wish to use. @@ -73,7 +73,7 @@ config BR2_GDB_VERSION string default "arc-2023.09-release" if BR2_arc default "13.2" if BR2_GDB_VERSION_13 - default "14.2" if BR2_GDB_VERSION_14 || !BR2_PACKAGE_HOST_GDB - default "15.1" if BR2_GDB_VERSION_15 + default "14.2" if BR2_GDB_VERSION_14 || (!BR2_PACKAGE_HOST_GDB && !BR2_TOOLCHAIN_GCC_AT_LEAST_9) + default "15.1" if BR2_GDB_VERSION_15 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9) default "16.1" if BR2_GDB_VERSION_16 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB