]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: require -std=gnu11 for compilation by default
authorDarrick J. Wong <djwong@kernel.org>
Mon, 21 Oct 2024 00:10:40 +0000 (17:10 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 31 Oct 2024 22:45:02 +0000 (15:45 -0700)
The kernel now builds with -std=gnu11, so let's make xfsprogs do that by
default too.  Distributions can still override the parameters by passing
CFLAGS= and BUILD_CFLAGS= to configure, just as they always have.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
configure.ac

index 901208a8d273ebecec06c3b64ce3f1ff37dd0c5e..b75f7d9e7563b2714cf5f0f5cc694b3cf23f2519 100644 (file)
@@ -5,6 +5,11 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([include/libxfs.h])
 AC_PREFIX_DEFAULT(/usr)
 
+# Default CFLAGS if nobody specifies anything else
+if test "${CFLAGS+set}" != "set"; then
+       CFLAGS="-g -O2 -std=gnu11"
+fi
+
 AC_PROG_INSTALL
 LT_INIT
 
@@ -22,7 +27,7 @@ if test "${BUILD_CFLAGS+set}" != "set"; then
   if test $cross_compiling = no; then
     BUILD_CFLAGS="$CFLAGS"
   else
-    BUILD_CFLAGS="-g -O2"
+    BUILD_CFLAGS="-g -O2 -std=gnu11"
   fi
 fi