gdb: unbreak 7.12 target gdb/gdbserver build without C++ support
authorPeter Korsgaard <peter@korsgaard.com>
Sun, 22 Jan 2017 19:17:09 +0000 (20:17 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 23 Jan 2017 22:07:39 +0000 (23:07 +0100)
gdb 7.12+ by default builds with a C++ compiler, which naturally doesn't
work when we don't have C++ support in the toolchain.

Fix it by passing --disable-build-with-cxx for such setups.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gdb/gdb.mk

index ea27d0c6eb93da8fccd6942aa9d1069a9508ca5a..606f1f96001b5ea3bee0047ded2c0574e87f45da 100644 (file)
@@ -107,6 +107,12 @@ ifeq ($(BR2_arc),y)
 GDB_CONF_OPTS += --disable-build-with-cxx
 endif
 
+# gdb 7.12+ by default builds with a C++ compiler, which doesn't work
+# when we don't have C++ support in the toolchain
+ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
+GDB_CONF_OPTS += --disable-build-with-cxx
+endif
+
 ifeq ($(BR2_PACKAGE_GDB_TUI),y)
 GDB_CONF_OPTS += --enable-tui
 else