]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
flex: Keep it at C17 with clang
authorKhem Raj <raj.khem@gmail.com>
Thu, 9 Apr 2026 05:56:17 +0000 (22:56 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Apr 2026 12:56:59 +0000 (13:56 +0100)
autoconf 2.73 enforces C23 and adds -std=gnu23 but it leaks it into
CC_FOR_BUILD as well, which bites on systems with GCC < 14 where this
option does not exist.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/flex/flex_2.6.4.bb

index fa8c0fb6fd03b779c05288ac12a4baf7b6b4b8c9..0507d4e3009c8561b2881c026cedc5a9e3758646 100644 (file)
@@ -36,6 +36,11 @@ inherit autotools gettext texinfo ptest github-releases
 M4 = "${bindir}/m4"
 M4:class-native = "${STAGING_BINDIR_NATIVE}/m4"
 EXTRA_OECONF += "ac_cv_path_M4=${M4} ac_cv_func_reallocarray=no"
+# Don't let autoconf smarts to detect C standard, flex code does not need C23
+# which is what it will enforce see
+# https://savannah.gnu.org/support/index.php?111401
+CACHED_CONFIGUREVARS:append:toolchain-clang = " CFLAGS='${CFLAGS} -std=gnu17'"
+
 EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
 
 EXTRA_OEMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', 'FLEX=${STAGING_BINDIR_NATIVE}/flex', '', d)}"