Message ID | 20250117043709.2941857-1-zlang@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | fstests: workaround for gcc-15 | expand |
diff --git a/include/builddefs.in b/include/builddefs.in index 5b5864278..ef124bb87 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -75,7 +75,7 @@ HAVE_RLIMIT_NOFILE = @have_rlimit_nofile@ NEED_INTERNAL_XFS_IOC_EXCHANGE_RANGE = @need_internal_xfs_ioc_exchange_range@ HAVE_FICLONE = @have_ficlone@ -GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall +GCCFLAGS = -funsigned-char -fno-strict-aliasing -std=gnu17 -Wall SANITIZER_CFLAGS += @autovar_init_cflags@ ifeq ($(PKG_PLATFORM),linux)
GCC-15 does a big change, it changes the default language version for C compilation from -std=gnu17 to -std=gnu23. That cause lots of "old style" C codes hit build errors. On the other word, current xfstests can't be used with GCC-15. So -std=gnu17 can help that. Signed-off-by: Zorro Lang <zlang@kernel.org> --- Hi, I send this patch just for talking about this issue. The upcoming gcc-15 does lots of changes, a big change is using C23 by default: https://gcc.gnu.org/gcc-15/porting_to.html xfstests has many old style C codes, they hard to be built with gcc-15. So we have to either add -std=$old_version (likes this patch), or port the code to C23. This patch is just a workaround (and a reminder for someone might hit this issue with gcc-15 too). If you have any good suggestions or experience (for this kind of issue) to share, feel free to reply. Thanks, Zorro include/builddefs.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)