Mercurial > hg > graal-jvmci-8
comparison make/linux/makefiles/jsig.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 | da0999c4b733 |
children | 957c266d8bc5 892acf0431ef |
comparison
equal
deleted
inserted
replaced
4958:3b24e7e01d20 | 6020:d652a62d6e03 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2005, 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. |
30 | 30 |
31 JSIG_G = $(JSIG)$(G_SUFFIX) | 31 JSIG_G = $(JSIG)$(G_SUFFIX) |
32 LIBJSIG_G = lib$(JSIG_G).so | 32 LIBJSIG_G = lib$(JSIG_G).so |
33 | 33 |
34 LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo | 34 LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo |
35 LIBJSIG_DIZ = lib$(JSIG).diz | |
35 LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo | 36 LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo |
37 LIBJSIG_G_DIZ = lib$(JSIG_G).diz | |
36 | 38 |
37 JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm | 39 JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm |
38 | 40 |
39 DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG) | 41 DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG) |
40 DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO) | 42 DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO) |
43 DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ) | |
41 | 44 |
42 LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig | 45 LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig |
43 | 46 |
44 # On Linux we really dont want a mapfile, as this library is small | 47 # On Linux we really dont want a mapfile, as this library is small |
45 # and preloaded using LD_PRELOAD, making functions private will | 48 # and preloaded using LD_PRELOAD, making functions private will |
56 $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) | 59 $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) |
57 @echo Making signal interposition lib... | 60 @echo Making signal interposition lib... |
58 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ | 61 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ |
59 $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl | 62 $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl |
60 $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } | 63 $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } |
61 ifneq ($(OBJCOPY),) | 64 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
62 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) | 65 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) |
63 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ | 66 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ |
64 ifeq ($(STRIP_POLICY),all_strip) | 67 ifeq ($(STRIP_POLICY),all_strip) |
65 $(QUIETLY) $(STRIP) $@ | 68 $(QUIETLY) $(STRIP) $@ |
66 else | 69 else |
68 $(QUIETLY) $(STRIP) -g $@ | 71 $(QUIETLY) $(STRIP) -g $@ |
69 # implied else here is no stripping at all | 72 # implied else here is no stripping at all |
70 endif | 73 endif |
71 endif | 74 endif |
72 [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } | 75 [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } |
76 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
77 $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) | |
78 $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) | |
79 [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); } | |
80 endif | |
73 endif | 81 endif |
74 | 82 |
75 install_jsig: $(LIBJSIG) | 83 install_jsig: $(LIBJSIG) |
76 @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" | 84 @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" |
77 $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ | 85 $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ |
78 cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) | 86 cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) |
87 $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ | |
88 cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) | |
79 $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" | 89 $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" |
80 | 90 |
81 .PHONY: install_jsig | 91 .PHONY: install_jsig |