1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/solaris/makefiles/defs.make Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,257 @@ 1.4 +# 1.5 +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. 1.11 +# 1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 +# version 2 for more details (a copy is included in the LICENSE file that 1.16 +# accompanied this code). 1.17 +# 1.18 +# You should have received a copy of the GNU General Public License version 1.19 +# 2 along with this work; if not, write to the Free Software Foundation, 1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 +# 1.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.23 +# or visit www.oracle.com if you need additional information or have any 1.24 +# questions. 1.25 +# 1.26 +# 1.27 + 1.28 +# The common definitions for hotspot solaris builds. 1.29 +# Include the top level defs.make under make directory instead of this one. 1.30 +# This file is included into make/defs.make. 1.31 + 1.32 +# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name 1.33 +SLASH_JAVA ?= /java 1.34 +ARCH:=$(shell uname -p) 1.35 +PATH_SEP = : 1.36 +ifeq ($(LP64), 1) 1.37 + ARCH_DATA_MODEL=64 1.38 +else 1.39 + ARCH_DATA_MODEL=32 1.40 +endif 1.41 + 1.42 +ifeq ($(ARCH),sparc) 1.43 + ifeq ($(ARCH_DATA_MODEL), 64) 1.44 + MAKE_ARGS += LP64=1 1.45 + PLATFORM=solaris-sparcv9 1.46 + VM_PLATFORM=solaris_sparcv9 1.47 + else 1.48 + PLATFORM=solaris-sparc 1.49 + VM_PLATFORM=solaris_sparc 1.50 + endif 1.51 + HS_ARCH=sparc 1.52 +else 1.53 + ifeq ($(ARCH_DATA_MODEL), 64) 1.54 + MAKE_ARGS += LP64=1 1.55 + PLATFORM=solaris-amd64 1.56 + VM_PLATFORM=solaris_amd64 1.57 + HS_ARCH=x86 1.58 + else 1.59 + PLATFORM=solaris-i586 1.60 + VM_PLATFORM=solaris_i486 1.61 + HS_ARCH=x86 1.62 + endif 1.63 +endif 1.64 + 1.65 +# On 32 bit solaris we build server and client, on 64 bit just server. 1.66 +ifeq ($(JVM_VARIANTS),) 1.67 + ifeq ($(ARCH_DATA_MODEL), 32) 1.68 + JVM_VARIANTS:=client,server 1.69 + JVM_VARIANT_CLIENT:=true 1.70 + JVM_VARIANT_SERVER:=true 1.71 + else 1.72 + JVM_VARIANTS:=server 1.73 + JVM_VARIANT_SERVER:=true 1.74 + endif 1.75 +endif 1.76 + 1.77 +# determine if HotSpot is being built in JDK6 or earlier version 1.78 +JDK6_OR_EARLIER=0 1.79 +ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" 1.80 + # if the longer variable names (newer build style) are set, then check those 1.81 + ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" 1.82 + JDK6_OR_EARLIER=1 1.83 + endif 1.84 +else 1.85 + # the longer variables aren't set so check the shorter variable names 1.86 + ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1" 1.87 + JDK6_OR_EARLIER=1 1.88 + endif 1.89 +endif 1.90 + 1.91 +ifeq ($(JDK6_OR_EARLIER),0) 1.92 + # Full Debug Symbols is supported on JDK7 or newer. 1.93 + # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product 1.94 + # builds is enabled with debug info files ZIP'ed to save space. For 1.95 + # BUILD_FLAVOR != product builds, FDS is always enabled, after all a 1.96 + # debug build without debug info isn't very useful. 1.97 + # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. 1.98 + # 1.99 + # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be 1.100 + # disabled for a BUILD_FLAVOR == product build. 1.101 + # 1.102 + # Note: Use of a different variable name for the FDS override option 1.103 + # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS 1.104 + # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass 1.105 + # in options via environment variables, use of distinct variables 1.106 + # prevents strange behaviours. For example, in a BUILD_FLAVOR != 1.107 + # product build, the FULL_DEBUG_SYMBOLS environment variable will be 1.108 + # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If 1.109 + # the same variable name is used, then different values can be picked 1.110 + # up by different parts of the build. Just to be clear, we only need 1.111 + # two variable names because the incoming option value can be 1.112 + # overridden in some situations, e.g., a BUILD_FLAVOR != product 1.113 + # build. 1.114 + 1.115 + # Due to the multiple sub-make processes that occur this logic gets 1.116 + # executed multiple times. We reduce the noise by at least checking that 1.117 + # BUILD_FLAVOR has been set. 1.118 + ifneq ($(BUILD_FLAVOR),) 1.119 + ifeq ($(BUILD_FLAVOR), product) 1.120 + FULL_DEBUG_SYMBOLS ?= 1 1.121 + ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) 1.122 + else 1.123 + # debug variants always get Full Debug Symbols (if available) 1.124 + ENABLE_FULL_DEBUG_SYMBOLS = 1 1.125 + endif 1.126 + _JUNK_ := $(shell \ 1.127 + echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") 1.128 + # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later 1.129 + 1.130 + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 1.131 + # Default OBJCOPY comes from the SUNWbinutils package: 1.132 + DEF_OBJCOPY=/usr/sfw/bin/gobjcopy 1.133 + OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) 1.134 + ifneq ($(ALT_OBJCOPY),) 1.135 + _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") 1.136 + OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) 1.137 + endif 1.138 + 1.139 + ifeq ($(OBJCOPY),) 1.140 + _JUNK_ := $(shell \ 1.141 + echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") 1.142 + ENABLE_FULL_DEBUG_SYMBOLS=0 1.143 + _JUNK_ := $(shell \ 1.144 + echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") 1.145 + else 1.146 + _JUNK_ := $(shell \ 1.147 + echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") 1.148 + 1.149 + # Library stripping policies for .debuginfo configs: 1.150 + # all_strip - strips everything from the library 1.151 + # min_strip - strips most stuff from the library; leaves minimum symbols 1.152 + # no_strip - does not strip the library at all 1.153 + # 1.154 + # Oracle security policy requires "all_strip". A waiver was granted on 1.155 + # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. 1.156 + # 1.157 + # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. 1.158 + # 1.159 + STRIP_POLICY ?= min_strip 1.160 + 1.161 + _JUNK_ := $(shell \ 1.162 + echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") 1.163 + 1.164 + ZIP_DEBUGINFO_FILES ?= 1 1.165 + 1.166 + _JUNK_ := $(shell \ 1.167 + echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") 1.168 + endif 1.169 + endif # ENABLE_FULL_DEBUG_SYMBOLS=1 1.170 + endif # BUILD_FLAVOR 1.171 +endif # JDK_6_OR_EARLIER 1.172 + 1.173 +JDK_INCLUDE_SUBDIR=solaris 1.174 + 1.175 +# Library suffix 1.176 +LIBRARY_SUFFIX=so 1.177 + 1.178 +EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html 1.179 + 1.180 +# client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX) 1.181 +EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) 1.182 +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 1.183 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 1.184 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz 1.185 + else 1.186 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo 1.187 + endif 1.188 +endif 1.189 + 1.190 +EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server 1.191 +EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client 1.192 + 1.193 +ifeq ($(JVM_VARIANT_SERVER),true) 1.194 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt 1.195 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) 1.196 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.$(LIBRARY_SUFFIX) 1.197 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) 1.198 + ifeq ($(ARCH_DATA_MODEL),32) 1.199 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) 1.200 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) 1.201 + endif 1.202 + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 1.203 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 1.204 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz 1.205 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.diz 1.206 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.diz 1.207 + ifeq ($(ARCH_DATA_MODEL),32) 1.208 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.diz 1.209 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.diz 1.210 + endif 1.211 + else 1.212 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo 1.213 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.debuginfo 1.214 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.debuginfo 1.215 + ifeq ($(ARCH_DATA_MODEL),32) 1.216 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.debuginfo 1.217 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.debuginfo 1.218 + endif 1.219 + endif 1.220 + endif 1.221 +endif 1.222 +ifeq ($(JVM_VARIANT_CLIENT),true) 1.223 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt 1.224 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) 1.225 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) 1.226 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) 1.227 + ifeq ($(ARCH_DATA_MODEL),32) 1.228 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) 1.229 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) 1.230 + endif 1.231 + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 1.232 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 1.233 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz 1.234 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.diz 1.235 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.diz 1.236 + ifeq ($(ARCH_DATA_MODEL),32) 1.237 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.diz 1.238 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.diz 1.239 + endif 1.240 + else 1.241 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo 1.242 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.debuginfo 1.243 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.debuginfo 1.244 + ifeq ($(ARCH_DATA_MODEL),32) 1.245 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.debuginfo 1.246 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.debuginfo 1.247 + endif 1.248 + endif 1.249 + endif 1.250 +endif 1.251 + 1.252 +EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) 1.253 +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 1.254 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 1.255 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz 1.256 + else 1.257 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo 1.258 + endif 1.259 +endif 1.260 +EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar