make/solaris/makefiles/defs.make

Fri, 28 Aug 2020 07:38:21 +0100

author
andrew
date
Fri, 28 Aug 2020 07:38:21 +0100
changeset 9995
633a3d28d2fe
parent 7354
8c76e844a7f9
child 7535
7ae4e26cb1e0
permissions
-rw-r--r--

8251120: [8u] HotSpot build assumes ENABLE_JFR is set to either true or false
Summary: Only test for ENABLE_JFR being true, and assume undefined == false
Reviewed-by: neugens

duke@435 1 #
dcubed@7354 2 # Copyright (c) 2006, 2014, 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.
drchase@4942 22 #
duke@435 23 #
duke@435 24
duke@435 25 # The common definitions for hotspot solaris builds.
duke@435 26 # Include the top level defs.make under make directory instead of this one.
duke@435 27 # This file is included into make/defs.make.
duke@435 28
duke@435 29 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
duke@435 30 SLASH_JAVA ?= /java
duke@435 31 ARCH:=$(shell uname -p)
duke@435 32 PATH_SEP = :
duke@435 33 ifeq ($(LP64), 1)
duke@435 34 ARCH_DATA_MODEL=64
duke@435 35 else
duke@435 36 ARCH_DATA_MODEL=32
duke@435 37 endif
duke@435 38
duke@435 39 ifeq ($(ARCH),sparc)
duke@435 40 ifeq ($(ARCH_DATA_MODEL), 64)
duke@435 41 MAKE_ARGS += LP64=1
duke@435 42 PLATFORM=solaris-sparcv9
duke@435 43 VM_PLATFORM=solaris_sparcv9
duke@435 44 else
duke@435 45 PLATFORM=solaris-sparc
duke@435 46 VM_PLATFORM=solaris_sparc
duke@435 47 endif
duke@435 48 HS_ARCH=sparc
duke@435 49 else
duke@435 50 ifeq ($(ARCH_DATA_MODEL), 64)
duke@435 51 MAKE_ARGS += LP64=1
duke@435 52 PLATFORM=solaris-amd64
duke@435 53 VM_PLATFORM=solaris_amd64
duke@435 54 HS_ARCH=x86
duke@435 55 else
duke@435 56 PLATFORM=solaris-i586
duke@435 57 VM_PLATFORM=solaris_i486
duke@435 58 HS_ARCH=x86
duke@435 59 endif
duke@435 60 endif
duke@435 61
erikj@3649 62 # On 32 bit solaris we build server and client, on 64 bit just server.
erikj@3649 63 ifeq ($(JVM_VARIANTS),)
erikj@3649 64 ifeq ($(ARCH_DATA_MODEL), 32)
erikj@3649 65 JVM_VARIANTS:=client,server
erikj@3649 66 JVM_VARIANT_CLIENT:=true
erikj@3649 67 JVM_VARIANT_SERVER:=true
erikj@3649 68 else
erikj@3649 69 JVM_VARIANTS:=server
erikj@3649 70 JVM_VARIANT_SERVER:=true
erikj@3649 71 endif
erikj@3649 72 endif
erikj@3649 73
dcubed@3150 74 # determine if HotSpot is being built in JDK6 or earlier version
dcubed@3150 75 JDK6_OR_EARLIER=0
dcubed@3150 76 ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
dcubed@3150 77 # if the longer variable names (newer build style) are set, then check those
dcubed@3150 78 ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
dcubed@3150 79 JDK6_OR_EARLIER=1
dcubed@3150 80 endif
dcubed@3150 81 else
dcubed@3150 82 # the longer variables aren't set so check the shorter variable names
dcubed@3150 83 ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
dcubed@3150 84 JDK6_OR_EARLIER=1
dcubed@3150 85 endif
dcubed@3150 86 endif
dcubed@3150 87
dcubed@3150 88 ifeq ($(JDK6_OR_EARLIER),0)
dcubed@3724 89 # Full Debug Symbols is supported on JDK7 or newer.
dcubed@3725 90 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
dcubed@3725 91 # builds is enabled with debug info files ZIP'ed to save space. For
dcubed@3725 92 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
dcubed@3725 93 # debug build without debug info isn't very useful.
dcubed@3725 94 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
dcubed@3725 95 #
dcubed@3725 96 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
dcubed@3725 97 # disabled for a BUILD_FLAVOR == product build.
dcubed@3725 98 #
dcubed@3725 99 # Note: Use of a different variable name for the FDS override option
dcubed@3725 100 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
dcubed@3725 101 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
dcubed@3725 102 # in options via environment variables, use of distinct variables
dcubed@3725 103 # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
dcubed@3725 104 # product build, the FULL_DEBUG_SYMBOLS environment variable will be
dcubed@3725 105 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
dcubed@3725 106 # the same variable name is used, then different values can be picked
dcubed@3725 107 # up by different parts of the build. Just to be clear, we only need
dcubed@3725 108 # two variable names because the incoming option value can be
dcubed@3725 109 # overridden in some situations, e.g., a BUILD_FLAVOR != product
dcubed@3725 110 # build.
dcubed@3150 111
dholmes@4243 112 # Due to the multiple sub-make processes that occur this logic gets
dholmes@4243 113 # executed multiple times. We reduce the noise by at least checking that
dholmes@4243 114 # BUILD_FLAVOR has been set.
dholmes@4243 115 ifneq ($(BUILD_FLAVOR),)
dholmes@4243 116 ifeq ($(BUILD_FLAVOR), product)
dholmes@4243 117 FULL_DEBUG_SYMBOLS ?= 1
dholmes@4243 118 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
dholmes@4243 119 else
dholmes@4243 120 # debug variants always get Full Debug Symbols (if available)
dholmes@4243 121 ENABLE_FULL_DEBUG_SYMBOLS = 1
dcubed@3724 122 endif
dcubed@3725 123 _JUNK_ := $(shell \
dcubed@3725 124 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
dholmes@4243 125 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
dcubed@3724 126
dholmes@4243 127 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dholmes@4243 128 # Default OBJCOPY comes from the SUNWbinutils package:
dholmes@4243 129 DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
dholmes@4243 130 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
dholmes@4243 131 ifneq ($(ALT_OBJCOPY),)
dholmes@4243 132 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
dholmes@4243 133 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
dholmes@4243 134 endif
dcubed@3724 135
dcubed@7354 136 ifneq ($(OBJCOPY),)
dcubed@7354 137 # OBJCOPY version check:
dcubed@7354 138 # - version number is last blank separate word on first line
dcubed@7354 139 # - version number formats that have been seen:
dcubed@7354 140 # - <major>.<minor>
dcubed@7354 141 # - <major>.<minor>.<micro>
dcubed@7354 142 #
dcubed@7354 143 # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
dcubed@7354 144 #
dcubed@7354 145 OBJCOPY_VERS_CHK := $(shell \
dcubed@7354 146 $(OBJCOPY) --version \
dcubed@7354 147 | sed -n \
dcubed@7354 148 -e 's/.* //' \
dcubed@7354 149 -e '/^[01]\./b bad' \
dcubed@7354 150 -e '/^2\./{' \
dcubed@7354 151 -e ' s/^2\.//' \
dcubed@7354 152 -e ' /^[0-9]$$/b bad' \
dcubed@7354 153 -e ' /^[0-9]\./b bad' \
dcubed@7354 154 -e ' /^1[0-9]$$/b bad' \
dcubed@7354 155 -e ' /^1[0-9]\./b bad' \
dcubed@7354 156 -e ' /^20\./b bad' \
dcubed@7354 157 -e ' /^21\.0$$/b bad' \
dcubed@7354 158 -e ' /^21\.0\./b bad' \
dcubed@7354 159 -e '}' \
dcubed@7354 160 -e ':good' \
dcubed@7354 161 -e 's/.*/VALID_VERSION/p' \
dcubed@7354 162 -e 'q' \
dcubed@7354 163 -e ':bad' \
dcubed@7354 164 -e 's/.*/BAD_VERSION/p' \
dcubed@7354 165 -e 'q' \
dcubed@7354 166 )
dcubed@7354 167 ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
dcubed@7354 168 _JUNK_ := $(shell \
dcubed@7354 169 echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
dcubed@7354 170 $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
dcubed@7354 171 echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
dcubed@7354 172 "is needed to create valid .debuginfo files."; \
dcubed@7354 173 echo >&2 "WARNING: ignoring above objcopy command."; \
dcubed@7354 174 echo >&2 "WARNING: patch 149063-01 or newer contains the" \
dcubed@7354 175 "correct Solaris 10 SPARC version."; \
dcubed@7354 176 echo >&2 "WARNING: patch 149064-01 or newer contains the" \
dcubed@7354 177 "correct Solaris 10 X86 version."; \
dcubed@7354 178 echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
dcubed@7354 179 "correct version."; \
dcubed@7354 180 )
dcubed@7354 181 OBJCOPY=
dcubed@7354 182 endif
dcubed@7354 183 endif
dcubed@7354 184
dholmes@4243 185 ifeq ($(OBJCOPY),)
dholmes@4243 186 _JUNK_ := $(shell \
dholmes@4243 187 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
dholmes@4243 188 ENABLE_FULL_DEBUG_SYMBOLS=0
dholmes@4243 189 _JUNK_ := $(shell \
dholmes@4243 190 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
dholmes@4243 191 else
dholmes@4243 192 _JUNK_ := $(shell \
dholmes@4243 193 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
dcubed@3724 194
dholmes@4243 195 # Library stripping policies for .debuginfo configs:
dholmes@4243 196 # all_strip - strips everything from the library
dholmes@4243 197 # min_strip - strips most stuff from the library; leaves minimum symbols
dholmes@4243 198 # no_strip - does not strip the library at all
dholmes@4243 199 #
dholmes@4243 200 # Oracle security policy requires "all_strip". A waiver was granted on
dholmes@4243 201 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
dholmes@4243 202 #
dholmes@4243 203 # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
dholmes@4243 204 #
dholmes@4243 205 STRIP_POLICY ?= min_strip
dcubed@3724 206
dholmes@4243 207 _JUNK_ := $(shell \
dholmes@4243 208 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
dholmes@4243 209
dholmes@4243 210 ZIP_DEBUGINFO_FILES ?= 1
dholmes@4243 211
dholmes@4243 212 _JUNK_ := $(shell \
dholmes@4243 213 echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
dholmes@4243 214 endif
dholmes@4243 215 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
dholmes@4243 216 endif # BUILD_FLAVOR
dholmes@4243 217 endif # JDK_6_OR_EARLIER
dcubed@3150 218
duke@435 219 JDK_INCLUDE_SUBDIR=solaris
duke@435 220
never@3156 221 # Library suffix
never@3156 222 LIBRARY_SUFFIX=so
never@3156 223
duke@435 224 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
kvn@1450 225
never@3156 226 # client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX)
never@3156 227 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
dcubed@3724 228 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 229 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 230 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
dcubed@3724 231 else
dcubed@3724 232 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
dcubed@3724 233 endif
dcubed@3150 234 endif
kvn@1450 235
duke@435 236 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
kvn@3044 237 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
kvn@3044 238
erikj@3649 239 ifeq ($(JVM_VARIANT_SERVER),true)
erikj@3649 240 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
erikj@3649 241 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
erikj@3649 242 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
erikj@3649 243 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
erikj@3649 244 ifeq ($(ARCH_DATA_MODEL),32)
erikj@3649 245 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
erikj@3649 246 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
erikj@3649 247 endif
dcubed@3724 248 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 249 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 250 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
dcubed@3724 251 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.diz
dcubed@3724 252 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.diz
dcubed@3871 253 ifeq ($(ARCH_DATA_MODEL),32)
dcubed@3871 254 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.diz
dcubed@3871 255 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.diz
dcubed@3871 256 endif
dcubed@3724 257 else
dcubed@3724 258 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
dcubed@3724 259 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.debuginfo
dcubed@3724 260 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.debuginfo
dcubed@3871 261 ifeq ($(ARCH_DATA_MODEL),32)
dcubed@3871 262 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.debuginfo
dcubed@3871 263 EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.debuginfo
dcubed@3871 264 endif
dcubed@3724 265 endif
dcubed@3150 266 endif
bobv@2036 267 endif
erikj@3649 268 ifeq ($(JVM_VARIANT_CLIENT),true)
duke@435 269 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
drchase@4942 270 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
drchase@4942 271 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
never@3156 272 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
erikj@3649 273 ifeq ($(ARCH_DATA_MODEL),32)
erikj@3649 274 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
erikj@3649 275 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
erikj@3649 276 endif
dcubed@3724 277 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 278 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 279 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
dcubed@3724 280 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.diz
dcubed@3724 281 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.diz
dcubed@3726 282 ifeq ($(ARCH_DATA_MODEL),32)
dcubed@3726 283 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.diz
dcubed@3726 284 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.diz
dcubed@3726 285 endif
dcubed@3724 286 else
dcubed@3724 287 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
dcubed@3724 288 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.debuginfo
dcubed@3724 289 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.debuginfo
dcubed@3726 290 ifeq ($(ARCH_DATA_MODEL),32)
dcubed@3726 291 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.debuginfo
dcubed@3726 292 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.debuginfo
dcubed@3724 293 endif
dcubed@3150 294 endif
bobv@2036 295 endif
duke@435 296 endif
duke@435 297
never@3156 298 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)
dcubed@3724 299 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 300 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 301 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
dcubed@3724 302 else
dcubed@3724 303 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
dcubed@3724 304 endif
dcubed@3150 305 endif
drchase@4942 306 EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar

mercurial