reset: make sparse-aware (except --mixed)
[alt-git.git] / config.mak.dev
blobc080ac0231739479b4f49c03514663a2e5411161
1 ifndef COMPILER_FEATURES
2 COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
3 endif
5 ifeq ($(filter no-error,$(DEVOPTS)),)
6 DEVELOPER_CFLAGS += -Werror
7 SPARSE_FLAGS += -Wsparse-error
8 endif
9 DEVELOPER_CFLAGS += -Wall
10 ifeq ($(filter no-pedantic,$(DEVOPTS)),)
11 DEVELOPER_CFLAGS += -pedantic
12 DEVELOPER_CFLAGS += -Wpedantic
13 ifneq ($(filter gcc5,$(COMPILER_FEATURES)),)
14 DEVELOPER_CFLAGS += -Wno-pedantic-ms-format
15 DEVELOPER_CFLAGS += -Wno-incompatible-pointer-types
16 endif
17 endif
18 DEVELOPER_CFLAGS += -Wdeclaration-after-statement
19 DEVELOPER_CFLAGS += -Wformat-security
20 DEVELOPER_CFLAGS += -Wold-style-definition
21 DEVELOPER_CFLAGS += -Woverflow
22 DEVELOPER_CFLAGS += -Wpointer-arith
23 DEVELOPER_CFLAGS += -Wstrict-prototypes
24 DEVELOPER_CFLAGS += -Wunused
25 DEVELOPER_CFLAGS += -Wvla
26 DEVELOPER_CFLAGS += -fno-common
28 ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
29 DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
30 endif
32 ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
33 DEVELOPER_CFLAGS += -Wextra
34 # if a function is public, there should be a prototype and the right
35 # header file should be included. If not, it should be static.
36 DEVELOPER_CFLAGS += -Wmissing-prototypes
37 ifeq ($(filter extra-all,$(DEVOPTS)),)
38 # These are disabled because we have these all over the place.
39 DEVELOPER_CFLAGS += -Wno-empty-body
40 DEVELOPER_CFLAGS += -Wno-missing-field-initializers
41 DEVELOPER_CFLAGS += -Wno-sign-compare
42 DEVELOPER_CFLAGS += -Wno-unused-parameter
43 endif
44 endif
46 # uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
47 # not worth fixing since newer compilers correctly stop complaining
48 ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
49 ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
50 DEVELOPER_CFLAGS += -Wno-uninitialized
51 endif
52 endif
54 GIT_TEST_PERL_FATAL_WARNINGS = YesPlease