Mercurial > hg > graal-compiler
annotate make/bsd/makefiles/gcc.make @ 9878:d0a007fb65af
simplify FrameStateAssignmentPhase, add guarantee that every DeoptimizingNode has a FrameState
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 05 Jun 2013 11:50:07 +0200 |
parents | cb75b67f04fb |
children | 2cb5d5f6d5e5 |
rev | line source |
---|---|
3960 | 1 # |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3960 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
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 | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 # or visit www.oracle.com if you need additional information or have any | |
21 # questions. | |
22 # | |
23 # | |
24 | |
25 OS_VENDOR = $(shell uname -s) | |
26 | |
27 #------------------------------------------------------------------------ | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
4129
diff
changeset
|
28 # CC, CXX & AS |
3960 | 29 |
5897
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
30 # If a SPEC is not set already, then use these defaults. |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
31 ifeq ($(SPEC),) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
32 # When cross-compiling the ALT_COMPILER_PATH points |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
33 # to the cross-compilation toolset |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
34 ifdef CROSS_COMPILE_ARCH |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
35 CXX = $(ALT_COMPILER_PATH)/g++ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
36 CC = $(ALT_COMPILER_PATH)/gcc |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
37 HOSTCXX = g++ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
38 HOSTCC = gcc |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
39 else ifneq ($(OS_VENDOR), Darwin) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
40 CXX = g++ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
41 CC = gcc |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
42 HOSTCXX = $(CXX) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
43 HOSTCC = $(CC) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
44 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
45 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
46 # i486 hotspot requires -mstackrealign on Darwin. |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
47 # llvm-gcc supports this in Xcode 3.2.6 and 4.0. |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
48 # gcc-4.0 supports this on earlier versions. |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
49 # Prefer llvm-gcc where available. |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
50 ifeq ($(OS_VENDOR), Darwin) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
51 ifeq ($(origin CXX), default) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
52 CXX = llvm-g++ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
53 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
54 ifeq ($(origin CC), default) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
55 CC = llvm-gcc |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
56 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
57 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
58 ifeq ($(ARCH), i486) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
59 LLVM_SUPPORTS_STACKREALIGN := $(shell \ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
60 [ "0"`llvm-gcc -v 2>&1 | grep LLVM | sed -E "s/.*LLVM build ([0-9]+).*/\1/"` -gt "2333" ] \ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
61 && echo true || echo false) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
62 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
63 ifeq ($(LLVM_SUPPORTS_STACKREALIGN), true) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
64 CXX32 ?= llvm-g++ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
65 CC32 ?= llvm-gcc |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
66 else |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
67 CXX32 ?= g++-4.0 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
68 CC32 ?= gcc-4.0 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
69 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
70 CXX = $(CXX32) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
71 CC = $(CC32) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
72 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
73 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
74 HOSTCXX = $(CXX) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
75 HOSTCC = $(CC) |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
76 endif |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
77 |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
4891
diff
changeset
|
78 AS = $(CC) -c -x assembler-with-cpp |
4006 | 79 endif |
80 | |
3960 | 81 |
82 # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only | |
83 # prints the numbers (e.g. "2.95", "3.2.1") | |
84 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) | |
85 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) | |
86 | |
87 # check for precompiled headers support | |
88 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" | |
89 # Allow the user to turn off precompiled headers from the command line. | |
90 ifneq ($(USE_PRECOMPILED_HEADER),0) | |
91 PRECOMPILED_HEADER_DIR=. | |
4033
95009f678859
7106766: Move the precompiled header from the src/share/vm directory
brutisso
parents:
4006
diff
changeset
|
92 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp |
3960 | 93 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch |
94 endif | |
95 endif | |
96 | |
97 | |
98 #------------------------------------------------------------------------ | |
99 # Compiler flags | |
100 | |
101 # position-independent code | |
102 PICFLAG = -fPIC | |
103 | |
104 VM_PICFLAG/LIBJVM = $(PICFLAG) | |
105 VM_PICFLAG/AOUT = | |
106 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) | |
107 | |
5946
3d7ea1dbe0de
7141246: build-infra merge: Introduce new JVM_VARIANT* to control which kind of jvm gets built
erikj
parents:
5897
diff
changeset
|
108 ifeq ($(JVM_VARIANT_ZERO), true) |
3d7ea1dbe0de
7141246: build-infra merge: Introduce new JVM_VARIANT* to control which kind of jvm gets built
erikj
parents:
5897
diff
changeset
|
109 CFLAGS += $(LIBFFI_CFLAGS) |
3960 | 110 endif |
5946
3d7ea1dbe0de
7141246: build-infra merge: Introduce new JVM_VARIANT* to control which kind of jvm gets built
erikj
parents:
5897
diff
changeset
|
111 ifeq ($(JVM_VARIANT_ZEROSHARK), true) |
3d7ea1dbe0de
7141246: build-infra merge: Introduce new JVM_VARIANT* to control which kind of jvm gets built
erikj
parents:
5897
diff
changeset
|
112 CFLAGS += $(LIBFFI_CFLAGS) |
3d7ea1dbe0de
7141246: build-infra merge: Introduce new JVM_VARIANT* to control which kind of jvm gets built
erikj
parents:
5897
diff
changeset
|
113 CFLAGS += $(LLVM_CFLAGS) |
3960 | 114 endif |
115 CFLAGS += $(VM_PICFLAG) | |
116 CFLAGS += -fno-rtti | |
117 CFLAGS += -fno-exceptions | |
118 CFLAGS += -pthread | |
119 CFLAGS += -fcheck-new | |
120 # version 4 and above support fvisibility=hidden (matches jni_x86.h file) | |
121 # except 4.1.2 gives pointless warnings that can't be disabled (afaik) | |
122 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" | |
123 CFLAGS += -fvisibility=hidden | |
124 endif | |
125 | |
126 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) | |
127 ARCHFLAG/i486 = -m32 -march=i586 | |
128 ARCHFLAG/amd64 = -m64 | |
129 ARCHFLAG/ia64 = | |
130 ARCHFLAG/sparc = -m32 -mcpu=v9 | |
131 ARCHFLAG/sparcv9 = -m64 -mcpu=v9 | |
132 ARCHFLAG/zero = $(ZERO_ARCHFLAG) | |
133 | |
134 # Darwin-specific build flags | |
135 ifeq ($(OS_VENDOR), Darwin) | |
136 # Ineffecient 16-byte stack re-alignment on Darwin/IA32 | |
137 ARCHFLAG/i486 += -mstackrealign | |
138 endif | |
139 | |
140 CFLAGS += $(ARCHFLAG) | |
141 AOUT_FLAGS += $(ARCHFLAG) | |
142 LFLAGS += $(ARCHFLAG) | |
143 ASFLAGS += $(ARCHFLAG) | |
144 | |
145 ifdef E500V2 | |
146 CFLAGS += -DE500V2 | |
147 endif | |
148 | |
149 # Use C++ Interpreter | |
150 ifdef CC_INTERP | |
151 CFLAGS += -DCC_INTERP | |
152 endif | |
153 | |
154 # Keep temporary files (.ii, .s) | |
155 ifdef NEED_ASM | |
156 CFLAGS += -save-temps | |
157 else | |
158 CFLAGS += -pipe | |
159 endif | |
160 | |
161 # Compiler warnings are treated as errors | |
4006 | 162 ifneq ($(COMPILER_WARNINGS_FATAL),false) |
163 WARNINGS_ARE_ERRORS = -Werror | |
164 endif | |
3960 | 165 |
166 # Except for a few acceptable ones | |
167 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit | |
168 # conversions which might affect the values. To avoid that, we need to turn | |
169 # it off explicitly. | |
170 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" | |
8722 | 171 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef |
3960 | 172 else |
8722 | 173 WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef |
3960 | 174 endif |
175 | |
8722 | 176 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) |
3960 | 177 # Special cases |
178 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) | |
179 # XXXDARWIN: for _dyld_bind_fully_image_containing_address | |
180 ifeq ($(OS_VENDOR), Darwin) | |
181 CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations | |
182 endif | |
183 | |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
184 OPT_CFLAGS/SIZE=-Os |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
185 OPT_CFLAGS/SPEED=-O3 |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
186 |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
187 # Hotspot uses very unstrict aliasing turn this optimization off |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
188 # This option is added to CFLAGS rather than OPT_CFLAGS |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
189 # so that OPT_CFLAGS overrides get this option too. |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
190 CFLAGS += -fno-strict-aliasing |
3960 | 191 |
192 # The flags to use for an Optimized g++ build | |
4006 | 193 ifeq ($(OS_VENDOR), Darwin) |
194 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy | |
195 # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers> | |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
196 OPT_CFLAGS_DEFAULT ?= SIZE |
4006 | 197 else |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
198 OPT_CFLAGS_DEFAULT ?= SPEED |
4006 | 199 endif |
3960 | 200 |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
201 ifdef OPT_CFLAGS |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
202 ifneq ("$(origin OPT_CFLAGS)", "command line") |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
203 $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.") |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
204 endif |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
205 endif |
3960 | 206 |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
207 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
208 |
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6129
diff
changeset
|
209 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp |
3960 | 210 # if we use expensive-optimizations |
211 ifeq ($(BUILDARCH), ia64) | |
212 OPT_CFLAGS += -fno-expensive-optimizations | |
213 endif | |
214 | |
215 OPT_CFLAGS/NOOPT=-O0 | |
216 | |
217 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. | |
218 ifneq "$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) = 3 \) \))" "0" | |
219 OPT_CFLAGS/mulnode.o += -O0 | |
220 endif | |
221 | |
222 # Flags for generating make dependency flags. | |
223 ifneq ("${CC_VER_MAJOR}", "2") | |
6129
4d399f013e5a
7175914: Usage of gcc with precompiled headers produces wrong build dependencies
kamg
parents:
5946
diff
changeset
|
224 DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) |
3960 | 225 endif |
226 | |
227 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. | |
4129
f4414323345f
7116081: USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM
stefank
parents:
4033
diff
changeset
|
228 ifeq ($(USE_PRECOMPILED_HEADER),0) |
3960 | 229 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER |
230 endif | |
231 | |
8682 | 232 ifeq ($(OS_VENDOR), Darwin) |
233 # Setting these parameters makes it an error to link to macosx APIs that are | |
234 # newer than the given OS version and makes the linked binaries compatible even | |
235 # if built on a newer version of the OS. | |
236 # The expected format is X.Y.Z | |
237 ifeq ($(MACOSX_VERSION_MIN),) | |
238 MACOSX_VERSION_MIN=10.7.0 | |
239 endif | |
240 # The macro takes the version with no dots, ex: 1070 | |
241 CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \ | |
242 -mmacosx-version-min=$(MACOSX_VERSION_MIN) | |
243 LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) | |
244 endif | |
245 | |
3960 | 246 #------------------------------------------------------------------------ |
247 # Linker flags | |
248 | |
249 # statically link libstdc++.so, work with gcc but ignored by g++ | |
250 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic | |
251 | |
252 # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x. | |
253 ifneq ("${CC_VER_MAJOR}", "2") | |
254 STATIC_LIBGCC += -static-libgcc | |
255 endif | |
256 | |
257 ifeq ($(BUILDARCH), ia64) | |
258 LFLAGS += -Wl,-relax | |
259 endif | |
260 | |
261 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. | |
262 MAPFLAG = -Xlinker --version-script=FILENAME | |
263 | |
264 # | |
265 # Shared Library | |
266 # | |
267 ifeq ($(OS_VENDOR), Darwin) | |
268 # Standard linker flags | |
269 LFLAGS += | |
270 | |
271 # Darwin doesn't use ELF and doesn't support version scripts | |
272 LDNOMAP = true | |
273 | |
274 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj | |
275 SONAMEFLAG = | |
276 | |
277 # Build shared library | |
4006 | 278 SHARED_FLAG = -Wl,-install_name,@rpath/$(@F) -dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $(VM_PICFLAG) |
3960 | 279 |
280 # Keep symbols even they are not used | |
281 #AOUT_FLAGS += -Xlinker -export-dynamic | |
282 else | |
283 # Enable linker optimization | |
284 LFLAGS += -Xlinker -O1 | |
285 | |
286 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj | |
287 SONAMEFLAG = -Xlinker -soname=SONAME | |
288 | |
289 # Build shared library | |
290 SHARED_FLAG = -shared $(VM_PICFLAG) | |
291 | |
292 # Keep symbols even they are not used | |
293 AOUT_FLAGS += -Xlinker -export-dynamic | |
294 endif | |
295 | |
296 #------------------------------------------------------------------------ | |
297 # Debug flags | |
298 | |
299 # Use the stabs format for debugging information (this is the default | |
300 # on gcc-2.91). It's good enough, has all the information about line | |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6856
diff
changeset
|
301 # numbers and local variables, and libjvm.so is only about 16M. |
3960 | 302 # Change this back to "-g" if you want the most expressive format. |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6856
diff
changeset
|
303 # (warning: that could easily inflate libjvm.so to 150M!) |
3960 | 304 # Note: The Itanium gcc compiler crashes when using -gstabs. |
305 DEBUG_CFLAGS/ia64 = -g | |
306 DEBUG_CFLAGS/amd64 = -g | |
307 DEBUG_CFLAGS/arm = -g | |
308 DEBUG_CFLAGS/ppc = -g | |
309 DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) | |
310 ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) | |
311 DEBUG_CFLAGS += -gstabs | |
312 endif | |
313 | |
314 # DEBUG_BINARIES overrides everything, use full -g debug information | |
315 ifeq ($(DEBUG_BINARIES), true) | |
316 DEBUG_CFLAGS = -g | |
317 CFLAGS += $(DEBUG_CFLAGS) | |
318 endif | |
319 | |
320 # If we are building HEADLESS, pass on to VM | |
321 # so it can set the java.awt.headless property | |
322 ifdef HEADLESS | |
323 CFLAGS += -DHEADLESS | |
324 endif | |
325 | |
326 # We are building Embedded for a small device | |
327 # favor code space over speed | |
328 ifdef MINIMIZE_RAM_USAGE | |
329 CFLAGS += -DMINIMIZE_RAM_USAGE | |
330 endif |