Mercurial > hg > truffle
comparison make/solaris/makefiles/vm.make @ 6020:d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
Summary: Add support for ENABLE_FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES build flags. Add support for .diz files.
Reviewed-by: dholmes, ohair, sspitsyn
author | dcubed |
---|---|
date | Fri, 23 Mar 2012 11:50:33 -0700 |
parents | 719f7007c8e8 |
children | 74c359c4a9e5 7d4e6dabc6bf |
comparison
equal
deleted
inserted
replaced
4958:3b24e7e01d20 | 6020:d652a62d6e03 |
---|---|
1 # | 1 # |
2 # Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 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 | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
54 # set INCLUDES for C preprocessor | 54 # set INCLUDES for C preprocessor |
55 Src_Dirs_I += $(GENERATED) | 55 Src_Dirs_I += $(GENERATED) |
56 INCLUDES += $(Src_Dirs_I:%=-I%) | 56 INCLUDES += $(Src_Dirs_I:%=-I%) |
57 | 57 |
58 # SYMFLAG is used by {dtrace,jsig,saproc}.make. | 58 # SYMFLAG is used by {dtrace,jsig,saproc}.make. |
59 ifneq ($(OBJCOPY),) | 59 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
60 # always build with debug info when we can create .debuginfo files | 60 # always build with debug info when we can create .debuginfo files |
61 # and disable 'lazy debug info' so the .so has everything. | 61 # and disable 'lazy debug info' so the .so has everything. |
62 SYMFLAG = -g -xs | 62 SYMFLAG = -g -xs |
63 else | 63 else |
64 ifeq (${VERSION}, debug) | 64 ifeq (${VERSION}, debug) |
150 JVM = jvm | 150 JVM = jvm |
151 LIBJVM = lib$(JVM).so | 151 LIBJVM = lib$(JVM).so |
152 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so | 152 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so |
153 | 153 |
154 LIBJVM_DEBUGINFO = lib$(JVM).debuginfo | 154 LIBJVM_DEBUGINFO = lib$(JVM).debuginfo |
155 LIBJVM_DIZ = lib$(JVM).diz | |
155 LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo | 156 LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo |
157 LIBJVM_G_DIZ = lib$(JVM)$(G_SUFFIX).diz | |
156 | 158 |
157 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt | 159 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt |
158 | 160 |
159 SOURCE_PATHS=\ | 161 SOURCE_PATHS=\ |
160 $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \ | 162 $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \ |
281 $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM) | 283 $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM) |
282 $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) | 284 $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) |
283 $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 | 285 $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 |
284 $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G) | 286 $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G) |
285 $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1 | 287 $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1 |
286 ifneq ($(OBJCOPY),) | 288 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
287 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) | 289 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) |
288 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ | 290 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ |
289 ifeq ($(STRIP_POLICY),all_strip) | 291 ifeq ($(STRIP_POLICY),all_strip) |
290 $(QUIETLY) $(STRIP) $@ | 292 $(QUIETLY) $(STRIP) $@ |
291 else | 293 else |
293 $(QUIETLY) $(STRIP) -x $@ | 295 $(QUIETLY) $(STRIP) -x $@ |
294 # implied else here is no stripping at all | 296 # implied else here is no stripping at all |
295 endif | 297 endif |
296 endif | 298 endif |
297 $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) | 299 $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) |
300 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
301 $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) | |
302 $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) | |
303 [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); } | |
304 endif | |
298 endif | 305 endif |
299 endif # filter -sbfast -xsbfast | 306 endif # filter -sbfast -xsbfast |
300 | 307 |
301 | 308 |
302 DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) | 309 DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) |
303 DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) | 310 DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) |
304 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO) | 311 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO) |
312 DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ) | |
305 | 313 |
306 install_jvm: $(LIBJVM) | 314 install_jvm: $(LIBJVM) |
307 @echo "Copying $(LIBJVM) to $(DEST_JVM)" | 315 @echo "Copying $(LIBJVM) to $(DEST_JVM)" |
308 $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ | 316 $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ |
309 cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) | 317 cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) |
318 $(QUIETLY) test -f $(LIBJVM_DIZ) && \ | |
319 cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ) | |
310 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" | 320 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" |
311 | 321 |
312 #---------------------------------------------------------------------- | 322 #---------------------------------------------------------------------- |
313 # Other files | 323 # Other files |
314 | 324 |