depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+comment "gdb/gdbserver >= 8.x needs a toolchain w/ C++, gcc >= 4.8"
+ depends on BR2_PACKAGE_GDB_NEEDS_CXX11
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
config BR2_PACKAGE_GDB
bool "gdb"
depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG
depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_PACKAGE_GDB_NEEDS_CXX11
+ depends on BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_GDB_NEEDS_CXX11
# 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.
select BR2_PACKAGE_GDB_SERVER if \
(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_PACKAGE_GDB_NEEDS_CXX11
+ depends on BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_GDB_NEEDS_CXX11
help
GDB, the GNU Project debugger, allows you to see what is
going on `inside' another program while it executes -- or
default y
# The ARC version needs C++11, thus gcc >= 4.8, like gdb-8.0.x
depends on BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_arc
- depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_arc
depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
depends on !BR2_microblaze
depends on !BR2_nios2
config BR2_GDB_VERSION_8_0
bool "gdb 8.0.x"
# Needs a C++11 compiler
- depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_HOST_GCC_AT_LEAST_4_8
- depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
endchoice
endif
+# Tells whether the currently selected gdb version requires C++11
+# support in the toolchain. When host-gdb is not enabled, the target
+# gdb built is 7.11, which doesn't require C++11 support. So it's only
+# if host-gdb is built, with the version set to 8.0 that C++11 support
+# is needed in the toolchain to build gdb for the target.
+#
+# Even though this option is related to target gdb dependencies, we
+# keep it next to the BR2_GDB_VERSION so that they are kept in sync.
+config BR2_PACKAGE_GDB_NEEDS_CXX11
+ bool
+ default y if BR2_GDB_VERSION_8_0
+
# If cross-gdb is not enabled, the latest working version is chosen.
config BR2_GDB_VERSION
string