build system: and gcc8 warnings compatibility option
This commit is contained in:
parent
cce02e45f1
commit
10ec85f848
7
Kconfig
7
Kconfig
|
@ -176,6 +176,13 @@ config WARN_WRITE_STRINGS
|
||||||
For C++, this warns about the deprecated conversion from string
|
For C++, this warns about the deprecated conversion from string
|
||||||
literals to ``char *``.
|
literals to ``char *``.
|
||||||
|
|
||||||
|
config DISABLE_GCC8_WARNINGS
|
||||||
|
bool "Disable new warnings introduced in GCC 6 - 8"
|
||||||
|
default "n"
|
||||||
|
help
|
||||||
|
Enable this option if using GCC 6 or newer, and wanting to disable warnings which don't appear with GCC 5.
|
||||||
|
|
||||||
|
|
||||||
endmenu # Compiler Options
|
endmenu # Compiler Options
|
||||||
|
|
||||||
menu "Component config"
|
menu "Component config"
|
||||||
|
|
|
@ -273,10 +273,28 @@ COMMON_WARNING_FLAGS = -Wall -Werror=all \
|
||||||
-Wno-error=unused-function \
|
-Wno-error=unused-function \
|
||||||
-Wno-error=unused-but-set-variable \
|
-Wno-error=unused-but-set-variable \
|
||||||
-Wno-error=unused-variable \
|
-Wno-error=unused-variable \
|
||||||
|
-Wno-error=unused-const-variable \
|
||||||
-Wno-error=deprecated-declarations \
|
-Wno-error=deprecated-declarations \
|
||||||
-Wextra \
|
-Wextra \
|
||||||
-Wno-unused-parameter -Wno-sign-compare
|
-Wno-unused-parameter -Wno-sign-compare
|
||||||
|
|
||||||
|
ifdef CONFIG_DISABLE_GCC8_WARNINGS
|
||||||
|
COMMON_WARNING_FLAGS += -Wno-parentheses \
|
||||||
|
-Wno-sizeof-pointer-memaccess \
|
||||||
|
-Wno-clobbered \
|
||||||
|
-Wno-format-overflow \
|
||||||
|
-Wno-stringop-truncation \
|
||||||
|
-Wno-misleading-indentation \
|
||||||
|
-Wno-cast-function-type \
|
||||||
|
-Wno-implicit-fallthrough \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-Wno-switch-unreachable \
|
||||||
|
-Wno-format-truncation \
|
||||||
|
-Wno-memset-elt-size \
|
||||||
|
-Wno-int-in-bool-context
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifdef CONFIG_WARN_WRITE_STRINGS
|
ifdef CONFIG_WARN_WRITE_STRINGS
|
||||||
COMMON_WARNING_FLAGS += -Wwrite-strings
|
COMMON_WARNING_FLAGS += -Wwrite-strings
|
||||||
endif #CONFIG_WARN_WRITE_STRINGS
|
endif #CONFIG_WARN_WRITE_STRINGS
|
||||||
|
|
Loading…
Reference in a new issue