Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/solaris/makefiles/defs.make
32284 views
#1# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#22#2324# The common definitions for hotspot solaris builds.25# Include the top level defs.make under make directory instead of this one.26# This file is included into make/defs.make.2728# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name29SLASH_JAVA ?= /java30ARCH:=$(shell uname -p)31PATH_SEP = :32ifeq ($(LP64), 1)33ARCH_DATA_MODEL=6434else35ARCH_DATA_MODEL=3236endif3738ifeq ($(ARCH),sparc)39ifeq ($(ARCH_DATA_MODEL), 64)40MAKE_ARGS += LP64=141PLATFORM=solaris-sparcv942VM_PLATFORM=solaris_sparcv943else44PLATFORM=solaris-sparc45VM_PLATFORM=solaris_sparc46endif47HS_ARCH=sparc48else49ifeq ($(ARCH_DATA_MODEL), 64)50MAKE_ARGS += LP64=151PLATFORM=solaris-amd6452VM_PLATFORM=solaris_amd6453HS_ARCH=x8654else55PLATFORM=solaris-i58656VM_PLATFORM=solaris_i48657HS_ARCH=x8658endif59endif6061# On 32 bit solaris we build server and client, on 64 bit just server.62ifeq ($(JVM_VARIANTS),)63ifeq ($(ARCH_DATA_MODEL), 32)64JVM_VARIANTS:=client,server65JVM_VARIANT_CLIENT:=true66JVM_VARIANT_SERVER:=true67else68JVM_VARIANTS:=server69JVM_VARIANT_SERVER:=true70endif71endif7273# determine if HotSpot is being built in JDK6 or earlier version74JDK6_OR_EARLIER=075ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"76# if the longer variable names (newer build style) are set, then check those77ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"78JDK6_OR_EARLIER=179endif80else81# the longer variables aren't set so check the shorter variable names82ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"83JDK6_OR_EARLIER=184endif85endif8687ifeq ($(JDK6_OR_EARLIER),0)88# Full Debug Symbols is supported on JDK7 or newer.89# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product90# builds is enabled with debug info files ZIP'ed to save space. For91# BUILD_FLAVOR != product builds, FDS is always enabled, after all a92# debug build without debug info isn't very useful.93# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.94#95# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be96# disabled for a BUILD_FLAVOR == product build.97#98# Note: Use of a different variable name for the FDS override option99# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS100# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass101# in options via environment variables, use of distinct variables102# prevents strange behaviours. For example, in a BUILD_FLAVOR !=103# product build, the FULL_DEBUG_SYMBOLS environment variable will be104# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If105# the same variable name is used, then different values can be picked106# up by different parts of the build. Just to be clear, we only need107# two variable names because the incoming option value can be108# overridden in some situations, e.g., a BUILD_FLAVOR != product109# build.110111# Due to the multiple sub-make processes that occur this logic gets112# executed multiple times. We reduce the noise by at least checking that113# BUILD_FLAVOR has been set.114ifneq ($(BUILD_FLAVOR),)115ifeq ($(BUILD_FLAVOR), product)116FULL_DEBUG_SYMBOLS ?= 1117ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)118else119# debug variants always get Full Debug Symbols (if available)120ENABLE_FULL_DEBUG_SYMBOLS = 1121endif122_JUNK_ := $(shell \123echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")124# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later125126ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)127# Default OBJCOPY comes from the SUNWbinutils package:128DEF_OBJCOPY=/usr/sfw/bin/gobjcopy129OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))130ifneq ($(ALT_OBJCOPY),)131_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")132OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))133endif134135ifneq ($(OBJCOPY),)136# OBJCOPY version check:137# - version number is last blank separate word on first line138# - version number formats that have been seen:139# - <major>.<minor>140# - <major>.<minor>.<micro>141#142# Full Debug Symbols on Solaris needs version 2.21.1 or newer.143#144OBJCOPY_VERS_CHK := $(shell \145$(OBJCOPY) --version \146| sed -n \147-e 's/.* //' \148-e '/^[01]\./b bad' \149-e '/^2\./{' \150-e ' s/^2\.//' \151-e ' /^[0-9]$$/b bad' \152-e ' /^[0-9]\./b bad' \153-e ' /^1[0-9]$$/b bad' \154-e ' /^1[0-9]\./b bad' \155-e ' /^20\./b bad' \156-e ' /^21\.0$$/b bad' \157-e ' /^21\.0\./b bad' \158-e '}' \159-e ':good' \160-e 's/.*/VALID_VERSION/p' \161-e 'q' \162-e ':bad' \163-e 's/.*/BAD_VERSION/p' \164-e 'q' \165)166ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)167_JUNK_ := $(shell \168echo >&2 "WARNING: $(OBJCOPY) --version info:"; \169$(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \170echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \171"is needed to create valid .debuginfo files."; \172echo >&2 "WARNING: ignoring above objcopy command."; \173echo >&2 "WARNING: patch 149063-01 or newer contains the" \174"correct Solaris 10 SPARC version."; \175echo >&2 "WARNING: patch 149064-01 or newer contains the" \176"correct Solaris 10 X86 version."; \177echo >&2 "WARNING: Solaris 11 Update 1 contains the" \178"correct version."; \179)180OBJCOPY=181endif182endif183184ifeq ($(OBJCOPY),)185_JUNK_ := $(shell \186echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")187ENABLE_FULL_DEBUG_SYMBOLS=0188_JUNK_ := $(shell \189echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")190else191_JUNK_ := $(shell \192echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")193194# Library stripping policies for .debuginfo configs:195# all_strip - strips everything from the library196# min_strip - strips most stuff from the library; leaves minimum symbols197# no_strip - does not strip the library at all198#199# Oracle security policy requires "all_strip". A waiver was granted on200# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.201#202# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.203#204STRIP_POLICY ?= min_strip205206_JUNK_ := $(shell \207echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")208209ZIP_DEBUGINFO_FILES ?= 1210211_JUNK_ := $(shell \212echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")213endif214endif # ENABLE_FULL_DEBUG_SYMBOLS=1215endif # BUILD_FLAVOR216endif # JDK_6_OR_EARLIER217218JDK_INCLUDE_SUBDIR=solaris219220# Library suffix221LIBRARY_SUFFIX=so222223EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html224225# client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX)226EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)227ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)228ifeq ($(ZIP_DEBUGINFO_FILES),1)229EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz230else231EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo232endif233endif234235EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server236EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client237238ifeq ($(JVM_VARIANT_SERVER),true)239EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt240EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)241EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.$(LIBRARY_SUFFIX)242EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)243ifeq ($(ARCH_DATA_MODEL),32)244EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)245EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)246endif247ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)248ifeq ($(ZIP_DEBUGINFO_FILES),1)249EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz250EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.diz251EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.diz252ifeq ($(ARCH_DATA_MODEL),32)253EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.diz254EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.diz255endif256else257EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo258EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.debuginfo259EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.debuginfo260ifeq ($(ARCH_DATA_MODEL),32)261EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.debuginfo262EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.debuginfo263endif264endif265endif266endif267ifeq ($(JVM_VARIANT_CLIENT),true)268EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt269EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)270EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)271EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)272ifeq ($(ARCH_DATA_MODEL),32)273EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)274EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)275endif276ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)277ifeq ($(ZIP_DEBUGINFO_FILES),1)278EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz279EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.diz280EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.diz281ifeq ($(ARCH_DATA_MODEL),32)282EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.diz283EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.diz284endif285else286EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo287EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.debuginfo288EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.debuginfo289ifeq ($(ARCH_DATA_MODEL),32)290EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.debuginfo291EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.debuginfo292endif293endif294endif295endif296297EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)298ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)299ifeq ($(ZIP_DEBUGINFO_FILES),1)300EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz301else302EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo303endif304endif305EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar306307308