132
133 # Keep temporary files (.ii, .s)
134 ifdef NEED_ASM
135 CFLAGS += -save-temps
136 else
137 CFLAGS += -pipe
138 endif
139
140 # Compiler warnings are treated as errors
141 WARNINGS_ARE_ERRORS = -Werror
142
143 # Except for a few acceptable ones
144 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
145 # conversions which might affect the values. To avoid that, we need to turn
146 # it off explicitly.
147 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
148 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
149 else
150 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
151 endif
152
153 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
154 # Special cases
155 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
156
157 # The flags to use for an Optimized g++ build
158 OPT_CFLAGS += -O3
159
160 # Hotspot uses very unstrict aliasing turn this optimization off
161 OPT_CFLAGS += -fno-strict-aliasing
162
163 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
164 # if we use expensive-optimizations
165 ifeq ($(BUILDARCH), ia64)
166 OPT_CFLAGS += -fno-expensive-optimizations
167 endif
168
169 OPT_CFLAGS/NOOPT=-O0
170
171 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
|
132
133 # Keep temporary files (.ii, .s)
134 ifdef NEED_ASM
135 CFLAGS += -save-temps
136 else
137 CFLAGS += -pipe
138 endif
139
140 # Compiler warnings are treated as errors
141 WARNINGS_ARE_ERRORS = -Werror
142
143 # Except for a few acceptable ones
144 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
145 # conversions which might affect the values. To avoid that, we need to turn
146 # it off explicitly.
147 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
148 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
149 else
150 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
151 endif
152 ACCEPTABLE_WARNINGS += -Wno-deprecated-declarations
153
154 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
155 # Special cases
156 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
157
158 # The flags to use for an Optimized g++ build
159 OPT_CFLAGS += -O3
160
161 # Hotspot uses very unstrict aliasing turn this optimization off
162 OPT_CFLAGS += -fno-strict-aliasing
163
164 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
165 # if we use expensive-optimizations
166 ifeq ($(BUILDARCH), ia64)
167 OPT_CFLAGS += -fno-expensive-optimizations
168 endif
169
170 OPT_CFLAGS/NOOPT=-O0
171
172 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
|