Fix kernel -Werror support
The introduction of secondary arch support for kernel files disabled
-Werror for all kernel files, since the -Werror flags were moved from
{CC,C++}FLAGS to TARGET_WARNING_{CC,C++}FLAGS_<arch>, which, however,
was overwritten by the SetupKernel rule. This commit introduces new
global variables {HAIKU,HOST,TARGET}_WERROR_FLAGS[_<arch>], which
contain the additional -Werror flags to be applied for the architecture.
The config variable WARNINGS can be set to "treatAsErrors" to cause
-Werror and {HOST,TARGET}_WERROR_FLAGS[_<arch>] to be appended to the
compilation flags.
Fixes #10280.
This commit is contained in:
@@ -366,6 +366,8 @@ HOST_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy
|
||||
HOST_KERNEL_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes ;
|
||||
HOST_KERNEL_WARNING_C++FLAGS = -Wall -Wno-trigraphs ;
|
||||
|
||||
HOST_WERROR_FLAGS = ;
|
||||
|
||||
# debug flags
|
||||
local hostDebugFlags ;
|
||||
switch $(HOST_PLATFORM) {
|
||||
@@ -671,7 +673,7 @@ local archDependentBuildVars =
|
||||
ARFLAGS ASFLAGS UNARFLAGS CPPFLAGS CCFLAGS C++FLAGS HDRS LDFLAGS
|
||||
LINK LINKFLAGS
|
||||
|
||||
WARNING_CCFLAGS WARNING_C++FLAGS
|
||||
WARNING_CCFLAGS WARNING_C++FLAGS WERROR_FLAGS
|
||||
|
||||
DEBUG_$(HAIKU_DEBUG_LEVELS)_CCFLAGS DEBUG_$(HAIKU_DEBUG_LEVELS)_C++FLAGS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user