Mercurial > hg > truffle
comparison make/linux/makefiles/saproc.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 | 54d3535a6dd3 |
children | a9fed06c01d2 |
comparison
equal
deleted
inserted
replaced
4958:3b24e7e01d20 | 6020:d652a62d6e03 |
---|---|
31 | 31 |
32 SAPROC_G = $(SAPROC)$(G_SUFFIX) | 32 SAPROC_G = $(SAPROC)$(G_SUFFIX) |
33 LIBSAPROC_G = lib$(SAPROC_G).so | 33 LIBSAPROC_G = lib$(SAPROC_G).so |
34 | 34 |
35 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo | 35 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo |
36 LIBSAPROC_DIZ = lib$(SAPROC).diz | |
36 LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo | 37 LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo |
38 LIBSAPROC_G_DIZ = lib$(SAPROC_G).diz | |
37 | 39 |
38 AGENT_DIR = $(GAMMADIR)/agent | 40 AGENT_DIR = $(GAMMADIR)/agent |
39 | 41 |
40 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) | 42 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) |
41 | 43 |
48 | 50 |
49 SAMAPFILE = $(SASRCDIR)/mapfile | 51 SAMAPFILE = $(SASRCDIR)/mapfile |
50 | 52 |
51 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) | 53 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) |
52 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) | 54 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) |
55 DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) | |
53 | 56 |
54 # DEBUG_BINARIES overrides everything, use full -g debug information | 57 # DEBUG_BINARIES overrides everything, use full -g debug information |
55 ifeq ($(DEBUG_BINARIES), true) | 58 ifeq ($(DEBUG_BINARIES), true) |
56 SA_DEBUG_CFLAGS = -g | 59 SA_DEBUG_CFLAGS = -g |
57 endif | 60 endif |
85 $(SA_LFLAGS) \ | 88 $(SA_LFLAGS) \ |
86 $(SA_DEBUG_CFLAGS) \ | 89 $(SA_DEBUG_CFLAGS) \ |
87 -o $@ \ | 90 -o $@ \ |
88 -lthread_db | 91 -lthread_db |
89 $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } | 92 $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } |
90 ifneq ($(OBJCOPY),) | 93 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
91 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) | 94 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) |
92 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ | 95 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ |
93 ifeq ($(STRIP_POLICY),all_strip) | 96 ifeq ($(STRIP_POLICY),all_strip) |
94 $(QUIETLY) $(STRIP) $@ | 97 $(QUIETLY) $(STRIP) $@ |
95 else | 98 else |
97 $(QUIETLY) $(STRIP) -g $@ | 100 $(QUIETLY) $(STRIP) -g $@ |
98 # implied else here is no stripping at all | 101 # implied else here is no stripping at all |
99 endif | 102 endif |
100 endif | 103 endif |
101 [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } | 104 [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } |
105 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
106 $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) | |
107 $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) | |
108 [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); } | |
109 endif | |
102 endif | 110 endif |
103 | 111 |
104 install_saproc: $(BUILDLIBSAPROC) | 112 install_saproc: $(BUILDLIBSAPROC) |
105 $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ | 113 $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ |
106 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ | 114 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ |
107 test -f $(LIBSAPROC_DEBUGINFO) && \ | 115 test -f $(LIBSAPROC_DEBUGINFO) && \ |
108 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ | 116 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ |
117 test -f $(LIBSAPROC_DIZ) && \ | |
118 cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ | |
109 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ | 119 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ |
110 fi | 120 fi |
111 | 121 |
112 .PHONY: install_saproc | 122 .PHONY: install_saproc |