< prev index next >

make/linux/makefiles/gcc.make

Print this page
rev 10160 : 8144695: --disable-warnings-as-errors does not work for HotSpot build
Reviewed-by: duke


 186 ARCHFLAG/ppc64   =  -m64
 187 
 188 CFLAGS     += $(ARCHFLAG)
 189 AOUT_FLAGS += $(ARCHFLAG)
 190 LFLAGS     += $(ARCHFLAG)
 191 ASFLAGS    += $(ARCHFLAG)
 192 
 193 # Use C++ Interpreter
 194 ifdef CC_INTERP
 195   CFLAGS += -DCC_INTERP
 196 endif
 197 
 198 # Keep temporary files (.ii, .s)
 199 ifdef NEED_ASM
 200   CFLAGS += -save-temps
 201 else
 202   CFLAGS += -pipe
 203 endif
 204 
 205 # Compiler warnings are treated as errors
 206 WARNINGS_ARE_ERRORS = -Werror
 207 
 208 ifeq ($(USE_CLANG), true)
 209   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 210   WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 211   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
 212   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
 213   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
 214 endif
 215 
 216 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -Woverloaded-virtual
 217 
 218 ifeq ($(USE_CLANG),)
 219   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 220   # conversions which might affect the values. Only enable it in earlier versions.
 221   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 222     # GCC < 4.3
 223     WARNING_FLAGS += -Wconversion
 224   endif  
 225   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
 226     # GCC >= 4.8




 186 ARCHFLAG/ppc64   =  -m64
 187 
 188 CFLAGS     += $(ARCHFLAG)
 189 AOUT_FLAGS += $(ARCHFLAG)
 190 LFLAGS     += $(ARCHFLAG)
 191 ASFLAGS    += $(ARCHFLAG)
 192 
 193 # Use C++ Interpreter
 194 ifdef CC_INTERP
 195   CFLAGS += -DCC_INTERP
 196 endif
 197 
 198 # Keep temporary files (.ii, .s)
 199 ifdef NEED_ASM
 200   CFLAGS += -save-temps
 201 else
 202   CFLAGS += -pipe
 203 endif
 204 
 205 # Compiler warnings are treated as errors
 206 WARNINGS_ARE_ERRORS ?= -Werror
 207 
 208 ifeq ($(USE_CLANG), true)
 209   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 210   WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 211   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
 212   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
 213   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
 214 endif
 215 
 216 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -Woverloaded-virtual
 217 
 218 ifeq ($(USE_CLANG),)
 219   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 220   # conversions which might affect the values. Only enable it in earlier versions.
 221   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 222     # GCC < 4.3
 223     WARNING_FLAGS += -Wconversion
 224   endif  
 225   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
 226     # GCC >= 4.8


< prev index next >