Path: blob/jdk8u272-b10-aarch32-20201026/hotspot/make/bsd/makefiles/defs.make
83397 views
#1# Copyright (c) 2006, 2013, 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 bsd builds.25# Include the top level defs.make under make directory instead of this one.26# This file is included into make/defs.make.2728SLASH_JAVA ?= /java2930# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name31ARCH:=$(shell uname -m)32PATH_SEP = :33ifeq ($(LP64), 1)34ARCH_DATA_MODEL ?= 6435else36ARCH_DATA_MODEL ?= 3237endif3839# zero40ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)41ifeq ($(ARCH_DATA_MODEL), 64)42MAKE_ARGS += LP64=143endif44PLATFORM = bsd-zero45VM_PLATFORM = bsd_$(subst i386,i486,$(ZERO_LIBARCH))46HS_ARCH = zero47ARCH = zero48endif4950# ia6451ifeq ($(ARCH), ia64)52ARCH_DATA_MODEL = 6453MAKE_ARGS += LP64=154PLATFORM = bsd-ia6455VM_PLATFORM = bsd_ia6456HS_ARCH = ia6457endif5859# sparc60ifeq ($(ARCH), sparc64)61ifeq ($(ARCH_DATA_MODEL), 64)62ARCH_DATA_MODEL = 6463MAKE_ARGS += LP64=164PLATFORM = bsd-sparcv965VM_PLATFORM = bsd_sparcv966else67ARCH_DATA_MODEL = 3268PLATFORM = bsd-sparc69VM_PLATFORM = bsd_sparc70endif71HS_ARCH = sparc72endif7374# amd6475ifneq (,$(findstring $(ARCH), amd64 x86_64))76ifeq ($(ARCH_DATA_MODEL), 64)77ARCH_DATA_MODEL = 6478MAKE_ARGS += LP64=179PLATFORM = bsd-amd6480VM_PLATFORM = bsd_amd6481HS_ARCH = x8682else83ARCH_DATA_MODEL = 3284PLATFORM = bsd-i58685VM_PLATFORM = bsd_i48686HS_ARCH = x8687# We have to reset ARCH to i386 since SRCARCH relies on it88ARCH = i38689endif90endif9192# i38693ifeq ($(ARCH), i386)94ifeq ($(ARCH_DATA_MODEL), 64)95ARCH_DATA_MODEL = 6496MAKE_ARGS += LP64=197PLATFORM = bsd-amd6498VM_PLATFORM = bsd_amd6499HS_ARCH = x86100# We have to reset ARCH to amd64 since SRCARCH relies on it101ARCH = amd64102else103ARCH_DATA_MODEL = 32104PLATFORM = bsd-i586105VM_PLATFORM = bsd_i486106HS_ARCH = x86107endif108endif109110# ARM111ifeq ($(ARCH), arm)112ARCH_DATA_MODEL = 32113PLATFORM = bsd-arm114VM_PLATFORM = bsd_arm115HS_ARCH = arm116endif117118# PPC119ifeq ($(ARCH), ppc)120ARCH_DATA_MODEL = 32121PLATFORM = bsd-ppc122VM_PLATFORM = bsd_ppc123HS_ARCH = ppc124endif125126# On 32 bit bsd we build server and client, on 64 bit just server.127ifeq ($(JVM_VARIANTS),)128ifeq ($(ARCH_DATA_MODEL), 32)129JVM_VARIANTS:=client,server130JVM_VARIANT_CLIENT:=true131JVM_VARIANT_SERVER:=true132else133JVM_VARIANTS:=server134JVM_VARIANT_SERVER:=true135endif136endif137138OS_VENDOR:=$(shell uname -s)139140# determine if HotSpot is being built in JDK6 or earlier version141JDK6_OR_EARLIER=0142ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"143# if the longer variable names (newer build style) are set, then check those144ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"145JDK6_OR_EARLIER=1146endif147else148# the longer variables aren't set so check the shorter variable names149ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"150JDK6_OR_EARLIER=1151endif152endif153154ifeq ($(JDK6_OR_EARLIER),0)155# Full Debug Symbols is supported on JDK7 or newer.156# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product157# builds is enabled with debug info files ZIP'ed to save space. For158# BUILD_FLAVOR != product builds, FDS is always enabled, after all a159# debug build without debug info isn't very useful.160# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.161#162# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be163# disabled for a BUILD_FLAVOR == product build.164#165# Note: Use of a different variable name for the FDS override option166# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS167# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass168# in options via environment variables, use of distinct variables169# prevents strange behaviours. For example, in a BUILD_FLAVOR !=170# product build, the FULL_DEBUG_SYMBOLS environment variable will be171# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If172# the same variable name is used, then different values can be picked173# up by different parts of the build. Just to be clear, we only need174# two variable names because the incoming option value can be175# overridden in some situations, e.g., a BUILD_FLAVOR != product176# build.177178# Due to the multiple sub-make processes that occur this logic gets179# executed multiple times. We reduce the noise by at least checking that180# BUILD_FLAVOR has been set.181ifneq ($(BUILD_FLAVOR),)182ifeq ($(BUILD_FLAVOR), product)183FULL_DEBUG_SYMBOLS ?= 1184ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)185else186# debug variants always get Full Debug Symbols (if available)187ENABLE_FULL_DEBUG_SYMBOLS = 1188endif189_JUNK_ := $(shell \190echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")191# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later192193ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)194ifeq ($(OS_VENDOR), Darwin)195# MacOS X doesn't use OBJCOPY or STRIP_POLICY196OBJCOPY=197STRIP_POLICY=198ZIP_DEBUGINFO_FILES ?= 1199else200# Default OBJCOPY comes from GNU Binutils on BSD201ifeq ($(CROSS_COMPILE_ARCH),)202DEF_OBJCOPY=/usr/bin/objcopy203else204# Assume objcopy is part of the cross-compilation toolset205ifneq ($(ALT_COMPILER_PATH),)206DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy207endif208endif209OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))210ifneq ($(ALT_OBJCOPY),)211_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")212OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))213endif214215ifeq ($(OBJCOPY),)216_JUNK_ := $(shell \217echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \218"files. You may need to set ALT_OBJCOPY.")219ENABLE_FULL_DEBUG_SYMBOLS=0220_JUNK_ := $(shell \221echo >&2 "INFO:" \222"ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")223else224_JUNK_ := $(shell \225echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo" \226"files.")227228# Library stripping policies for .debuginfo configs:229# all_strip - strips everything from the library230# min_strip - strips most stuff from the library; leaves231# minimum symbols232# no_strip - does not strip the library at all233#234# Oracle security policy requires "all_strip". A waiver was235# granted on 2011.09.01 that permits using "min_strip" in the236# Java JDK and Java JRE.237#238# Currently, STRIP_POLICY is only used when Full Debug Symbols239# is enabled.240#241STRIP_POLICY ?= min_strip242243_JUNK_ := $(shell \244echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")245246ZIP_DEBUGINFO_FILES ?= 1247endif248249_JUNK_ := $(shell \250echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")251endif252endif # ENABLE_FULL_DEBUG_SYMBOLS=1253endif # BUILD_FLAVOR254endif # JDK_6_OR_EARLIER255256JDK_INCLUDE_SUBDIR=bsd257258# Library suffix259ifeq ($(OS_VENDOR),Darwin)260LIBRARY_SUFFIX=dylib261else262LIBRARY_SUFFIX=so263endif264265EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html266267# client and server subdirectories have symbolic links to ../libjsig.so268EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)269270ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)271ifeq ($(ZIP_DEBUGINFO_FILES),1)272EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz273else274ifeq ($(OS_VENDOR), Darwin)275EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM276else277EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo278endif279endif280endif281282EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server283EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client284EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal285286ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)287EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt288EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)289290ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)291ifeq ($(ZIP_DEBUGINFO_FILES),1)292EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz293else294ifeq ($(OS_VENDOR), Darwin)295EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM296else297EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo298endif299endif300endif301endif302303ifeq ($(JVM_VARIANT_CLIENT),true)304EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt305EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)306307ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)308ifeq ($(ZIP_DEBUGINFO_FILES),1)309EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz310else311ifeq ($(OS_VENDOR), Darwin)312EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM313else314EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo315endif316endif317endif318endif319320ifeq ($(JVM_VARIANT_MINIMAL1),true)321EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt322EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)323endif324325# Serviceability Binaries326# No SA Support for PPC, IA64, ARM or zero327ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \328$(EXPORT_LIB_DIR)/sa-jdi.jar329330ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)331ifeq ($(ZIP_DEBUGINFO_FILES),1)332ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz333else334ifeq ($(OS_VENDOR), Darwin)335ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM336else337ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo338endif339endif340endif341342ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \343$(EXPORT_LIB_DIR)/sa-jdi.jar344ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \345$(EXPORT_LIB_DIR)/sa-jdi.jar346347ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)348ifeq ($(ZIP_DEBUGINFO_FILES),1)349ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz350else351ifeq ($(OS_VENDOR), Darwin)352ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM353else354ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo355endif356endif357endif358359ADD_SA_BINARIES/ppc =360ADD_SA_BINARIES/ia64 =361ADD_SA_BINARIES/arm =362ADD_SA_BINARIES/zero =363364EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))365366# Universal build settings367ifeq ($(OS_VENDOR), Darwin)368# Build universal binaries by default on Mac OS X369MACOSX_UNIVERSAL = true370ifneq ($(ALT_MACOSX_UNIVERSAL),)371MACOSX_UNIVERSAL = $(ALT_MACOSX_UNIVERSAL)372endif373MAKE_ARGS += MACOSX_UNIVERSAL=$(MACOSX_UNIVERSAL)374375# Universal settings376ifeq ($(MACOSX_UNIVERSAL), true)377378# Set universal export path but avoid using ARCH or PLATFORM subdirs379EXPORT_PATH=$(OUTPUTDIR)/export-universal$(EXPORT_SUBDIR)380ifneq ($(ALT_EXPORT_PATH),)381EXPORT_PATH=$(ALT_EXPORT_PATH)382endif383384# Set universal image dir385JDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-universal$(EXPORT_SUBDIR)386ifneq ($(ALT_JDK_IMAGE_DIR),)387JDK_IMAGE_DIR=$(ALT_JDK_IMAGE_DIR)388endif389390# Binaries to 'universalize' if built391UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX)392UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX)393UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX)394UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX)395396# Files to simply copy in place397UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/Xusage.txt398UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/Xusage.txt399ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)400ifeq ($(ZIP_DEBUGINFO_FILES),1)401UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.diz402UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.diz403UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.diz404UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.diz405else406UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX).dSYM407UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX).dSYM408UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM409UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM410endif411endif412413endif414endif415416417