package/dhcp: fix build with gcc-15.x
PATCH v2 1/1 package/dhcp: fix build with gcc-15.x
Signed-off-by Bernd Kuhls <[email protected]>
---
v2: fix for older gcc versions (Julien)
package/dhcp/dhcp.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
package/dhcp/dhcp.mk +8 -1
@@ -27,10 +27,17 @@ define DHCP_LIBTOOL_AUTORECONF cp $(@D)/configure.ac+lt $(@D)/configure.ac endef +# 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) +DHCP_GCC_OPTS = -std=gnu17 +endif + DHCP_CONF_ENV = \ CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \ -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \ - CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1' + CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1 $(DHCP_GCC_OPTS)' DHCP_BIND_EXTRA_CONFIG = \ --build=$(GNU_HOST_NAME) \
Signature · 6 lines
2.39.5 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 1 line · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot