]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
fstests: use '-std=gnu11' to fix build errors with gcc-15
authorZorro Lang <zlang@kernel.org>
Mon, 10 Feb 2025 16:57:15 +0000 (00:57 +0800)
committerZorro Lang <zlang@kernel.org>
Sun, 23 Feb 2025 12:31:45 +0000 (20:31 +0800)
GCC-15 does a big change, it changes the default C compilation
language standard to -std=gnu23. That cause lots of "old style"
C codes hit building errors. On the other word, current xfstests
can't be used with GCC-15. So use a fixed language standard --
"-std=gnu11" (to match the kernel and xfsprogs).

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
include/builddefs.in

index 5b5864278682a43dedfa0a214b93fa068618fd0d..96d5ed25b3e2d4cfc826f3470e69603550054ce7 100644 (file)
@@ -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 = -std=gnu11 -funsigned-char -fno-strict-aliasing -Wall
 SANITIZER_CFLAGS += @autovar_init_cflags@
 
 ifeq ($(PKG_PLATFORM),linux)