From: Darrick J. Wong Date: Mon, 21 Oct 2024 00:10:40 +0000 (-0700) Subject: libxfs: require -std=gnu11 for compilation by default X-Git-Tag: v6.12.0~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb4e1bc0204400e283731376e99a19c5417712dc;p=thirdparty%2Fxfsprogs-dev.git libxfs: require -std=gnu11 for compilation by default 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 Reviewed-by: Christoph Hellwig --- diff --git a/configure.ac b/configure.ac index 901208a8..b75f7d9e 100644 --- a/configure.ac +++ b/configure.ac @@ -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