annotate make/solaris/makefiles/saproc.make @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 4ca6dc0799b6 8c76e844a7f9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
20640
8c76e844a7f9 8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents: 7408
diff changeset
2 # Copyright (c) 2005, 2014, 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 serviceability agent library, used by vm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
26
7408
892acf0431ef 7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents: 6782
diff changeset
27 # libsaproc.so: serviceability agent
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
28
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
29 SAPROC = saproc
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
30 SADIS = sadis
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 LIBSAPROC = lib$(SAPROC).so
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
32 SADISOBJ = $(SADIS).o
0
a61af66fc99e Initial load
duke
parents:
diff changeset
33
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
34 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
35 LIBSAPROC_DIZ = lib$(SAPROC).diz
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
36
0
a61af66fc99e Initial load
duke
parents:
diff changeset
37 AGENT_DIR = $(GAMMADIR)/agent
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 SASRCFILES = $(SASRCDIR)/saproc.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
42
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
43 SADISSRCFILES = $(AGENT_DIR)/src/share/native/sadis.c
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
44
0
a61af66fc99e Initial load
duke
parents:
diff changeset
45 SAMAPFILE = $(SASRCDIR)/mapfile
a61af66fc99e Initial load
duke
parents:
diff changeset
46
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
47 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
48 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
49 DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 # if $(AGENT_DIR) does not exist, we don't build SA
a61af66fc99e Initial load
duke
parents:
diff changeset
52
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
53 ifneq ($(wildcard $(AGENT_DIR)),)
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
54 BUILDLIBSAPROC = $(LIBSAPROC)
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
55 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
60 SA_LFLAGS += -D_REENTRANT
a61af66fc99e Initial load
duke
parents:
diff changeset
61 else
a61af66fc99e Initial load
duke
parents:
diff changeset
62 SA_LFLAGS += -mt -xnolib -norunpath
a61af66fc99e Initial load
duke
parents:
diff changeset
63 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
64
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
65 # The libproc Pstack_iter() interface changed in Nevada-B159.
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
66 # Use 'uname -r -v' to determine the Solaris version as per
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
67 # Solaris Nevada team request. This logic needs to match:
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
68 # agent/src/os/solaris/proc/saproc.cpp: set_has_newer_Pstack_iter():
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
69 # - skip SunOS 4 or older
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
70 # - skip Solaris 10 or older
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
71 # - skip two digit internal Nevada builds
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
72 # - skip three digit internal Nevada builds thru 149
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
73 # - skip internal Nevada builds 150-158
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
74 # - if not skipped, print define for Nevada-B159 or later
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
75 SOLARIS_11_B159_OR_LATER := \
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
76 $(shell uname -r -v \
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
77 | sed -n \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
78 -e '/^[0-4]\. /b' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
79 -e '/^5\.[0-9] /b' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
80 -e '/^5\.10 /b' \
3846
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
81 -e '/ snv_[0-9][0-9]$$/b' \
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
82 -e '/ snv_[01][0-4][0-9]$$/b' \
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
83 -e '/ snv_15[0-8]$$/b' \
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
84 -e 's/.*/-DSOLARIS_11_B159_OR_LATER/' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
85 -e 'p' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
86 )
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
87
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
88 # Uncomment the following to simulate building on Nevada-B159 or later
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
89 # when actually building on Nevada-B158 or earlier:
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
90 #SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
91
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
92
20640
8c76e844a7f9 8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents: 7408
diff changeset
93 $(LIBSAPROC): $(SASRCFILES) $(SADISOBJ) $(SAMAPFILE)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
94 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
a61af66fc99e Initial load
duke
parents:
diff changeset
95 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
96 exit 1; \
a61af66fc99e Initial load
duke
parents:
diff changeset
97 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
98 @echo Making SA debugger back-end...
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
99 $(QUIETLY) $(CXX) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
100 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
a61af66fc99e Initial load
duke
parents:
diff changeset
101 -I$(SASRCDIR) \
a61af66fc99e Initial load
duke
parents:
diff changeset
102 -I$(GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
103 -I$(BOOT_JAVA_HOME)/include \
a61af66fc99e Initial load
duke
parents:
diff changeset
104 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
105 $(SOLARIS_11_B159_OR_LATER) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
106 $(SASRCFILES) \
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
107 $(SADISOBJ) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
108 $(SA_LFLAGS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
109 -o $@ \
a61af66fc99e Initial load
duke
parents:
diff changeset
110 -ldl -ldemangle -lthread -lc
6782
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
111
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
112 $(SADISOBJ): $(SADISSRCFILES)
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
113 $(QUIETLY) $(CC) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
114 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
115 -I$(SASRCDIR) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
116 -I$(GENERATED) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
117 -I$(BOOT_JAVA_HOME)/include \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
118 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
119 $(SOLARIS_11_B159_OR_LATER) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
120 $(SADISSRCFILES) \
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
121 -c -o $(SADISOBJ)
5a98bf7d847b 6879063: SA should use hsdis for disassembly
minqi
parents: 6095
diff changeset
122
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
123 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
124 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
20640
8c76e844a7f9 8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents: 7408
diff changeset
125 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
126 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
127 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
128 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
129 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
130 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
131 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
132 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
133 endif
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
134 ifeq ($(ZIP_DEBUGINFO_FILES),1)
7408
892acf0431ef 7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents: 6782
diff changeset
135 $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
892acf0431ef 7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents: 6782
diff changeset
136 $(RM) $(LIBSAPROC_DEBUGINFO)
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
137 endif
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
138 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
139
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
140 install_saproc: $(BULDLIBSAPROC)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
141 $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
a61af66fc99e Initial load
duke
parents:
diff changeset
142 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
143 test -f $(LIBSAPROC_DEBUGINFO) && \
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
144 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
6020
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
145 test -f $(LIBSAPROC_DIZ) && \
d652a62d6e03 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 4891
diff changeset
146 cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
148 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
149
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
150 .PHONY: install_saproc