Files
buildroot/package/dhrystone/dhrystone.mk
Peter Korsgaard 7acb00cc1a 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>
2025-05-18 11:53:18 +02:00

25 lines
666 B
Makefile

################################################################################
#
# dhrystone
#
################################################################################
DHRYSTONE_VERSION = 2
DHRYSTONE_SOURCE = dhry-c
DHRYSTONE_SITE = http://www.netlib.org/benchmark
define DHRYSTONE_EXTRACT_CMDS
(cd $(@D) && $(SHELL) $(DHRYSTONE_DL_DIR)/$($(PKG)_SOURCE))
$(Q)cp package/dhrystone/Makefile $(@D)/
endef
define DHRYSTONE_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -std=gnu99" $(MAKE) -C $(@D)
endef
define DHRYSTONE_INSTALL_TARGET_CMDS
$(INSTALL) -D $(@D)/dhrystone $(TARGET_DIR)/usr/bin/dhrystone
endef
$(eval $(generic-package))