--- a/hotspot/make/solaris/makefiles/saproc.make Thu Sep 20 03:49:15 2012 -0700
+++ b/hotspot/make/solaris/makefiles/saproc.make Mon Sep 24 12:44:00 2012 -0700
@@ -27,7 +27,9 @@
# libsaproc[_g].so: serviceability agent
SAPROC = saproc
+SADIS = sadis
LIBSAPROC = lib$(SAPROC).so
+SADISOBJ = $(SADIS).o
SAPROC_G = $(SAPROC)$(G_SUFFIX)
LIBSAPROC_G = lib$(SAPROC_G).so
@@ -43,6 +45,8 @@
SASRCFILES = $(SASRCDIR)/saproc.cpp
+SADISSRCFILES = $(AGENT_DIR)/src/share/native/sadis.c
+
SAMAPFILE = $(SASRCDIR)/mapfile
DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
@@ -90,13 +94,14 @@
# when actually building on Nevada-B158 or earlier:
#SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER
-$(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SAMAPFILE)
+
+$(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SADISOBJ) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \
fi
@echo Making SA debugger back-end...
- $(QUIETLY) $(CXX) \
+ $(QUIETLY) $(CXX) \
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
-I$(SASRCDIR) \
-I$(GENERATED) \
@@ -104,10 +109,23 @@
-I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
$(SOLARIS_11_B159_OR_LATER) \
$(SASRCFILES) \
+ $(SADISOBJ) \
$(SA_LFLAGS) \
-o $@ \
-ldl -ldemangle -lthread -lc
[ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
+
+$(SADISOBJ): $(SADISSRCFILES)
+ $(QUIETLY) $(CC) \
+ $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
+ -I$(SASRCDIR) \
+ -I$(GENERATED) \
+ -I$(BOOT_JAVA_HOME)/include \
+ -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
+ $(SOLARIS_11_B159_OR_LATER) \
+ $(SADISSRCFILES) \
+ -c -o $(SADISOBJ)
+
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
# Clear the SHF_ALLOC flag (if set) from empty section headers.