Mercurial > hg > truffle
annotate make/bsd/makefiles/saproc.make @ 14217:f3e0bcfff3ab
8029668: Kithcensink crashed with guarantee(Assembler::is_simm13(disp)) failed: Do not match large constant offsets
Summary: Bailout if we try to reference a stack location that we can't encode
Reviewed-by: kvn, twisti
author | iveresov |
---|---|
date | Thu, 12 Dec 2013 11:25:32 -0800 |
parents | f509b8f4699b |
children | c0085eefbd42 67d6392ed21e |
rev | line source |
---|---|
3960 | 1 # |
8750 | 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) |
4006 | 67 SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation |
68 #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles? | |
69 SAARCH = $(subst -march=i586,,$(ARCHFLAG)) | |
70 else | |
71 SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c | |
72 SALIBS = | |
73 SAARCH = $(ARCHFLAG) | |
74 endif | |
75 endif | |
3960 | 76 |
77 SAMAPFILE = $(SASRCDIR)/mapfile | |
78 | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
79 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
80 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
81 DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) |
3960 | 82 |
83 # DEBUG_BINARIES overrides everything, use full -g debug information | |
84 ifeq ($(DEBUG_BINARIES), true) | |
85 SA_DEBUG_CFLAGS = -g | |
86 endif | |
87 | |
88 # if $(AGENT_DIR) does not exist, we don't build SA | |
89 # also, we don't build SA on Itanium, PPC, ARM or zero. | |
90 | |
91 ifneq ($(wildcard $(AGENT_DIR)),) | |
92 ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),) | |
93 BUILDLIBSAPROC = $(LIBSAPROC) | |
94 endif | |
95 endif | |
96 | |
97 | |
98 ifneq ($(OS_VENDOR), Darwin) | |
99 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) | |
100 endif | |
101 SA_LFLAGS += $(LDFLAGS_HASH_STYLE) | |
102 | |
4006 | 103 ifeq ($(OS_VENDOR), Darwin) |
104 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
105 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") \ | |
106 -I/System/Library/Frameworks/JavaVM.framework/Headers | |
107 else | |
108 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
109 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") | |
110 endif | |
111 | |
3960 | 112 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) |
113 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | |
114 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | |
115 exit 1; \ | |
116 fi | |
117 @echo Making SA debugger back-end... | |
118 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ | |
8750 | 119 $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ |
3960 | 120 -I$(SASRCDIR) \ |
121 -I$(GENERATED) \ | |
4006 | 122 $(BOOT_JAVA_INCLUDES) \ |
3960 | 123 $(SASRCFILES) \ |
124 $(SA_LFLAGS) \ | |
125 $(SA_DEBUG_CFLAGS) \ | |
126 -o $@ \ | |
127 $(SALIBS) | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
128 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
129 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
130 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
131 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
132 $(ZIPEXE) -q -r -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
133 $(RM) -r $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
134 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
135 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
136 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
137 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
138 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
139 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
140 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
141 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
142 $(QUIETLY) $(STRIP) -g $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
143 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
144 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
145 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
146 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
147 $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
148 $(RM) $(LIBSAPROC_DEBUGINFO) |
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 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
151 endif |
3960 | 152 |
153 install_saproc: $(BUILDLIBSAPROC) | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
154 @echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)" |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
155 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
156 $(QUIETLY) test -d $(LIBSAPROC_DEBUGINFO) && \ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
157 cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
158 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
159 $(QUIETLY) test -f $(LIBSAPROC_DEBUGINFO) && \ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
160 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
161 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
162 $(QUIETLY) test -f $(LIBSAPROC_DIZ) && \ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
163 cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
8750
diff
changeset
|
164 $(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done" |
3960 | 165 |
166 .PHONY: install_saproc |