114 # Use C++ Interpreter |
114 # Use C++ Interpreter |
115 ifdef CC_INTERP |
115 ifdef CC_INTERP |
116 CFLAGS += -DCC_INTERP |
116 CFLAGS += -DCC_INTERP |
117 endif |
117 endif |
118 |
118 |
119 # Build for embedded targets |
|
120 ifdef JAVASE_EMBEDDED |
|
121 CFLAGS += -DJAVASE_EMBEDDED |
|
122 endif |
|
123 |
|
124 # Keep temporary files (.ii, .s) |
119 # Keep temporary files (.ii, .s) |
125 ifdef NEED_ASM |
120 ifdef NEED_ASM |
126 CFLAGS += -save-temps |
121 CFLAGS += -save-temps |
127 else |
122 else |
128 CFLAGS += -pipe |
123 CFLAGS += -pipe |
144 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) |
139 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) |
145 # Special cases |
140 # Special cases |
146 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) |
141 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) |
147 |
142 |
148 # The flags to use for an Optimized g++ build |
143 # The flags to use for an Optimized g++ build |
149 OPT_CFLAGS += -O3 |
144 OPT_CFLAGS/SIZE=-Os |
|
145 OPT_CFLAGS/SPEED=-O3 |
150 |
146 |
151 # Hotspot uses very unstrict aliasing turn this optimization off |
147 # Hotspot uses very unstrict aliasing turn this optimization off |
152 OPT_CFLAGS += -fno-strict-aliasing |
148 # This option is added to CFLAGS rather than OPT_CFLAGS |
|
149 # so that OPT_CFLAGS overrides get this option too. |
|
150 CFLAGS += -fno-strict-aliasing |
|
151 |
|
152 OPT_CFLAGS_DEFAULT ?= SPEED |
|
153 |
|
154 ifdef OPT_CFLAGS |
|
155 ifneq ("$(origin OPT_CFLAGS)", "command line") |
|
156 $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.") |
|
157 endif |
|
158 endif |
|
159 |
|
160 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) |
153 |
161 |
154 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp |
162 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp |
155 # if we use expensive-optimizations |
163 # if we use expensive-optimizations |
156 ifeq ($(BUILDARCH), ia64) |
164 ifeq ($(BUILDARCH), ia64) |
157 OPT_CFLAGS += -fno-expensive-optimizations |
165 OPT_CFLAGS += -fno-expensive-optimizations |