annotate make/solaris/makefiles/saproc.make @ 4155:394404b2d9bd

Removed strict requirement for GRAAL environment variable. It only needs to be set now if the graal directory is not in the directory hierarchy of GraalVM JDK.
author Doug Simon <doug.simon@oracle.com>
date Wed, 21 Dec 2011 11:25:27 +0100
parents da0999c4b733
children 719f7007c8e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
2 # Copyright (c) 2005, 2011, 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
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # libsaproc[_g].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
0
a61af66fc99e Initial load
duke
parents:
diff changeset
30 LIBSAPROC = lib$(SAPROC).so
a61af66fc99e Initial load
duke
parents:
diff changeset
31
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
32 SAPROC_G = $(SAPROC)$(G_SUFFIX)
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
33 LIBSAPROC_G = lib$(SAPROC_G).so
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
34
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
35 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
36 LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
37
0
a61af66fc99e Initial load
duke
parents:
diff changeset
38 AGENT_DIR = $(GAMMADIR)/agent
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 SASRCFILES = $(SASRCDIR)/saproc.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 SAMAPFILE = $(SASRCDIR)/mapfile
a61af66fc99e Initial load
duke
parents:
diff changeset
45
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
46 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
47 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 # if $(AGENT_DIR) does not exist, we don't build SA
a61af66fc99e Initial load
duke
parents:
diff changeset
50
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
51 ifneq ($(wildcard $(AGENT_DIR)),)
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
52 BUILDLIBSAPROC = $(LIBSAPROC)
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
53 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
58 SA_LFLAGS += -D_REENTRANT
a61af66fc99e Initial load
duke
parents:
diff changeset
59 else
a61af66fc99e Initial load
duke
parents:
diff changeset
60 SA_LFLAGS += -mt -xnolib -norunpath
a61af66fc99e Initial load
duke
parents:
diff changeset
61 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
62
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
63 # 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
64 # 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
65 # 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
66 # 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
67 # - 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
68 # - skip Solaris 10 or older
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
69 # - skip two digit internal Nevada builds
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
70 # - 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
71 # - skip internal Nevada builds 150-158
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
72 # - 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
73 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
74 $(shell uname -r -v \
3354
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
75 | sed -n \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
76 -e '/^[0-4]\. /b' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
77 -e '/^5\.[0-9] /b' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
78 -e '/^5\.10 /b' \
3846
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
79 -e '/ snv_[0-9][0-9]$$/b' \
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
80 -e '/ snv_[01][0-4][0-9]$$/b' \
4aa5974a06dd 7075559: JPRT windows_x64 build failure
kvn
parents: 3354
diff changeset
81 -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
82 -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
83 -e 'p' \
357d1f583599 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
dcubed
parents: 3306
diff changeset
84 )
3306
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
85
405c634f4aaa 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
dcubed
parents: 2042
diff changeset
86 # 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
87 # 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
88 #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
89
0
a61af66fc99e Initial load
duke
parents:
diff changeset
90 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
91 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
a61af66fc99e Initial load
duke
parents:
diff changeset
92 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
93 exit 1; \
a61af66fc99e Initial load
duke
parents:
diff changeset
94 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
95 @echo Making SA debugger back-end...
a61af66fc99e Initial load
duke
parents:
diff changeset
96 $(QUIETLY) $(CPP) \
a61af66fc99e Initial load
duke
parents:
diff changeset
97 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
a61af66fc99e Initial load
duke
parents:
diff changeset
98 -I$(SASRCDIR) \
a61af66fc99e Initial load
duke
parents:
diff changeset
99 -I$(GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
100 -I$(BOOT_JAVA_HOME)/include \
a61af66fc99e Initial load
duke
parents:
diff changeset
101 -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
102 $(SOLARIS_11_B159_OR_LATER) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
103 $(SASRCFILES) \
a61af66fc99e Initial load
duke
parents:
diff changeset
104 $(SA_LFLAGS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
105 -o $@ \
a61af66fc99e Initial load
duke
parents:
diff changeset
106 -ldl -ldemangle -lthread -lc
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 196
diff changeset
107 [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
108 ifneq ($(OBJCOPY),)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
109 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
110 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
111 ifeq ($(STRIP_POLICY),all_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
112 $(QUIETLY) $(STRIP) $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
113 else
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
114 ifeq ($(STRIP_POLICY),min_strip)
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
115 $(QUIETLY) $(STRIP) -x $@
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
116 # implied else here is no stripping at all
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
117 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
118 endif
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
119 [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); }
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
120 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
121
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
122 install_saproc: $(BULDLIBSAPROC)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
123 $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
a61af66fc99e Initial load
duke
parents:
diff changeset
124 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
125 test -f $(LIBSAPROC_DEBUGINFO) && \
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 3846
diff changeset
126 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
127 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
128 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
129
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
130 .PHONY: install_saproc