Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
228:f232d7d67023 | 229:3e82d72933d0 |
---|---|
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 |