Browse Source

toolchain: gdb: set -std=gnu17

Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks gdb compilation.

This looks like a readline issue, that was fixed in GDB 16.2 but to
not update toolchain components we can simply set the C standard back
to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23

Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <[email protected]>
Robert Marko 10 months ago
parent
commit
78d517a18c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      toolchain/gdb/Makefile

+ 2 - 0
toolchain/gdb/Makefile

@@ -56,6 +56,8 @@ else
   HOST_CONFIGURE_ARGS+= --without-python
 endif
 
+HOST_CFLAGS += -std=gnu17
+
 define Host/Install
 	mkdir -p $(TOOLCHAIN_DIR)/bin
 	$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb