Skip to contentSkip to conversation

package/m4: fix build failure with gcc 15

PATCH Superseded Joseph Zikusooka (ZIK) 2 participants 2 messages May 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/m4: fix build failure with gcc 15

This is a temporary workaround to address build issues with host-m4 when using GCC 15, as encountered on the recently released Fedora 42. The issue stems from stricter compiler behavior introduced in recent versions of GCC.

A proper fix has already been committed upstream and will be included in the next release of GNU m4:
https://git.savannah.gnu.org/cgit/m4.git/commit/?h=branch-1.4&id=a22c9802dd7e724eaefb21dc21d84ac2d3a49c89

Until that version is available in buildroot, this patch ensures continued compatibility and successful builds.

More context:
https://lists.buildroot.org/pipermail/buildroot/2025-April/776922.html

---
 package/m4/m4.mk | 2 ++
 1 file changed, 2 insertions(+)
package/m4/m4.mk +2 -0
index 39ad898b10..ab8e194b06 100644
@@ -10,4 +10,6 @@ M4_SITE = $(BR2_GNU_MIRROR)/m4
 M4_LICENSE = GPL-3.0+
 M4_LICENSE_FILES = COPYING
 
+HOST_M4_CONF_ENV = CFLAGS="$(HOST_CFLAGS) -std=gnu17"
+
 $(eval $(host-autotools-package))
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by Luca Ceresoli on v2 1/1
#1 lore raw

Hello Joseph,

thanks for your patch!

Quoted 7 lines · On Sat, 3 May 2025 14:43:39 +0300 "Joseph Zikusooka (ZIK)"…

This is a temporary workaround to address build issues with host-m4 when using GCC 15, as encountered on the recently released Fedora 42. The issue stems from stricter compiler behavior introduced in recent versions of GCC.

A proper fix has already been committed upstream and will be included in the next release of GNU m4:
https://git.savannah.gnu.org/cgit/m4.git/commit/?h=branch-1.4&id=a22c9802dd7e724eaefb21dc21d84ac2d3a49c89

Quoted 7 lines

Until that version is available in buildroot, this patch ensures continued compatibility and successful builds.

More context:
https://lists.buildroot.org/pipermail/buildroot/2025-April/776922.html

The patch diff is identical to v1, thus you could have copied the Tested-by tags you got.

Anyway:

[Tested v1, but v2 has the same diff]

Also, adding a changelog after the '---' line is useful.

E.g.:

Changes in v2:
- reworded commit message (no diff changes)

Luca

Signature · 7 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot