hotspot/make/linux/makefiles/gcc.make
changeset 775 d9c9b9cd55fb
parent 744 88e28f2ccee4
child 781 e1baa9c8f16f
equal deleted inserted replaced
774:e71318ea23e8 775:d9c9b9cd55fb
    82   CFLAGS += -pipe
    82   CFLAGS += -pipe
    83 endif
    83 endif
    84 
    84 
    85 # Compiler warnings are treated as errors
    85 # Compiler warnings are treated as errors
    86 WARNINGS_ARE_ERRORS = -Werror
    86 WARNINGS_ARE_ERRORS = -Werror
       
    87 
    87 # Except for a few acceptable ones
    88 # Except for a few acceptable ones
       
    89 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
       
    90 # conversions which might affect the values. To avoid that, we need to turn
       
    91 # it off explicitly. 
       
    92 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
       
    93 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
       
    94 else
    88 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
    95 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
       
    96 endif
       
    97 
    89 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
    98 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
    90 # Special cases
    99 # Special cases
    91 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
   100 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
    92 
   101 
    93 # The flags to use for an Optimized g++ build
   102 # The flags to use for an Optimized g++ build