summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-09-23 21:53:26 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-25 15:18:40 +0200
commit5d57bdeb239de40d63eb7809a3d3d15dffb51b6b (patch)
treef0bd2bb181b743c66f9a6d97ced8aacc6d0218bd
parent4498f5370750973fb0dde11932f5e7250061cbc4 (diff)
btrfs-progs: build: use -std=gnu89 for sparse
Sparse does not seem to support gnu90 that we'd like to keep for the regular build. Use gnu89 for C=1 build. Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2e8d932..243701a 100644
--- a/Makefile
+++ b/Makefile
@@ -62,8 +62,9 @@ DEBUG_LDFLAGS :=
TOPDIR := $(shell pwd)
# Common build flags
+CSTD = -std=gnu90
CFLAGS = $(SUBST_CFLAGS) \
- -std=gnu90 \
+ $(CSTD) \
-include config.h \
-DBTRFS_FLAT_INCLUDES \
-D_XOPEN_SOURCE=700 \
@@ -262,6 +263,7 @@ ifdef C
grep -v __SIZE_TYPE__ > $(check_defs))
check = $(CHECKER)
check_echo = echo
+ CSTD = -std=gnu89
else
check = true
check_echo = true