build: set GNU17 for lemon compilation
authorRobert Marko <[email protected]>
Fri, 18 Apr 2025 10:26:29 +0000 (12:26 +0200)
committerRobert Marko <[email protected]>
Fri, 18 Apr 2025 10:40:12 +0000 (12:40 +0200)
GCC15 has changed the default from GNU17 (Since GCC8) to GNU23 and this is
breaking lemon compilation.

So, simply set -std=gnu17 for lemon.c so it compiles again.

Link: https://github.com/openwrt/jsonpath/pull/4
Signed-off-by: Robert Marko <[email protected]>
CMakeLists.txt

index dbfbf5d8f26ffe35808f0e6c40d033439f1ee46d..d82799a263d33bb4190947afeb18af69b3d8794c 100644 (file)
@@ -21,7 +21,7 @@ ENDIF()
 ADD_CUSTOM_COMMAND(
   OUTPUT contrib/lemon
   DEPENDS contrib/lemon.c contrib/lempar.c
-  COMMAND gcc -o contrib/lemon contrib/lemon.c
+  COMMAND gcc -std=gnu17 -o contrib/lemon contrib/lemon.c
   COMMENT "Generating lemon parser generator"
 )