Skip to contentSkip to conversation

package/brcm-patchram-plus: fix build w/ gcc-15

PATCH In review Peter Korsgaard 1 participant 2 messages Aug 29, 2025 – Aug 31, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/brcm-patchram-plus: fix build w/ gcc-15

Fixes http://autobuild.buildroot.net/results/2058934e442c0b3f3d0bd81bd7ed080c2eaade31/

The source code uses empty argument function pointer prototypes, which changed behaviour in C23 (default in gcc-15):

https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters

Causing build issues. Fix it by forcing gnu99 mode instead.

---
 package/brcm-patchram-plus/brcm-patchram-plus.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/brcm-patchram-plus/brcm-patchram-plus.mk +4 -0
index d873330769..81ffc47aee 100644
@@ -10,4 +10,8 @@ BRCM_PATCHRAM_PLUS_LICENSE = Apache-2.0
 BRCM_PATCHRAM_PLUS_LICENSE_FILES = COPYING
 BRCM_PATCHRAM_PLUS_AUTORECONF = YES
 
+# C23 changes meaning of empty argument prototypes like int (*)()
+# causing build failures, so force gnu99
+BRCM_PATCHRAM_PLUS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
+
 $(eval $(autotools-package))
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Fixes http://autobuild.buildroot.net/results/2058934e442c0b3f3d0bd81bd7ed080c2eaade31/
The source code uses empty argument function pointer prototypes, which changed behaviour in C23 (default in gcc-15):

https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters

Causing build issues. Fix it by forcing gnu99 mode instead.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot