make/bsd/makefiles/gcc.make
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8022956 Sdiff make/bsd/makefiles

make/bsd/makefiles/gcc.make

Print this page




 230 
 231 # Keep temporary files (.ii, .s)
 232 ifdef NEED_ASM
 233   CFLAGS += -save-temps
 234 else
 235   CFLAGS += -pipe
 236 endif
 237 
 238 # Compiler warnings are treated as errors
 239 ifneq ($(COMPILER_WARNINGS_FATAL),false)
 240   WARNINGS_ARE_ERRORS = -Werror
 241 endif
 242 
 243 ifeq ($(USE_CLANG), true)
 244   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 245   WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 246   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare
 247 # Not yet supported by clang in Xcode 4.6.2
 248 #  WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
 249   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
 250   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
 251 endif
 252 
 253 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
 254 
 255 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 256   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 257   # conversions which might affect the values. Only enable it in earlier versions.
 258   WARNING_FLAGS = -Wunused-function
 259   ifeq ($(USE_CLANG),)
 260     WARNINGS_FLAGS += -Wconversion
 261   endif
 262 endif
 263 
 264 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
 265 # Special cases
 266 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
 267 # XXXDARWIN: for _dyld_bind_fully_image_containing_address
 268 ifeq ($(OS_VENDOR), Darwin)
 269   CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
 270 endif




 230 
 231 # Keep temporary files (.ii, .s)
 232 ifdef NEED_ASM
 233   CFLAGS += -save-temps
 234 else
 235   CFLAGS += -pipe
 236 endif
 237 
 238 # Compiler warnings are treated as errors
 239 ifneq ($(COMPILER_WARNINGS_FATAL),false)
 240   WARNINGS_ARE_ERRORS = -Werror
 241 endif
 242 
 243 ifeq ($(USE_CLANG), true)
 244   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 245   WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 246   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare
 247 # Not yet supported by clang in Xcode 4.6.2
 248 #  WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
 249   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
 250   WARNINGS_ARE_ERRORS += -Wno-empty-body
 251 endif
 252 
 253 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
 254 
 255 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 256   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 257   # conversions which might affect the values. Only enable it in earlier versions.
 258   WARNING_FLAGS = -Wunused-function
 259   ifeq ($(USE_CLANG),)
 260     WARNINGS_FLAGS += -Wconversion
 261   endif
 262 endif
 263 
 264 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
 265 # Special cases
 266 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
 267 # XXXDARWIN: for _dyld_bind_fully_image_containing_address
 268 ifeq ($(OS_VENDOR), Darwin)
 269   CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
 270 endif


make/bsd/makefiles/gcc.make
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File