Skip to contentSkip to conversation

package/pdmenu: fix build with gcc-15.x

PATCH Applied Bernd Kuhls 2 participants 3 messages Nov 29, 2025 – Dec 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pdmenu: fix build with gcc-15.x

Fixes:
https://autobuild.buildroot.net/results/554/5545162ca0206cacfca1617280f074237e72aec1/

---
 package/pdmenu/pdmenu.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/pdmenu/pdmenu.mk +7 -0
index 2691a67ef6..72eb95bddc 100644
@@ -11,4 +11,11 @@ PDMENU_LICENSE_FILES = doc/COPYING
 PDMENU_DEPENDENCIES = slang $(TARGET_NLS_DEPENDENCIES)
 PDMENU_INSTALL_TARGET_OPTS = INSTALL_PREFIX=$(TARGET_DIR) install
 
+# gcc-15 defaults to -std=gnu23 which introduces build failures.
+# We force "-std=gnu17" for gcc version supporting it. Earlier gcc
+# versions will work, since they are using the older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+PDMENU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
 $(eval $(autotools-package))
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Bernd Kuhls

In reply of:

Quoted 4 lines

Fixes:
https://autobuild.buildroot.net/results/554/5545162ca0206cacfca1617280f074237e72aec1/

Applied to 2025.08.x. Thanks

Quoted 27 lines
---
 package/pdmenu/pdmenu.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/pdmenu/pdmenu.mk +7 -0
index 2691a67ef6..72eb95bddc 100644
@@ -11,4 +11,11 @@ PDMENU_LICENSE_FILES = doc/COPYING
 PDMENU_DEPENDENCIES = slang $(TARGET_NLS_DEPENDENCIES)
 PDMENU_INSTALL_TARGET_OPTS = INSTALL_PREFIX=$(TARGET_DIR) install
 
+# gcc-15 defaults to -std=gnu23 which introduces build failures.
+# We force "-std=gnu17" for gcc version supporting it. Earlier gcc
+# versions will work, since they are using the older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+PDMENU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
 $(eval $(autotools-package))
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot