From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Subject: [PATCH] fstests: use '-std=gnu11' to fix build errors with gcc-15
Date: Tue, 11 Feb 2025 00:57:15 +0800 [thread overview]
Message-ID: <20250210165715.44659-1-zlang@kernel.org> (raw)
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).
Signed-off-by: Zorro Lang <zlang@kernel.org>
---
Hi,
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.
Thanks,
Zorro
include/builddefs.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/builddefs.in b/include/builddefs.in
index 7274cde8d..631e5d83f 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=gnu11 -Wall
ifeq ($(PKG_PLATFORM),linux)
PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
--
2.47.1
next reply other threads:[~2025-02-10 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 16:57 Zorro Lang [this message]
2025-02-12 6:15 ` [PATCH] fstests: use '-std=gnu11' to fix build errors with gcc-15 Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250210165715.44659-1-zlang@kernel.org \
--to=zlang@kernel.org \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.