make/solaris/makefiles/saproc.make

Mon, 28 Nov 2011 14:58:31 +0100

author
stefank
date
Mon, 28 Nov 2011 14:58:31 +0100
changeset 3325
f4414323345f
parent 3150
da0999c4b733
child 3518
719f7007c8e8
permissions
-rw-r--r--

7116081: USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM
Summary: Changed the conditional to see if the precompiled header has been specified. Also, removed the unused PrecompiledOption.
Reviewed-by: dholmes, brutisso

duke@435 1 #
dcubed@2838 2 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
duke@435 22 #
duke@435 23 #
duke@435 24
duke@435 25 # Rules to build serviceability agent library, used by vm.make
duke@435 26
duke@435 27 # libsaproc[_g].so: serviceability agent
phh@1558 28
phh@1558 29 SAPROC = saproc
duke@435 30 LIBSAPROC = lib$(SAPROC).so
duke@435 31
phh@1558 32 SAPROC_G = $(SAPROC)$(G_SUFFIX)
phh@1558 33 LIBSAPROC_G = lib$(SAPROC_G).so
phh@1558 34
dcubed@3150 35 LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
dcubed@3150 36 LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo
dcubed@3150 37
duke@435 38 AGENT_DIR = $(GAMMADIR)/agent
duke@435 39
duke@435 40 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc
duke@435 41
duke@435 42 SASRCFILES = $(SASRCDIR)/saproc.cpp
duke@435 43
duke@435 44 SAMAPFILE = $(SASRCDIR)/mapfile
duke@435 45
dcubed@3150 46 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
dcubed@3150 47 DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
duke@435 48
duke@435 49 # if $(AGENT_DIR) does not exist, we don't build SA
duke@435 50
stefank@2314 51 ifneq ($(wildcard $(AGENT_DIR)),)
stefank@2314 52 BUILDLIBSAPROC = $(LIBSAPROC)
stefank@2314 53 endif
duke@435 54
duke@435 55 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
duke@435 56
duke@435 57 ifdef USE_GCC
duke@435 58 SA_LFLAGS += -D_REENTRANT
duke@435 59 else
duke@435 60 SA_LFLAGS += -mt -xnolib -norunpath
duke@435 61 endif
duke@435 62
dcubed@2838 63 # The libproc Pstack_iter() interface changed in Nevada-B159.
dcubed@2886 64 # Use 'uname -r -v' to determine the Solaris version as per
dcubed@2886 65 # Solaris Nevada team request. This logic needs to match:
dcubed@2838 66 # agent/src/os/solaris/proc/saproc.cpp: set_has_newer_Pstack_iter():
dcubed@2838 67 # - skip SunOS 4 or older
dcubed@2838 68 # - skip Solaris 10 or older
dcubed@2886 69 # - skip two digit internal Nevada builds
dcubed@2886 70 # - skip three digit internal Nevada builds thru 149
dcubed@2886 71 # - skip internal Nevada builds 150-158
dcubed@2886 72 # - if not skipped, print define for Nevada-B159 or later
dcubed@2838 73 SOLARIS_11_B159_OR_LATER := \
dcubed@2838 74 $(shell uname -r -v \
dcubed@2886 75 | sed -n \
dcubed@2886 76 -e '/^[0-4]\. /b' \
dcubed@2886 77 -e '/^5\.[0-9] /b' \
dcubed@2886 78 -e '/^5\.10 /b' \
kvn@3044 79 -e '/ snv_[0-9][0-9]$$/b' \
kvn@3044 80 -e '/ snv_[01][0-4][0-9]$$/b' \
kvn@3044 81 -e '/ snv_15[0-8]$$/b' \
dcubed@2886 82 -e 's/.*/-DSOLARIS_11_B159_OR_LATER/' \
dcubed@2886 83 -e 'p' \
dcubed@2886 84 )
dcubed@2838 85
dcubed@2838 86 # Uncomment the following to simulate building on Nevada-B159 or later
dcubed@2838 87 # when actually building on Nevada-B158 or earlier:
dcubed@2838 88 #SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER
dcubed@2838 89
duke@435 90 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
duke@435 91 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
duke@435 92 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
duke@435 93 exit 1; \
duke@435 94 fi
duke@435 95 @echo Making SA debugger back-end...
duke@435 96 $(QUIETLY) $(CPP) \
duke@435 97 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
duke@435 98 -I$(SASRCDIR) \
duke@435 99 -I$(GENERATED) \
duke@435 100 -I$(BOOT_JAVA_HOME)/include \
duke@435 101 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
dcubed@2838 102 $(SOLARIS_11_B159_OR_LATER) \
duke@435 103 $(SASRCFILES) \
duke@435 104 $(SA_LFLAGS) \
duke@435 105 -o $@ \
duke@435 106 -ldl -ldemangle -lthread -lc
phh@1558 107 [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
dcubed@3150 108 ifneq ($(OBJCOPY),)
dcubed@3150 109 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
dcubed@3150 110 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
dcubed@3150 111 ifeq ($(STRIP_POLICY),all_strip)
dcubed@3150 112 $(QUIETLY) $(STRIP) $@
dcubed@3150 113 else
dcubed@3150 114 ifeq ($(STRIP_POLICY),min_strip)
dcubed@3150 115 $(QUIETLY) $(STRIP) -x $@
dcubed@3150 116 # implied else here is no stripping at all
dcubed@3150 117 endif
dcubed@3150 118 endif
dcubed@3150 119 [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); }
dcubed@3150 120 endif
duke@435 121
stefank@2314 122 install_saproc: $(BULDLIBSAPROC)
duke@435 123 $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
duke@435 124 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
dcubed@3150 125 test -f $(LIBSAPROC_DEBUGINFO) && \
dcubed@3150 126 cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
duke@435 127 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
duke@435 128 fi
duke@435 129
stefank@2314 130 .PHONY: install_saproc

mercurial