comparison make/solaris/makefiles/vm.make @ 10405:f2110083203d

8005849: JEP 167: Event-Based JVM Tracing Reviewed-by: acorn, coleenp, sla Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author sla
date Mon, 10 Jun 2013 11:30:51 +0200
parents aabf54ccedb1
children 836a62f43af9 feae15578b2f
comparison
equal deleted inserted replaced
10404:d0add7016434 10405:f2110083203d
1 # 1 #
2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 # Copyright (c) 1998, 2013, 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.
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 # 18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 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 20 # or visit www.oracle.com if you need additional information or have any
21 # questions. 21 # questions.
22 # 22 #
23 # 23 #
24 24
25 # Rules to build JVM and related libraries, included from vm.make in the build 25 # Rules to build JVM and related libraries, included from vm.make in the build
26 # directory. 26 # directory.
27 27
46 46
47 # set VPATH so make knows where to look for source files 47 # set VPATH so make knows where to look for source files
48 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm 48 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
49 # The adfiles directory contains ad_<arch>.[ch]pp. 49 # The adfiles directory contains ad_<arch>.[ch]pp.
50 # The jvmtifiles directory contains jvmti*.[ch]pp 50 # The jvmtifiles directory contains jvmti*.[ch]pp
51 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles 51 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
52 VPATH += $(Src_Dirs_V:%=%:) 52 VPATH += $(Src_Dirs_V:%=%:)
53 53
54 # set INCLUDES for C preprocessor 54 # set INCLUDES for C preprocessor
55 Src_Dirs_I += $(GENERATED) 55 Src_Dirs_I += $(GENERATED)
56 INCLUDES += $(Src_Dirs_I:%=-I%) 56 INCLUDES += $(Src_Dirs_I:%=-I%)
85 ${HS_LIB_ARCH} \ 85 ${HS_LIB_ARCH} \
86 ${VM_DISTRO} 86 ${VM_DISTRO}
87 87
88 # This is VERY important! The version define must only be supplied to vm_version.o 88 # This is VERY important! The version define must only be supplied to vm_version.o
89 # If not, ccache will not re-use the cache at all, since the version string might contain 89 # If not, ccache will not re-use the cache at all, since the version string might contain
90 # a time and date. 90 # a time and date.
91 CXXFLAGS/vm_version.o += ${JRE_VERSION} 91 CXXFLAGS/vm_version.o += ${JRE_VERSION}
92 92
93 CXXFLAGS/BYFILE = $(CXXFLAGS/$@) 93 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
94 94
95 # File specific flags 95 # File specific flags
101 101
102 # Do not use C++ exception handling 102 # Do not use C++ exception handling
103 CFLAGS += $(CFLAGS/NOEX) 103 CFLAGS += $(CFLAGS/NOEX)
104 104
105 # Extra flags from gnumake's invocation or environment 105 # Extra flags from gnumake's invocation or environment
106 CFLAGS += $(EXTRA_CFLAGS) -DINCLUDE_TRACE 106 CFLAGS += $(EXTRA_CFLAGS)
107 107
108 # Math Library (libm.so), do not use -lm. 108 # Math Library (libm.so), do not use -lm.
109 # There might be two versions of libm.so on the build system: 109 # There might be two versions of libm.so on the build system:
110 # libm.so.1 and libm.so.2, and we want libm.so.1. 110 # libm.so.1 and libm.so.2, and we want libm.so.1.
111 # Depending on the Solaris release being used to build with, 111 # Depending on the Solaris release being used to build with,
135 endif # 505 135 endif # 505
136 else 136 else
137 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle 137 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
138 endif # sparcWorks 138 endif # sparcWorks
139 139
140 ifeq ("${Platform_arch}", "sparc")
141 LIBS += -lkstat 140 LIBS += -lkstat
142 endif
143 141
144 # By default, link the *.o into the library, not the executable. 142 # By default, link the *.o into the library, not the executable.
145 LINK_INTO$(LINK_INTO) = LIBJVM 143 LINK_INTO$(LINK_INTO) = LIBJVM
146 144
147 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH) 145 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
175 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm 173 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
176 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm 174 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
177 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm 175 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
178 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm 176 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
179 177
180 SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \ 178 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
179 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
180
181 ifneq ($(INCLUDE_TRACE), false)
182 CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
181 find $(HS_ALT_SRC)/share/vm/jfr -type d; \ 183 find $(HS_ALT_SRC)/share/vm/jfr -type d; \
182 fi) 184 fi)
183 185 endif
184 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
185 CORE_PATHS+=$(GENERATED)/jvmtifiles
186 186
187 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) 187 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
188 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1 188 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
189 189
190 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto) 190 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
285 LINK_VM = $(LINK_LIB.CC) 285 LINK_VM = $(LINK_LIB.CC)
286 else 286 else
287 LINK_VM = $(LINK_LIB.CXX) 287 LINK_VM = $(LINK_LIB.CXX)
288 endif 288 endif
289 # making the library: 289 # making the library:
290 $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE) 290 $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
291 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) 291 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
292 @echo Linking vm... 292 @echo Linking vm...
293 $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK) 293 $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
294 $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM) 294 $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
295 $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) 295 $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)