annotate make/solaris/makefiles/dtrace.make @ 6095:9c1709c4c80c

7165598: enable FDS on Solaris X64 when 7165593 is fixed Summary: Work around 'gobjcopy' failure on Solaris X64 by adding a temporary tool that removes the SHF_ALLOC flag from "empty" section headers. Reviewed-by: sspitsyn, acorn
author dcubed
date Thu, 24 May 2012 12:03:42 -0700
parents d652a62d6e03
children d1b0644d6acf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1123
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1123
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: 1123
diff changeset
21 # questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Rules to build jvm_db/dtrace, used by vm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
26
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
27 # We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
28 # but not for CORE or KERNEL configurations.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 ifneq ("${TYPE}", "CORE")
a61af66fc99e Initial load
duke
parents:
diff changeset
31 ifneq ("${TYPE}", "KERNEL")
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
36 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 else
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 JVM_DB = libjvm_db
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
41 LIBJVM_DB = libjvm_db.so
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
42 LIBJVM_DB_G = libjvm$(G_SUFFIX)_db.so
0
a61af66fc99e Initial load
duke
parents:
diff changeset
43
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
44 LIBJVM_DB_DEBUGINFO = libjvm_db.debuginfo
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
45 LIBJVM_DB_DIZ = libjvm_db.diz
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
46 LIBJVM_DB_G_DEBUGINFO = libjvm$(G_SUFFIX)_db.debuginfo
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
47 LIBJVM_DB_G_DIZ = libjvm$(G_SUFFIX)_db.diz
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
48
0
a61af66fc99e Initial load
duke
parents:
diff changeset
49 JVM_DTRACE = jvm_dtrace
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
50 LIBJVM_DTRACE = libjvm_dtrace.so
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
51 LIBJVM_DTRACE_G = libjvm$(G_SUFFIX)_dtrace.so
0
a61af66fc99e Initial load
duke
parents:
diff changeset
52
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
53 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.debuginfo
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
54 LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
55 LIBJVM_DTRACE_G_DEBUGINFO = libjvm$(G_SUFFIX)_dtrace.debuginfo
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
56 LIBJVM_DTRACE_G_DIZ = libjvm$(G_SUFFIX)_dtrace.diz
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
57
0
a61af66fc99e Initial load
duke
parents:
diff changeset
58 JVMOFFS = JvmOffsets
a61af66fc99e Initial load
duke
parents:
diff changeset
59 JVMOFFS.o = $(JVMOFFS).o
a61af66fc99e Initial load
duke
parents:
diff changeset
60 GENOFFS = generate$(JVMOFFS)
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
63 DTRACE = dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
64 DTRACE.o = $(DTRACE).o
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 # to remove '-g' option which causes link problems
a61af66fc99e Initial load
duke
parents:
diff changeset
67 # also '-z nodefs' is used as workaround
a61af66fc99e Initial load
duke
parents:
diff changeset
68 GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';)
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 ifdef LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
71 DTRACE_OPTS = -64 -D_LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
72 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 # making libjvm_db
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 # Use mapfile with libjvm_db.so
a61af66fc99e Initial load
duke
parents:
diff changeset
77 LIBJVM_DB_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_db
a61af66fc99e Initial load
duke
parents:
diff changeset
78 LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 # Use mapfile with libjvm_dtrace.so
a61af66fc99e Initial load
duke
parents:
diff changeset
81 LIBJVM_DTRACE_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
82 LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
85 LFLAGS_JVM_DB += -D_REENTRANT $(PICFLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
86 LFLAGS_JVM_DTRACE += -D_REENTRANT $(PICFLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
87 else
a61af66fc99e Initial load
duke
parents:
diff changeset
88 LFLAGS_JVM_DB += -mt $(PICFLAG) -xnolib
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
89 LFLAGS_JVM_DTRACE += -mt $(PICFLAG) -xnolib -ldl
0
a61af66fc99e Initial load
duke
parents:
diff changeset
90 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 ISA = $(subst i386,i486,$(shell isainfo -n))
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so
a61af66fc99e Initial load
duke
parents:
diff changeset
95 ifneq ("${ISA}","${BUILDARCH}")
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97 XLIBJVM_DB = 64/$(LIBJVM_DB)
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
98 XLIBJVM_DB_G = 64/$(LIBJVM_DB_G)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
99 XLIBJVM_DTRACE = 64/$(LIBJVM_DTRACE)
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
100 XLIBJVM_DTRACE_G = 64/$(LIBJVM_DTRACE_G)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
101
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
102 XLIBJVM_DB_DEBUGINFO = 64/$(LIBJVM_DB_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
103 XLIBJVM_DB_DIZ = 64/$(LIBJVM_DB_DIZ)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
104 XLIBJVM_DB_G_DEBUGINFO = 64/$(LIBJVM_DB_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
105 XLIBJVM_DB_G_DIZ = 64/$(LIBJVM_DB_G_DIZ)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
106 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
107 XLIBJVM_DTRACE_DIZ = 64/$(LIBJVM_DTRACE_DIZ)
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO)
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
109 XLIBJVM_DTRACE_G_DIZ = 64/$(LIBJVM_DTRACE_G_DIZ)
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
110
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
111 $(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
112 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
113 $(QUIETLY) mkdir -p 64/ ; \
433
c1345e85f901 6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents: 196
diff changeset
114 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
116 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
118 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
119 # Clear the SHF_ALLOC flag (if set) from empty section headers.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
120 # An empty section header has sh_addr == 0 and sh_size == 0.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
121 # This problem has only been seen on Solaris X64, but we call this tool
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
122 # on all Solaris builds just in case.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
123 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
124 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
125 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
126 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
127 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
128 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DB_DEBUGINFO) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
129 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
130 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
131 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
132 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
133 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
134 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
135 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
136 endif
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
137 [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
138 ifeq ($(ZIP_DEBUGINFO_FILES),1)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
139 $(ZIPEXE) -q -y $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
140 $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
141 [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
142 endif
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
143 endif
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
144
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
145 $(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
146 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
147 $(QUIETLY) mkdir -p 64/ ; \
433
c1345e85f901 6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents: 196
diff changeset
148 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
149 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
150 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
151 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
152 # Clear the SHF_ALLOC flag (if set) from empty section headers.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
153 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
154 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
155 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
156 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
157 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DTRACE_DEBUGINFO) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
158 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
159 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
160 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
161 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
162 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
163 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
164 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
165 endif
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
166 [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
167 ifeq ($(ZIP_DEBUGINFO_FILES),1)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
168 $(ZIPEXE) -q -y $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
169 $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
170 [ -f $(XLIBJVM_DTRACE_G_DIZ) ] || { ln -s $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_G_DIZ); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
171 endif
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
172 endif
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
173
0
a61af66fc99e Initial load
duke
parents:
diff changeset
174 endif # ifneq ("${ISA}","${BUILDARCH}")
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
177 LFLAGS_GENOFFS += -D_REENTRANT
a61af66fc99e Initial load
duke
parents:
diff changeset
178 else
a61af66fc99e Initial load
duke
parents:
diff changeset
179 LFLAGS_GENOFFS += -mt -xnolib -norunpath
a61af66fc99e Initial load
duke
parents:
diff changeset
180 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
181
a61af66fc99e Initial load
duke
parents:
diff changeset
182 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
183 $(LIBJVM.o)
4891
719f7007c8e8 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 3954
diff changeset
184 $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
185 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc
a61af66fc99e Initial load
duke
parents:
diff changeset
186
a61af66fc99e Initial load
duke
parents:
diff changeset
187 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).so
4891
719f7007c8e8 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 3954
diff changeset
188 $(QUIETLY) $(LINK.CXX) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
189 ./lib$(GENOFFS).so
a61af66fc99e Initial load
duke
parents:
diff changeset
190
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
191 CONDITIONALLY_UPDATE_JVMOFFS_TARGET = \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
192 cmp -s $@ $@.tmp; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
193 case $$? in \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
194 0) rm -f $@.tmp;; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
195 *) rm -f $@ && mv $@.tmp $@ && echo Updated $@;; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
196 esac
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
197
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
198 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
199 $(JVMOFFS).h: $(GENOFFS)
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
200 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -header > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
201 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
202
a61af66fc99e Initial load
duke
parents:
diff changeset
203 $(JVMOFFS)Index.h: $(GENOFFS)
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
204 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -index > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
205 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
206
a61af66fc99e Initial load
duke
parents:
diff changeset
207 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
208 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -table > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
209 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
210
a61af66fc99e Initial load
duke
parents:
diff changeset
211 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp
4891
719f7007c8e8 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 3954
diff changeset
212 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp
0
a61af66fc99e Initial load
duke
parents:
diff changeset
213
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
214 $(LIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
215 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
216 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
217 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
218 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
219 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
220 # Clear the SHF_ALLOC flag (if set) from empty section headers.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
221 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
222 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
223 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
224 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
225 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DB_DEBUGINFO) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
226 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
227 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
228 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
229 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
230 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
231 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
232 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
233 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
234 [ -f $(LIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
235 ifeq ($(ZIP_DEBUGINFO_FILES),1)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
236 $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
237 $(RM) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
238 [ -f $(LIBJVM_DB_G_DIZ) ] || { ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
239 endif
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
240 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
241
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
242 $(LIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
243 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
244 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
a61af66fc99e Initial load
duke
parents:
diff changeset
245 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
246 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
247 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
248 # Clear the SHF_ALLOC flag (if set) from empty section headers.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
249 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
250 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO)
6095
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
251 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
252 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@
9c1709c4c80c 7165598: enable FDS on Solaris X64 when 7165593 is fixed
dcubed
parents: 6020
diff changeset
253 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DTRACE_DEBUGINFO) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
254 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
255 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
256 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
257 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
258 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
259 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
260 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
261 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
262 [ -f $(LIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); }
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
263 ifeq ($(ZIP_DEBUGINFO_FILES),1)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
264 $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
265 $(RM) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO)
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
266 [ -f $(LIBJVM_DTRACE_G_DIZ) ] || { ln -s $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_G_DIZ); }
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
267 endif
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 1972
diff changeset
268 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
a61af66fc99e Initial load
duke
parents:
diff changeset
271 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
a61af66fc99e Initial load
duke
parents:
diff changeset
272 $(QUIETLY) cat $^ > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
273
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
274 DTraced_Files = ciEnv.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
275 classLoadingService.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
276 compileBroker.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
277 hashtable.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
278 instanceKlass.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
279 java.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
280 jni.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
281 jvm.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
282 memoryManager.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
283 nmethod.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
284 objectMonitor.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
285 runtimeService.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
286 sharedRuntime.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
287 synchronizer.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
288 thread.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
289 unsafe.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
290 vmThread.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
291 vmCMSOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
292 vmPSOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
293 vmGCOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
294
0
a61af66fc99e Initial load
duke
parents:
diff changeset
295 # Dtrace is available, so we build $(DTRACE.o)
a61af66fc99e Initial load
duke
parents:
diff changeset
296 $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
a61af66fc99e Initial load
duke
parents:
diff changeset
297 @echo Compiling $(DTRACE).d
a61af66fc99e Initial load
duke
parents:
diff changeset
298
1799
4094f07967ca 6974813: JVM needs to use demand loading for its DTrace probes
kamg
parents: 1552
diff changeset
299 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
300 $(DTraced_Files) ||\
a61af66fc99e Initial load
duke
parents:
diff changeset
301 STATUS=$$?;\
a61af66fc99e Initial load
duke
parents:
diff changeset
302 if [ x"$$STATUS" = x"1" -a \
a61af66fc99e Initial load
duke
parents:
diff changeset
303 x`uname -r` = x"5.10" -a \
a61af66fc99e Initial load
duke
parents:
diff changeset
304 x`uname -p` = x"sparc" ]; then\
a61af66fc99e Initial load
duke
parents:
diff changeset
305 echo "*****************************************************************";\
a61af66fc99e Initial load
duke
parents:
diff changeset
306 echo "* If you are building server compiler, and the error message is ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
307 echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
308 echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\
a61af66fc99e Initial load
duke
parents:
diff changeset
309 echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
310 echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
311 echo "* dtrace probes for this build.";\
a61af66fc99e Initial load
duke
parents:
diff changeset
312 echo "*****************************************************************";\
a61af66fc99e Initial load
duke
parents:
diff changeset
313 fi;\
a61af66fc99e Initial load
duke
parents:
diff changeset
314 exit $$STATUS
a61af66fc99e Initial load
duke
parents:
diff changeset
315 # Since some DTraced_Files are in LIBJVM.o and they are touched by this
a61af66fc99e Initial load
duke
parents:
diff changeset
316 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will
a61af66fc99e Initial load
duke
parents:
diff changeset
317 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets*
a61af66fc99e Initial load
duke
parents:
diff changeset
318 # files, but it doesn't, so we touch the necessary files to prevent later
a61af66fc99e Initial load
duke
parents:
diff changeset
319 # recompilation. Note: we only touch the necessary files if they already
a61af66fc99e Initial load
duke
parents:
diff changeset
320 # exist in order to close a race where an empty file can be created
a61af66fc99e Initial load
duke
parents:
diff changeset
321 # before the real build rule is executed.
a61af66fc99e Initial load
duke
parents:
diff changeset
322 # But, we can't touch the *.h files: This rule depends
a61af66fc99e Initial load
duke
parents:
diff changeset
323 # on them, and that would cause an infinite cycle of rebuilding.
a61af66fc99e Initial load
duke
parents:
diff changeset
324 # Neither the *.h or *.ccp files need to be touched, since they have
a61af66fc99e Initial load
duke
parents:
diff changeset
325 # rules which do not update them when the generator file has not
a61af66fc99e Initial load
duke
parents:
diff changeset
326 # changed their contents.
a61af66fc99e Initial load
duke
parents:
diff changeset
327 $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi
a61af66fc99e Initial load
duke
parents:
diff changeset
328 $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi
a61af66fc99e Initial load
duke
parents:
diff changeset
329 $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi
a61af66fc99e Initial load
duke
parents:
diff changeset
330
a61af66fc99e Initial load
duke
parents:
diff changeset
331 .PHONY: dtraceCheck
a61af66fc99e Initial load
duke
parents:
diff changeset
332
116
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
333 SYSTEM_DTRACE_H = /usr/include/dtrace.h
0
a61af66fc99e Initial load
duke
parents:
diff changeset
334 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
335 PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
336 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG})
a61af66fc99e Initial load
duke
parents:
diff changeset
337 patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG})
116
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
338 systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H))
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
339
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
340 ifneq ("$(systemDtraceHdrFound)", "")
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
341 CFLAGS += -DHAVE_DTRACE_H
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
342 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
343
a61af66fc99e Initial load
duke
parents:
diff changeset
344 ifneq ("$(patchDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
345 DTRACE_PROG=$(PATCH_DTRACE_PROG)
a61af66fc99e Initial load
duke
parents:
diff changeset
346 DTRACE_INCL=-I/opt/SUNWdtrd/include
a61af66fc99e Initial load
duke
parents:
diff changeset
347 else
a61af66fc99e Initial load
duke
parents:
diff changeset
348 ifneq ("$(systemDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
349 DTRACE_PROG=$(SYSTEM_DTRACE_PROG)
a61af66fc99e Initial load
duke
parents:
diff changeset
350 else
a61af66fc99e Initial load
duke
parents:
diff changeset
351
a61af66fc99e Initial load
duke
parents:
diff changeset
352 endif # ifneq ("$(systemDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
353 endif # ifneq ("$(patchDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
354
a61af66fc99e Initial load
duke
parents:
diff changeset
355 ifneq ("${DTRACE_PROG}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
356 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
357
a61af66fc99e Initial load
duke
parents:
diff changeset
358 DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o)
a61af66fc99e Initial load
duke
parents:
diff changeset
359 CFLAGS += $(DTRACE_INCL) -DDTRACE_ENABLED
a61af66fc99e Initial load
duke
parents:
diff changeset
360 MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE)
a61af66fc99e Initial load
duke
parents:
diff changeset
361
a61af66fc99e Initial load
duke
parents:
diff changeset
362 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
363
a61af66fc99e Initial load
duke
parents:
diff changeset
364 else # manually disabled
a61af66fc99e Initial load
duke
parents:
diff changeset
365
a61af66fc99e Initial load
duke
parents:
diff changeset
366 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
367 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable"
a61af66fc99e Initial load
duke
parents:
diff changeset
368
a61af66fc99e Initial load
duke
parents:
diff changeset
369 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
370
a61af66fc99e Initial load
duke
parents:
diff changeset
371 else # No dtrace program found
a61af66fc99e Initial load
duke
parents:
diff changeset
372
a61af66fc99e Initial load
duke
parents:
diff changeset
373 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
374 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system"
a61af66fc99e Initial load
duke
parents:
diff changeset
375
a61af66fc99e Initial load
duke
parents:
diff changeset
376 endif # ifneq ("${dtraceFound}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
377
a61af66fc99e Initial load
duke
parents:
diff changeset
378 endif # ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
379
a61af66fc99e Initial load
duke
parents:
diff changeset
380 else # KERNEL build
a61af66fc99e Initial load
duke
parents:
diff changeset
381
a61af66fc99e Initial load
duke
parents:
diff changeset
382 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
383 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
384
a61af66fc99e Initial load
duke
parents:
diff changeset
385 endif # ifneq ("${TYPE}", "KERNEL")
a61af66fc99e Initial load
duke
parents:
diff changeset
386
a61af66fc99e Initial load
duke
parents:
diff changeset
387 else # CORE build
a61af66fc99e Initial load
duke
parents:
diff changeset
388
a61af66fc99e Initial load
duke
parents:
diff changeset
389 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
390 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
391
a61af66fc99e Initial load
duke
parents:
diff changeset
392 endif # ifneq ("${TYPE}", "CORE")