Mercurial > hg > truffle
annotate make/solaris/makefiles/vm.make @ 2125:7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
Summary: Make JvmtiGCMark safe to run non-safepoint and instrument CMS
Reviewed-by: ysr, dcubed
author | kamg |
---|---|
date | Mon, 10 Jan 2011 17:14:53 -0500 |
parents | 5a1e52a439fa |
children | 5d801e6b9a80 |
rev | line source |
---|---|
0 | 1 # |
1972 | 2 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 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 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Rules to build JVM and related libraries, included from vm.make in the build | |
26 # directory. | |
27 | |
28 # Common build rules. | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles |
0 | 30 include $(MAKEFILES_DIR)/rules.make |
31 | |
32 default: build | |
33 | |
34 #---------------------------------------------------------------------- | |
35 # Defs | |
36 | |
37 GENERATED = ../generated | |
1972 | 38 DEP_DIR = $(GENERATED)/dependencies |
0 | 39 |
1972 | 40 # reads the generated files defining the set of .o's and the .o .h dependencies |
41 -include $(DEP_DIR)/*.d | |
0 | 42 |
43 # read machine-specific adjustments (%%% should do this via buildtree.make?) | |
44 include $(MAKEFILES_DIR)/$(BUILDARCH).make | |
45 | |
46 # set VPATH so make knows where to look for source files | |
1972 | 47 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm |
0 | 48 # The adfiles directory contains ad_<arch>.[ch]pp. |
49 # The jvmtifiles directory contains jvmti*.[ch]pp | |
1972 | 50 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles |
51 VPATH += $(Src_Dirs_V:%=%:) | |
0 | 52 |
53 # set INCLUDES for C preprocessor | |
1972 | 54 Src_Dirs_I += $(GENERATED) |
0 | 55 INCLUDES += $(Src_Dirs_I:%=-I%) |
56 | |
57 ifeq (${VERSION}, debug) | |
58 SYMFLAG = -g | |
59 else | |
60 SYMFLAG = | |
61 endif | |
62 | |
63 # The following variables are defined in the generated flags.make file. | |
64 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" | |
65 JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" | |
100
c7c777385a15
6667042: PrintAssembly option does not work without special plugin
jrose
parents:
0
diff
changeset
|
66 HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\" |
0 | 67 BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\"" |
68 BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\"" | |
69 VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\"" | |
70 | |
71 CPPFLAGS = \ | |
72 ${SYSDEFS} \ | |
73 ${INCLUDES} \ | |
74 ${BUILD_VERSION} \ | |
75 ${BUILD_TARGET} \ | |
76 ${BUILD_USER} \ | |
100
c7c777385a15
6667042: PrintAssembly option does not work without special plugin
jrose
parents:
0
diff
changeset
|
77 ${HS_LIB_ARCH} \ |
0 | 78 ${JRE_VERSION} \ |
79 ${VM_DISTRO} | |
80 | |
81 # CFLAGS_WARN holds compiler options to suppress/enable warnings. | |
82 CFLAGS += $(CFLAGS_WARN) | |
83 | |
84 # Do not use C++ exception handling | |
85 CFLAGS += $(CFLAGS/NOEX) | |
86 | |
87 # Extra flags from gnumake's invocation or environment | |
88 CFLAGS += $(EXTRA_CFLAGS) | |
89 | |
90 # Math Library (libm.so), do not use -lm. | |
91 # There might be two versions of libm.so on the build system: | |
92 # libm.so.1 and libm.so.2, and we want libm.so.1. | |
93 # Depending on the Solaris release being used to build with, | |
94 # /usr/lib/libm.so could point at a libm.so.2, so we are | |
95 # explicit here so that the libjvm.so you have built will work on an | |
96 # older Solaris release that might not have libm.so.2. | |
97 # This is a critical factor in allowing builds on Solaris 10 or newer | |
98 # to run on Solaris 8 or 9. | |
99 # | |
100 LIBM=/usr/lib$(ISA_DIR)/libm.so.1 | |
101 | |
102 ifeq ("${Platform_compiler}", "sparcWorks") | |
103 # The whole megilla: | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
196
diff
changeset
|
104 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1) |
0 | 105 # Old Comment: List the libraries in the order the compiler was designed for |
106 # Not sure what the 'designed for' comment is referring too above. | |
107 # The order may not be too significant anymore, but I have placed this | |
108 # older libm before libCrun, just to make sure it's found and used first. | |
2022
2d4762ec74af
7003748: Decode C stack frames when symbols are presented (PhoneHome project)
zgu
parents:
1972
diff
changeset
|
109 LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle |
0 | 110 else |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
111 ifeq ($(COMPILER_REV_NUMERIC), 502) |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
112 # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict. |
2022
2d4762ec74af
7003748: Decode C stack frames when symbols are presented (PhoneHome project)
zgu
parents:
1972
diff
changeset
|
113 LIBS += -ldl -lthread -lsocket -lm -lsched -ldoor -ldemangle |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
114 else |
2022
2d4762ec74af
7003748: Decode C stack frames when symbols are presented (PhoneHome project)
zgu
parents:
1972
diff
changeset
|
115 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
116 endif # 502 |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
117 endif # 505 |
0 | 118 else |
2022
2d4762ec74af
7003748: Decode C stack frames when symbols are presented (PhoneHome project)
zgu
parents:
1972
diff
changeset
|
119 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
120 endif # sparcWorks |
0 | 121 |
2080 | 122 ifeq ("${Platform_arch}", "sparc") |
123 LIBS += -lkstat | |
124 endif | |
125 | |
0 | 126 # By default, link the *.o into the library, not the executable. |
127 LINK_INTO$(LINK_INTO) = LIBJVM | |
128 | |
129 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH) | |
130 | |
131 #---------------------------------------------------------------------- | |
132 # jvm_db & dtrace | |
133 include $(MAKEFILES_DIR)/dtrace.make | |
134 | |
135 #---------------------------------------------------------------------- | |
136 # JVM | |
137 | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
138 JVM = jvm |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
139 LIBJVM = lib$(JVM).so |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
430
diff
changeset
|
140 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so |
0 | 141 |
1972 | 142 CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)) |
143 CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm | |
144 CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm | |
145 CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm | |
146 CORE_PATHS += $(GENERATED)/jvmtifiles | |
147 | |
148 COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1 | |
149 | |
150 COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto | |
151 COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt | |
152 COMPILER2_PATHS += $(GENERATED)/adfiles | |
153 | |
154 # Include dirs per type. | |
155 Src_Dirs/CORE := $(CORE_PATHS) | |
156 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) | |
157 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) | |
158 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) | |
159 Src_Dirs/ZERO := $(CORE_PATHS) | |
160 Src_Dirs/SHARK := $(CORE_PATHS) | |
161 Src_Dirs := $(Src_Dirs/$(TYPE)) | |
162 | |
163 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* | |
164 COMPILER1_SPECIFIC_FILES := c1_\* | |
165 SHARK_SPECIFIC_FILES := shark | |
166 ZERO_SPECIFIC_FILES := zero | |
167 | |
168 # Always exclude these. | |
169 Src_Files_EXCLUDE := dtrace jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp | |
170 | |
171 # Exclude per type. | |
172 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
173 Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
174 Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
175 Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
176 Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
177 Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) | |
178 | |
179 Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE)) | |
180 | |
181 # Special handling of arch model. | |
182 ifeq ($(Platform_arch_model), x86_32) | |
183 Src_Files_EXCLUDE += \*x86_64\* | |
184 endif | |
185 ifeq ($(Platform_arch_model), x86_64) | |
186 Src_Files_EXCLUDE += \*x86_32\* | |
187 endif | |
188 | |
189 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. | |
190 define findsrc | |
2026
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
2023
diff
changeset
|
191 $(notdir $(shell find $(1)/. ! -name . -prune \ |
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
2023
diff
changeset
|
192 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ |
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
2023
diff
changeset
|
193 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) |
1972 | 194 endef |
195 | |
196 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) | |
197 | |
1984 | 198 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files)))) |
1972 | 199 |
0 | 200 JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS) |
201 | |
202 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) | |
203 | |
204 mapfile : $(MAPFILE) $(MAPFILE_DTRACE_OPT) | |
205 rm -f $@ | |
206 cat $^ > $@ | |
207 | |
208 mapfile_reorder : mapfile $(MAPFILE_DTRACE_OPT) $(REORDERFILE) | |
209 rm -f $@ | |
210 cat $^ > $@ | |
211 | |
212 ifeq ($(LINK_INTO),AOUT) | |
213 LIBJVM.o = | |
214 LIBJVM_MAPFILE = | |
215 LIBS_VM = $(LIBS) | |
216 else | |
217 LIBJVM.o = $(JVM_OBJ_FILES) | |
218 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder | |
219 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) | |
220 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) | |
221 ifndef USE_GCC | |
222 LIBS_VM = $(LIBS) | |
223 else | |
224 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to | |
225 # get around library dependency and compatibility issues. Must use gcc not | |
226 # g++ to link. | |
227 LFLAGS_VM += $(STATIC_LIBGCC) | |
228 LIBS_VM += $(STATIC_STDCXX) $(LIBS) | |
229 endif | |
230 endif | |
231 | |
232 ifdef USE_GCC | |
233 LINK_VM = $(LINK_LIB.c) | |
234 else | |
235 LINK_VM = $(LINK_LIB.CC) | |
236 endif | |
237 # making the library: | |
238 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
239 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
240 @echo Linking vm... |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
241 $(QUIETLY) $(LINK_LIB.CC/PRE_HOOK) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
242 $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
243 $(QUIETLY) $(LINK_LIB.CC/POST_HOOK) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
244 $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
245 $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
246 $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1 |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
247 endif # filter -sbfast -xsbfast |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
248 |
0 | 249 |
250 DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) | |
251 | |
252 install_jvm: $(LIBJVM) | |
253 @echo "Copying $(LIBJVM) to $(DEST_JVM)" | |
254 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" | |
255 | |
256 #---------------------------------------------------------------------- | |
257 # Other files | |
258 | |
259 # Gamma launcher | |
260 include $(MAKEFILES_DIR)/launcher.make | |
261 | |
262 # Signal interposition library | |
263 include $(MAKEFILES_DIR)/jsig.make | |
264 | |
265 # Serviceability agent | |
266 include $(MAKEFILES_DIR)/saproc.make | |
267 | |
268 #---------------------------------------------------------------------- | |
269 | |
1972 | 270 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) $(BUILDLIBSAPROC) dtraceCheck |
0 | 271 |
272 install: install_jvm install_jsig install_saproc | |
273 | |
274 .PHONY: default build install install_jvm |