comparison make/bsd/makefiles/gcc.make @ 6858:b261523fe66c hs25-b05

Merge
author amurillo
date Fri, 12 Oct 2012 13:55:52 -0700
parents 9855b7e559ae
children 892acf0431ef
comparison
equal deleted inserted replaced
6829:0cc77f9b31ad 6858:b261523fe66c
1 # 1 #
2 # Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 # 4 #
5 # This code is free software; you can redistribute it and/or modify it 5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as 6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. 7 # published by the Free Software Foundation.
149 # Use C++ Interpreter 149 # Use C++ Interpreter
150 ifdef CC_INTERP 150 ifdef CC_INTERP
151 CFLAGS += -DCC_INTERP 151 CFLAGS += -DCC_INTERP
152 endif 152 endif
153 153
154 # Build for embedded targets
155 ifdef JAVASE_EMBEDDED
156 CFLAGS += -DJAVASE_EMBEDDED
157 endif
158
159 # Keep temporary files (.ii, .s) 154 # Keep temporary files (.ii, .s)
160 ifdef NEED_ASM 155 ifdef NEED_ASM
161 CFLAGS += -save-temps 156 CFLAGS += -save-temps
162 else 157 else
163 CFLAGS += -pipe 158 CFLAGS += -pipe
184 # XXXDARWIN: for _dyld_bind_fully_image_containing_address 179 # XXXDARWIN: for _dyld_bind_fully_image_containing_address
185 ifeq ($(OS_VENDOR), Darwin) 180 ifeq ($(OS_VENDOR), Darwin)
186 CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations 181 CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
187 endif 182 endif
188 183
184 OPT_CFLAGS/SIZE=-Os
185 OPT_CFLAGS/SPEED=-O3
186
187 # Hotspot uses very unstrict aliasing turn this optimization off
188 # This option is added to CFLAGS rather than OPT_CFLAGS
189 # so that OPT_CFLAGS overrides get this option too.
190 CFLAGS += -fno-strict-aliasing
189 191
190 # The flags to use for an Optimized g++ build 192 # The flags to use for an Optimized g++ build
191 ifeq ($(OS_VENDOR), Darwin) 193 ifeq ($(OS_VENDOR), Darwin)
192 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy 194 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
193 # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers> 195 # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
194 OPT_CFLAGS += -Os 196 OPT_CFLAGS_DEFAULT ?= SIZE
195 else 197 else
196 OPT_CFLAGS += -O3 198 OPT_CFLAGS_DEFAULT ?= SPEED
197 endif 199 endif
198 200
199 # Hotspot uses very unstrict aliasing turn this optimization off 201 ifdef OPT_CFLAGS
200 OPT_CFLAGS += -fno-strict-aliasing 202 ifneq ("$(origin OPT_CFLAGS)", "command line")
201 203 $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.")
202 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 204 endif
205 endif
206
207 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
208
209 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
203 # if we use expensive-optimizations 210 # if we use expensive-optimizations
204 ifeq ($(BUILDARCH), ia64) 211 ifeq ($(BUILDARCH), ia64)
205 OPT_CFLAGS += -fno-expensive-optimizations 212 OPT_CFLAGS += -fno-expensive-optimizations
206 endif 213 endif
207 214