Mercurial > hg > truffle
annotate make/solaris/makefiles/saproc.make @ 4325:0d122ed933b6
Bugfix
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Thu, 26 Jan 2012 09:17:12 -0800 |
parents | da0999c4b733 |
children | 719f7007c8e8 |
rev | line source |
---|---|
0 | 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 | 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:
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 | 22 # |
23 # | |
24 | |
25 # Rules to build serviceability agent library, used by vm.make | |
26 | |
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 | 30 LIBSAPROC = lib$(SAPROC).so |
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 | 35 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo |
36 LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo | |
37 | |
0 | 38 AGENT_DIR = $(GAMMADIR)/agent |
39 | |
40 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc | |
41 | |
42 SASRCFILES = $(SASRCDIR)/saproc.cpp | |
43 | |
44 SAMAPFILE = $(SASRCDIR)/mapfile | |
45 | |
3954 | 46 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) |
47 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) | |
0 | 48 |
49 # if $(AGENT_DIR) does not exist, we don't build SA | |
50 | |
1972 | 51 ifneq ($(wildcard $(AGENT_DIR)),) |
52 BUILDLIBSAPROC = $(LIBSAPROC) | |
53 endif | |
0 | 54 |
55 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) | |
56 | |
57 ifdef USE_GCC | |
58 SA_LFLAGS += -D_REENTRANT | |
59 else | |
60 SA_LFLAGS += -mt -xnolib -norunpath | |
61 endif | |
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 | 79 -e '/ snv_[0-9][0-9]$$/b' \ |
80 -e '/ snv_[01][0-4][0-9]$$/b' \ | |
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 | 90 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) |
91 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | |
92 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | |
93 exit 1; \ | |
94 fi | |
95 @echo Making SA debugger back-end... | |
96 $(QUIETLY) $(CPP) \ | |
97 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ | |
98 -I$(SASRCDIR) \ | |
99 -I$(GENERATED) \ | |
100 -I$(BOOT_JAVA_HOME)/include \ | |
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 | 103 $(SASRCFILES) \ |
104 $(SA_LFLAGS) \ | |
105 -o $@ \ | |
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 | 108 ifneq ($(OBJCOPY),) |
109 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) | |
110 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ | |
111 ifeq ($(STRIP_POLICY),all_strip) | |
112 $(QUIETLY) $(STRIP) $@ | |
113 else | |
114 ifeq ($(STRIP_POLICY),min_strip) | |
115 $(QUIETLY) $(STRIP) -x $@ | |
116 # implied else here is no stripping at all | |
117 endif | |
118 endif | |
119 [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } | |
120 endif | |
0 | 121 |
1972 | 122 install_saproc: $(BULDLIBSAPROC) |
0 | 123 $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \ |
124 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ | |
3954 | 125 test -f $(LIBSAPROC_DEBUGINFO) && \ |
126 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ | |
0 | 127 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ |
128 fi | |
129 | |
1972 | 130 .PHONY: install_saproc |