defs.make revision 3691
0N/A#
3364N/A# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
1472N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A# or visit www.oracle.com if you need additional information or have any
1472N/A# questions.
0N/A#
0N/A#
0N/A
0N/A# The common definitions for hotspot linux builds.
0N/A# Include the top level defs.make under make directory instead of this one.
0N/A# This file is included into make/defs.make.
0N/A
0N/ASLASH_JAVA ?= /java
0N/A
0N/A# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
0N/AARCH:=$(shell uname -m)
0N/APATH_SEP = :
0N/Aifeq ($(LP64), 1)
0N/A ARCH_DATA_MODEL ?= 64
0N/Aelse
0N/A ARCH_DATA_MODEL ?= 32
0N/Aendif
0N/A
1010N/A# zero
3617N/Aifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
1010N/A ifeq ($(ARCH_DATA_MODEL), 64)
1010N/A MAKE_ARGS += LP64=1
1010N/A endif
1010N/A PLATFORM = linux-zero
1010N/A VM_PLATFORM = linux_$(subst i386,i486,$(ZERO_LIBARCH))
1010N/A HS_ARCH = zero
1010N/A ARCH = zero
1010N/Aendif
1010N/A
0N/A# ia64
0N/Aifeq ($(ARCH), ia64)
0N/A ARCH_DATA_MODEL = 64
0N/A MAKE_ARGS += LP64=1
0N/A PLATFORM = linux-ia64
0N/A VM_PLATFORM = linux_ia64
0N/A HS_ARCH = ia64
0N/Aendif
0N/A
0N/A# sparc
0N/Aifeq ($(ARCH), sparc64)
0N/A ifeq ($(ARCH_DATA_MODEL), 64)
0N/A ARCH_DATA_MODEL = 64
0N/A MAKE_ARGS += LP64=1
0N/A PLATFORM = linux-sparcv9
0N/A VM_PLATFORM = linux_sparcv9
0N/A else
0N/A ARCH_DATA_MODEL = 32
0N/A PLATFORM = linux-sparc
0N/A VM_PLATFORM = linux_sparc
0N/A endif
0N/A HS_ARCH = sparc
0N/Aendif
0N/A
0N/A# x86_64
0N/Aifeq ($(ARCH), x86_64)
0N/A ifeq ($(ARCH_DATA_MODEL), 64)
0N/A ARCH_DATA_MODEL = 64
0N/A MAKE_ARGS += LP64=1
0N/A PLATFORM = linux-amd64
0N/A VM_PLATFORM = linux_amd64
0N/A HS_ARCH = x86
0N/A else
0N/A ARCH_DATA_MODEL = 32
0N/A PLATFORM = linux-i586
0N/A VM_PLATFORM = linux_i486
0N/A HS_ARCH = x86
0N/A # We have to reset ARCH to i686 since SRCARCH relies on it
0N/A ARCH = i686
0N/A endif
0N/Aendif
0N/A
0N/A# i686
0N/Aifeq ($(ARCH), i686)
0N/A ARCH_DATA_MODEL = 32
0N/A PLATFORM = linux-i586
0N/A VM_PLATFORM = linux_i486
0N/A HS_ARCH = x86
0N/Aendif
0N/A
1601N/A# ARM
1601N/Aifeq ($(ARCH), arm)
1601N/A ARCH_DATA_MODEL = 32
1601N/A PLATFORM = linux-arm
1601N/A VM_PLATFORM = linux_arm
1601N/A HS_ARCH = arm
1601N/Aendif
1601N/A
1601N/A# PPC
1601N/Aifeq ($(ARCH), ppc)
1601N/A ARCH_DATA_MODEL = 32
1601N/A PLATFORM = linux-ppc
1601N/A VM_PLATFORM = linux_ppc
1601N/A HS_ARCH = ppc
1601N/Aendif
1601N/A
3617N/A# On 32 bit linux we build server and client, on 64 bit just server.
3617N/Aifeq ($(JVM_VARIANTS),)
3617N/A ifeq ($(ARCH_DATA_MODEL), 32)
3617N/A JVM_VARIANTS:=client,server
3617N/A JVM_VARIANT_CLIENT:=true
3617N/A JVM_VARIANT_SERVER:=true
3617N/A else
3617N/A JVM_VARIANTS:=server
3617N/A JVM_VARIANT_SERVER:=true
3617N/A endif
3617N/Aendif
3617N/A
2790N/A# determine if HotSpot is being built in JDK6 or earlier version
2790N/AJDK6_OR_EARLIER=0
2790N/Aifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
2790N/A # if the longer variable names (newer build style) are set, then check those
2790N/A ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
2790N/A JDK6_OR_EARLIER=1
2790N/A endif
2790N/Aelse
2790N/A # the longer variables aren't set so check the shorter variable names
2790N/A ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
2790N/A JDK6_OR_EARLIER=1
2790N/A endif
2790N/Aendif
2790N/A
2790N/Aifeq ($(JDK6_OR_EARLIER),0)
3364N/A # Full Debug Symbols is supported on JDK7 or newer.
3365N/A # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
3365N/A # builds is enabled with debug info files ZIP'ed to save space. For
3365N/A # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
3365N/A # debug build without debug info isn't very useful.
3365N/A # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
3365N/A #
3365N/A # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
3365N/A # disabled for a BUILD_FLAVOR == product build.
3365N/A #
3365N/A # Note: Use of a different variable name for the FDS override option
3365N/A # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
3365N/A # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
3365N/A # in options via environment variables, use of distinct variables
3365N/A # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
3365N/A # product build, the FULL_DEBUG_SYMBOLS environment variable will be
3365N/A # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
3365N/A # the same variable name is used, then different values can be picked
3365N/A # up by different parts of the build. Just to be clear, we only need
3365N/A # two variable names because the incoming option value can be
3365N/A # overridden in some situations, e.g., a BUILD_FLAVOR != product
3365N/A # build.
3364N/A
3365N/A ifeq ($(BUILD_FLAVOR), product)
3365N/A FULL_DEBUG_SYMBOLS ?= 1
3365N/A ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
3365N/A else
3365N/A # debug variants always get Full Debug Symbols (if available)
3365N/A ENABLE_FULL_DEBUG_SYMBOLS = 1
3365N/A endif
3365N/A _JUNK_ := $(shell \
3365N/A echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
3364N/A # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
2790N/A
3364N/A ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3364N/A # Default OBJCOPY comes from GNU Binutils on Linux:
3364N/A DEF_OBJCOPY=/usr/bin/objcopy
3364N/A ifdef CROSS_COMPILE_ARCH
3364N/A # don't try to generate .debuginfo files when cross compiling
3364N/A _JUNK_ := $(shell \
3364N/A echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
3364N/A "skipping .debuginfo generation.")
3364N/A OBJCOPY=
3364N/A else
3364N/A OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
3364N/A ifneq ($(ALT_OBJCOPY),)
3364N/A _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
3364N/A OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
3364N/A endif
3364N/A endif
3364N/A else
2790N/A OBJCOPY=
2790N/A endif
3364N/A
2790N/A ifeq ($(OBJCOPY),)
2790N/A _JUNK_ := $(shell \
2790N/A echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
3364N/A ENABLE_FULL_DEBUG_SYMBOLS=0
3365N/A _JUNK_ := $(shell \
3365N/A echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
2790N/A else
2790N/A _JUNK_ := $(shell \
2790N/A echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
3364N/A
2790N/A # Library stripping policies for .debuginfo configs:
2790N/A # all_strip - strips everything from the library
2790N/A # min_strip - strips most stuff from the library; leaves minimum symbols
2790N/A # no_strip - does not strip the library at all
2790N/A #
2790N/A # Oracle security policy requires "all_strip". A waiver was granted on
2790N/A # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
2790N/A #
3364N/A # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
3364N/A #
3364N/A STRIP_POLICY ?= min_strip
3364N/A
2790N/A _JUNK_ := $(shell \
2790N/A echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
3364N/A
3364N/A ZIP_DEBUGINFO_FILES ?= 1
3364N/A
3364N/A _JUNK_ := $(shell \
3364N/A echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
2790N/A endif
2790N/Aendif
2790N/A
0N/AJDK_INCLUDE_SUBDIR=linux
0N/A
2796N/A# Library suffix
2796N/ALIBRARY_SUFFIX=so
2796N/A
0N/A# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
0N/AVM_DEBUG=jvmg
0N/A
0N/AEXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
1015N/A
1015N/A# client and server subdirectories have symbolic links to ../libjsig.so
2796N/AEXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
3364N/Aifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3364N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
3364N/A EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
3364N/A else
3364N/A EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
3364N/A endif
2790N/Aendif
1601N/AEXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
2671N/AEXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
1015N/A
3586N/AEXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar
3586N/A
3617N/Aifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
3617N/A EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
3617N/A EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
3364N/A ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3364N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
3364N/A EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
3364N/A else
3364N/A EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
3364N/A endif
2790N/A endif
1601N/Aendif
1601N/A
3617N/Aifeq ($(JVM_VARIANT_CLIENT),true)
3617N/A EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
3617N/A EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
3691N/A ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3691N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
3691N/A EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
3691N/A else
3691N/A EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
2790N/A endif
3617N/A endif
0N/Aendif
1601N/A
1601N/A# Serviceability Binaries
1601N/A# No SA Support for PPC, IA64, ARM or zero
2796N/AADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
1601N/A $(EXPORT_LIB_DIR)/sa-jdi.jar
2796N/AADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
1601N/A $(EXPORT_LIB_DIR)/sa-jdi.jar
3364N/Aifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
3364N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
3364N/A ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
3364N/A ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
3364N/A else
3364N/A ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
3364N/A ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
3364N/A endif
2790N/Aendif
1601N/AADD_SA_BINARIES/ppc =
1601N/AADD_SA_BINARIES/ia64 =
1601N/AADD_SA_BINARIES/arm =
1601N/AADD_SA_BINARIES/zero =
1601N/A
1601N/AEXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
1601N/A
1601N/A