gnumake3: #i116496#: support for Werror (for now can only be disabled globally)
This commit is contained in:
parent
36db278681
commit
61685df8f2
5 changed files with 33 additions and 22 deletions
|
@ -102,6 +102,11 @@ gb_CXXFLAGS := \
|
|||
-fvisibility=hidden \
|
||||
-pipe \
|
||||
|
||||
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
|
||||
gb_CFLAGS_WERROR := -Werror
|
||||
gb_CXXFLAGS_WERROR := -Werror
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(SYSBASE)),)
|
||||
gb_CXXFLAGS += --sysroot=$(SYSBASE)
|
||||
gb_CFLAGS += --sysroot=$(SYSBASE)
|
||||
|
@ -199,8 +204,8 @@ gb_LinkTarget__RPATHS := \
|
|||
SDKBIN:\dORIGIN/../../ure-link/lib \
|
||||
NONEBIN:\dORIGIN/../lib:\dORIGIN \
|
||||
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
|
||||
|
||||
ifeq ($(gb_DEBUGLEVEL),2)
|
||||
gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
|
||||
|
|
|
@ -111,11 +111,10 @@ gb_CXXFLAGS := \
|
|||
# (see toolkit module for a case where it is necessary to do it this way)
|
||||
gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions
|
||||
|
||||
gb_CFLAGS_WERROR := \
|
||||
-Werror \
|
||||
|
||||
gb_CXXFLAGS_WERROR := \
|
||||
-Werror \
|
||||
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
|
||||
gb_CFLAGS_WERROR := -Werror
|
||||
gb_CXXFLAGS_WERROR := -Werror
|
||||
endif
|
||||
|
||||
gb_LinkTarget_EXCEPTIONFLAGS := \
|
||||
-DEXCEPTIONS_ON \
|
||||
|
@ -217,8 +216,8 @@ define gb_LinkTarget__get_installname
|
|||
$(if $(2),-install_name '$(2)$(1)',)
|
||||
endef
|
||||
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
|
||||
gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
|
||||
ifeq ($(gb_DEBUGLEVEL),2)
|
||||
|
|
|
@ -84,11 +84,10 @@ gb_CXXFLAGS := \
|
|||
+w2 \
|
||||
-erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype \
|
||||
|
||||
gb_CFLAGS_WERROR := \
|
||||
-errwarn=%all \
|
||||
|
||||
gb_CXXFLAGS_WERROR := \
|
||||
-xwe \
|
||||
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
|
||||
gb_CFLAGS_WERROR := -errwarn=%all
|
||||
gb_CXXFLAGS_WERROR := -xwe
|
||||
endif
|
||||
|
||||
gb_LinkTarget_EXCEPTIONFLAGS := \
|
||||
-DEXCEPTIONS_ON \
|
||||
|
@ -179,8 +178,8 @@ gb_LinkTarget__RPATHS := \
|
|||
SDKBIN:\dORIGIN/../../ure-link/lib \
|
||||
NONEBIN:\dORIGIN/../lib:\dORIGIN \
|
||||
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
|
||||
|
||||
ifeq ($(gb_DEBUGLEVEL),2)
|
||||
gb_LinkTarget_CXXFLAGS += -g
|
||||
|
|
|
@ -109,7 +109,6 @@ gb_CFLAGS := \
|
|||
-wd4800 \
|
||||
-wd4820 \
|
||||
-wd4826 \
|
||||
-WX \
|
||||
-Zc:forScope,wchar_t- \
|
||||
-Zm500 \
|
||||
|
||||
|
@ -156,10 +155,14 @@ gb_CXXFLAGS := \
|
|||
-wd4800 \
|
||||
-wd4820 \
|
||||
-wd4826 \
|
||||
-WX \
|
||||
-Zc:forScope,wchar_t- \
|
||||
-Zm500 \
|
||||
|
||||
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
|
||||
gb_CFLAGS_WERROR := -WX
|
||||
gb_CXXFLAGS_WERROR := -WX
|
||||
endif
|
||||
|
||||
gb_LinkTarget_EXCEPTIONFLAGS := \
|
||||
-DEXCEPTIONS_ON \
|
||||
-EHa \
|
||||
|
@ -375,8 +378,8 @@ endef
|
|||
|
||||
# LinkTarget class
|
||||
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
|
||||
|
||||
gb_LinkTarget_INCLUDE :=\
|
||||
$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
|
||||
|
|
|
@ -120,6 +120,11 @@ gb_CXXFLAGS := \
|
|||
-pipe \
|
||||
-nostdinc \
|
||||
|
||||
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
|
||||
gb_CFLAGS_WERROR := -Werror
|
||||
gb_CXXFLAGS_WERROR := -Werror
|
||||
endif
|
||||
|
||||
ifneq ($(SYSBASE),)
|
||||
gb_CXXFLAGS += --sysroot=$(SYSBASE)
|
||||
gb_CFLAGS += --sysroot=$(SYSBASE)
|
||||
|
@ -344,8 +349,8 @@ endef
|
|||
|
||||
# LinkTarget class
|
||||
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
|
||||
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
|
||||
|
||||
ifeq ($(gb_DEBUGLEVEL),2)
|
||||
gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
|
||||
|
|
Loading…
Reference in a new issue