Mercurial > hg > graal-compiler
comparison make/solaris/makefiles/dtrace.make @ 6099:5be76dc5304d
Merge
author | zgu |
---|---|
date | Tue, 29 May 2012 20:06:10 -0400 |
parents | 9c1709c4c80c |
children | d1b0644d6acf |
comparison
equal
deleted
inserted
replaced
6092:c80d42d78a01 | 6099:5be76dc5304d |
---|---|
106 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO) | 106 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO) |
107 XLIBJVM_DTRACE_DIZ = 64/$(LIBJVM_DTRACE_DIZ) | 107 XLIBJVM_DTRACE_DIZ = 64/$(LIBJVM_DTRACE_DIZ) |
108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO) | 108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO) |
109 XLIBJVM_DTRACE_G_DIZ = 64/$(LIBJVM_DTRACE_G_DIZ) | 109 XLIBJVM_DTRACE_G_DIZ = 64/$(LIBJVM_DTRACE_G_DIZ) |
110 | 110 |
111 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) | 111 $(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) |
112 @echo Making $@ | 112 @echo Making $@ |
113 $(QUIETLY) mkdir -p 64/ ; \ | 113 $(QUIETLY) mkdir -p 64/ ; \ |
114 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ | 114 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ |
115 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | 115 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
116 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } | 116 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } |
117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | 117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
118 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. | |
119 # Clear the SHF_ALLOC flag (if set) from empty section headers. | |
120 # An empty section header has sh_addr == 0 and sh_size == 0. | |
121 # This problem has only been seen on Solaris X64, but we call this tool | |
122 # on all Solaris builds just in case. | |
123 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ | |
118 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) | 124 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) |
119 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@ | 125 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
126 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. | |
127 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@ | |
128 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DB_DEBUGINFO) $@ | |
120 ifeq ($(STRIP_POLICY),all_strip) | 129 ifeq ($(STRIP_POLICY),all_strip) |
121 $(QUIETLY) $(STRIP) $@ | 130 $(QUIETLY) $(STRIP) $@ |
122 else | 131 else |
123 ifeq ($(STRIP_POLICY),min_strip) | 132 ifeq ($(STRIP_POLICY),min_strip) |
124 $(QUIETLY) $(STRIP) -x $@ | 133 $(QUIETLY) $(STRIP) -x $@ |
131 $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO) | 140 $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO) |
132 [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); } | 141 [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); } |
133 endif | 142 endif |
134 endif | 143 endif |
135 | 144 |
136 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | 145 $(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
137 @echo Making $@ | 146 @echo Making $@ |
138 $(QUIETLY) mkdir -p 64/ ; \ | 147 $(QUIETLY) mkdir -p 64/ ; \ |
139 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ | 148 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ |
140 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | 149 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
141 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } | 150 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } |
142 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | 151 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
152 # Clear the SHF_ALLOC flag (if set) from empty section headers. | |
153 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ | |
143 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) | 154 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) |
144 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@ | 155 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
156 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@ | |
157 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(XLIBJVM_DTRACE_DEBUGINFO) $@ | |
145 ifeq ($(STRIP_POLICY),all_strip) | 158 ifeq ($(STRIP_POLICY),all_strip) |
146 $(QUIETLY) $(STRIP) $@ | 159 $(QUIETLY) $(STRIP) $@ |
147 else | 160 else |
148 ifeq ($(STRIP_POLICY),min_strip) | 161 ifeq ($(STRIP_POLICY),min_strip) |
149 $(QUIETLY) $(STRIP) -x $@ | 162 $(QUIETLY) $(STRIP) -x $@ |
196 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) | 209 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
197 | 210 |
198 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp | 211 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp |
199 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp | 212 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp |
200 | 213 |
201 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) | 214 $(LIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) |
202 @echo Making $@ | 215 @echo Making $@ |
203 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ | 216 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ |
204 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | 217 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
205 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } | 218 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } |
206 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | 219 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
220 # Clear the SHF_ALLOC flag (if set) from empty section headers. | |
221 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ | |
207 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) | 222 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) |
208 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ | 223 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
224 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ | |
225 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DB_DEBUGINFO) $@ | |
209 ifeq ($(STRIP_POLICY),all_strip) | 226 ifeq ($(STRIP_POLICY),all_strip) |
210 $(QUIETLY) $(STRIP) $@ | 227 $(QUIETLY) $(STRIP) $@ |
211 else | 228 else |
212 ifeq ($(STRIP_POLICY),min_strip) | 229 ifeq ($(STRIP_POLICY),min_strip) |
213 $(QUIETLY) $(STRIP) -x $@ | 230 $(QUIETLY) $(STRIP) -x $@ |
220 $(RM) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) | 237 $(RM) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) |
221 [ -f $(LIBJVM_DB_G_DIZ) ] || { ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); } | 238 [ -f $(LIBJVM_DB_G_DIZ) ] || { ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); } |
222 endif | 239 endif |
223 endif | 240 endif |
224 | 241 |
225 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | 242 $(LIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
226 @echo Making $@ | 243 @echo Making $@ |
227 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ | 244 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ |
228 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | 245 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
229 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } | 246 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } |
230 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | 247 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
248 # Clear the SHF_ALLOC flag (if set) from empty section headers. | |
249 $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ | |
231 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) | 250 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) |
232 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ | 251 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
252 # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ | |
253 $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DTRACE_DEBUGINFO) $@ | |
233 ifeq ($(STRIP_POLICY),all_strip) | 254 ifeq ($(STRIP_POLICY),all_strip) |
234 $(QUIETLY) $(STRIP) $@ | 255 $(QUIETLY) $(STRIP) $@ |
235 else | 256 else |
236 ifeq ($(STRIP_POLICY),min_strip) | 257 ifeq ($(STRIP_POLICY),min_strip) |
237 $(QUIETLY) $(STRIP) -x $@ | 258 $(QUIETLY) $(STRIP) -x $@ |