Mercurial > hg > truffle
annotate make/bsd/makefiles/saproc.make @ 16073:b38191cd1665
removed code to make recording usages optional for ConstantNodes (GRAAL-508)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 10 Jun 2014 18:52:20 +0200 |
parents | 4ca6dc0799b6 |
children | 2a69cbe850a8 |
rev | line source |
---|---|
3960 | 1 # |
14909 | 2 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
3960 | 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 # | |
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 | |
21 # questions. | |
22 # | |
23 # | |
24 | |
25 # Rules to build serviceability agent library, used by vm.make | |
26 | |
8750 | 27 # libsaproc.so(dylib): serviceability agent |
3960 | 28 SAPROC = saproc |
29 | |
30 ifeq ($(OS_VENDOR), Darwin) | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
31 LIBSAPROC = lib$(SAPROC).dylib |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
32 |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
33 LIBSAPROC_DEBUGINFO = lib$(SAPROC).dylib.dSYM |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
34 LIBSAPROC_DIZ = lib$(SAPROC).diz |
3960 | 35 else |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
36 LIBSAPROC = lib$(SAPROC).so |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
37 |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
38 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
39 LIBSAPROC_DIZ = lib$(SAPROC).diz |
3960 | 40 endif |
41 | |
42 AGENT_DIR = $(GAMMADIR)/agent | |
43 | |
44 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) | |
45 | |
8750 | 46 BSD_NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c \ |
6782 | 47 $(SASRCDIR)/symtab.c \ |
48 $(SASRCDIR)/libproc_impl.c \ | |
49 $(SASRCDIR)/ps_proc.c \ | |
50 $(SASRCDIR)/ps_core.c \ | |
51 $(SASRCDIR)/BsdDebuggerLocal.c \ | |
52 $(AGENT_DIR)/src/share/native/sadis.c | |
4006 | 53 |
8750 | 54 DARWIN_NON_STUB_SASRCFILES = $(SASRCDIR)/symtab.c \ |
55 $(SASRCDIR)/libproc_impl.c \ | |
56 $(SASRCDIR)/ps_core.c \ | |
57 $(SASRCDIR)/MacosxDebuggerLocal.m \ | |
58 $(AGENT_DIR)/src/share/native/sadis.c | |
59 | |
4006 | 60 ifeq ($(OS_VENDOR), FreeBSD) |
8750 | 61 SASRCFILES = $(BSD_NON_STUB_SASRCFILES) |
4006 | 62 SALIBS = -lutil -lthread_db |
63 SAARCH = $(ARCHFLAG) | |
64 else | |
65 ifeq ($(OS_VENDOR), Darwin) | |
8750 | 66 SASRCFILES = $(DARWIN_NON_STUB_SASRCFILES) |
13094
c0085eefbd42
fixed serviceability agent build issue on MacOS
Doug Simon <doug.simon@oracle.com>
parents:
12859
diff
changeset
|
67 ifeq ($(wildcard /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks),) |
c0085eefbd42
fixed serviceability agent build issue on MacOS
Doug Simon <doug.simon@oracle.com>
parents:
12859
diff
changeset
|
68 SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation |
c0085eefbd42
fixed serviceability agent build issue on MacOS
Doug Simon <doug.simon@oracle.com>
parents:
12859
diff
changeset
|
69 else |
c0085eefbd42
fixed serviceability agent build issue on MacOS
Doug Simon <doug.simon@oracle.com>
parents:
12859
diff
changeset
|
70 SALIBS = -g -framework Foundation -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation |
c0085eefbd42
fixed serviceability agent build issue on MacOS
Doug Simon <doug.simon@oracle.com>
parents:
12859
diff
changeset
|
71 endif |
4006 | 72 #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles? |
73 SAARCH = $(subst -march=i586,,$(ARCHFLAG)) | |
74 else | |
75 SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c | |
76 SALIBS = | |
77 SAARCH = $(ARCHFLAG) | |
78 endif | |
79 endif | |
3960 | 80 |
81 SAMAPFILE = $(SASRCDIR)/mapfile | |
82 | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
83 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
84 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
85 DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) |
3960 | 86 |
87 # DEBUG_BINARIES overrides everything, use full -g debug information | |
88 ifeq ($(DEBUG_BINARIES), true) | |
89 SA_DEBUG_CFLAGS = -g | |
90 endif | |
91 | |
92 # if $(AGENT_DIR) does not exist, we don't build SA | |
93 # also, we don't build SA on Itanium, PPC, ARM or zero. | |
94 | |
95 ifneq ($(wildcard $(AGENT_DIR)),) | |
96 ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),) | |
97 BUILDLIBSAPROC = $(LIBSAPROC) | |
98 endif | |
99 endif | |
100 | |
101 | |
102 ifneq ($(OS_VENDOR), Darwin) | |
103 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) | |
104 endif | |
105 SA_LFLAGS += $(LDFLAGS_HASH_STYLE) | |
106 | |
4006 | 107 ifeq ($(OS_VENDOR), Darwin) |
108 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
109 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") \ | |
110 -I/System/Library/Frameworks/JavaVM.framework/Headers | |
111 else | |
112 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
113 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") | |
114 endif | |
115 | |
3960 | 116 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) |
117 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | |
118 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | |
119 exit 1; \ | |
120 fi | |
121 @echo Making SA debugger back-end... | |
122 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ | |
8750 | 123 $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ |
3960 | 124 -I$(SASRCDIR) \ |
125 -I$(GENERATED) \ | |
4006 | 126 $(BOOT_JAVA_INCLUDES) \ |
3960 | 127 $(SASRCFILES) \ |
128 $(SA_LFLAGS) \ | |
129 $(SA_DEBUG_CFLAGS) \ | |
130 -o $@ \ | |
131 $(SALIBS) | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
132 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
133 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
134 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
135 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
136 $(ZIPEXE) -q -r -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
137 $(RM) -r $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
138 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
139 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
140 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
141 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
142 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
143 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
144 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
145 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
146 $(QUIETLY) $(STRIP) -g $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
147 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
148 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
149 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
150 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
151 $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
152 $(RM) $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
153 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
154 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
155 endif |
3960 | 156 |
157 install_saproc: $(BUILDLIBSAPROC) | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
158 @echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)" |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
159 ifeq ($(OS_VENDOR), Darwin) |
14909 | 160 -$(QUIETLY) test -d $(LIBSAPROC_DEBUGINFO) && \ |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
161 cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
162 else |
14909 | 163 $(QUIETLY) test -f $(LIBSAPROC_DEBUGINFO) && \ |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
164 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
165 endif |
14331
67d6392ed21e
8033714: hotspot 'install_jvm' bld target broken with ZIP_DEBUGINFO_FILES=0
dcubed
parents:
12859
diff
changeset
|
166 $(QUIETLY) test ! -f $(LIBSAPROC_DIZ) || \ |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
167 cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
168 $(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done" |
3960 | 169 |
170 .PHONY: install_saproc |