Mercurial > hg > truffle
diff make/linux/makefiles/gcc.make @ 229:3e82d72933d0
6718830: Hotspot fails to build with gcc 4.3
Summary: Fixed linux make file and couple adlc code to meet the changes of gcc 4.3
Reviewed-by: kamg, igor
author | xlu |
---|---|
date | Thu, 26 Jun 2008 14:15:01 -0700 |
parents | 6470a2a42f92 |
children | 9c2ecc2ffb12 |
line wrap: on
line diff
--- a/make/linux/makefiles/gcc.make Tue Jun 24 16:52:31 2008 -0700 +++ b/make/linux/makefiles/gcc.make Thu Jun 26 14:15:01 2008 -0700 @@ -84,8 +84,17 @@ # Compiler warnings are treated as errors WARNINGS_ARE_ERRORS = -Werror + # Except for a few acceptable ones +# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit +# conversions which might affect the values. To avoid that, we need to turn +# it off explicitly. +ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" +ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare +else ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare +endif + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))