Browse Source

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.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Peter Korsgaard 2 months ago
parent
commit
7acb00cc1a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/dhrystone/dhrystone.mk

+ 1 - 1
package/dhrystone/dhrystone.mk

@@ -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