|
|
|
@ -122,6 +122,7 @@ class Board:
@@ -122,6 +122,7 @@ class Board:
|
|
|
|
|
'-Werror=parentheses', |
|
|
|
|
'-Werror=format-extra-args', |
|
|
|
|
'-Werror=ignored-qualifiers', |
|
|
|
|
'-DARDUPILOT_BUILD', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if cfg.options.scripting_checks: |
|
|
|
@ -205,6 +206,7 @@ class Board:
@@ -205,6 +206,7 @@ class Board:
|
|
|
|
|
'-Wfatal-errors', |
|
|
|
|
'-Wno-trigraphs', |
|
|
|
|
'-Werror=parentheses', |
|
|
|
|
'-DARDUPILOT_BUILD', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if 'clang++' in cfg.env.COMPILER_CXX: |
|
|
|
@ -249,6 +251,15 @@ class Board:
@@ -249,6 +251,15 @@ class Board:
|
|
|
|
|
'-Werror=implicit-fallthrough', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if cfg.options.Werror: |
|
|
|
|
errors = ['-Werror', |
|
|
|
|
'-Werror=missing-declarations', |
|
|
|
|
'-Werror=float-equal', |
|
|
|
|
'-Werror=undef', |
|
|
|
|
] |
|
|
|
|
env.CFLAGS += errors |
|
|
|
|
env.CXXFLAGS += errors |
|
|
|
|
|
|
|
|
|
if cfg.env.DEBUG: |
|
|
|
|
env.CXXFLAGS += [ |
|
|
|
|
'-g', |
|
|
|
@ -481,11 +492,6 @@ class chibios(Board):
@@ -481,11 +492,6 @@ class chibios(Board):
|
|
|
|
|
'-Wframe-larger-than=1300', |
|
|
|
|
'-fsingle-precision-constant', |
|
|
|
|
'-Wno-attributes', |
|
|
|
|
'-Wno-error=double-promotion', |
|
|
|
|
'-Wno-error=missing-declarations', |
|
|
|
|
'-Wno-error=float-equal', |
|
|
|
|
'-Wno-error=undef', |
|
|
|
|
'-Wno-error=cpp', |
|
|
|
|
'-fno-exceptions', |
|
|
|
|
'-Wall', |
|
|
|
|
'-Wextra', |
|
|
|
@ -521,6 +527,15 @@ class chibios(Board):
@@ -521,6 +527,15 @@ class chibios(Board):
|
|
|
|
|
'-D__USE_CMSIS', |
|
|
|
|
'-Werror=deprecated-declarations' |
|
|
|
|
] |
|
|
|
|
if not cfg.options.Werror: |
|
|
|
|
env.CFLAGS += [ |
|
|
|
|
'-Wno-error=double-promotion', |
|
|
|
|
'-Wno-error=missing-declarations', |
|
|
|
|
'-Wno-error=float-equal', |
|
|
|
|
'-Wno-error=undef', |
|
|
|
|
'-Wno-error=cpp', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
env.CXXFLAGS += env.CFLAGS + [ |
|
|
|
|
'-fno-rtti', |
|
|
|
|
'-fno-threadsafe-statics', |
|
|
|
|