package/dhrystone: fix builds with GCC 15
PATCH 1/1 package/dhrystone: fix builds with GCC 15
GCC 15 defaults to -std=gnu23, which handles function declarations without parameters differently from earlier C standards leading to compilation errors:
dhry_1.c: In function ‘main’:
dhry_1.c:176:19: error: too many arguments to function ‘Func_2’; expected 0, have 2
176 | Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters
As a workaround, force the build to use -std=gnu99 mode.
--- package/dhrystone/dhrystone.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/dhrystone/dhrystone.mk +1 -1
@@ -14,7 +14,7 @@ define DHRYSTONE_EXTRACT_CMDS endef define DHRYSTONE_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -std=gnu99" $(MAKE) -C $(@D) endef define DHRYSTONE_INSTALL_TARGET_CMDS
Signature · 6 lines
2.39.5 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Peter Korsgaard
GCC 15 defaults to -std=gnu23, which handles function declarations without parameters differently from earlier C standards leading to compilation errors:
dhry_1.c: In function ‘main’:
dhry_1.c:176:19: error: too many arguments to function ‘Func_2’; expected 0, have 2
176 |Bool_Glob= !Func_2(Str_1_Loc,Str_2_Loc);
Quoted 5 lines
https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters
As a workaround, force the build to use -std=gnu99 mode.
Signed-off-by Peter Korsgaard <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot