This commit is contained in:
Iris Clark 2015-11-20 12:22:41 -08:00
commit eb6fab9412
45 changed files with 641 additions and 960 deletions

View File

@ -48,17 +48,14 @@
# Set ALT_BUILD_WIN_SA=1 to enable building SA on # Set ALT_BUILD_WIN_SA=1 to enable building SA on
# Windows. # Windows.
# Version strings and numbers: # Version strings and numbers:
# JDK_VERSION Current JDK version (e.g. 1.6.0) # VERSION_SHORT Current JDK version (e.g. 9.0.0)
# PREVIOUS_JDK_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) # JDK_PREVIOUS_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) (Only needed
# FULL_VERSION Full version string to use (e.g. "1.6.0-ea-b42") # to facilitate standalone build.)
# # VERSION_STRING Full version string to use (e.g. "9.0.0-ea-b42")
# Version strings and numbers especially needed on Windows: # VERSION_MAJOR Major number for version (e.g. 9)
# COOKED_JDK_UPDATE_VERSION Just the update release number (e.g. 02) # VERSION_MINOR Minor number for version (e.g. 0)
# COOKED_BUILD_NUMBER Just the build number (e.g. 42) # VERSION_SECURITY Security number for version (e.g. 0)
# JDK_MKTG_VERSION Marketing JDK version (e.g. 6.0) # VERSION_PATCH Patch number for version (e.g. 0)
# JDK_MAJOR_VERSION Major number for version (e.g. 1) always 1?
# JDK_MINOR_VERSION Minor number for version (e.g. 6)
# JDK_MICRO_VERSION Micro number for version (e.g. 0)
# #
# Default is build both product fastdebug and create export area # Default is build both product fastdebug and create export area
@ -855,9 +852,9 @@ examples_help:
@$(ECHO) \ @$(ECHO) \
" $(MAKE) world" " $(MAKE) world"
@$(ECHO) \ @$(ECHO) \
" $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(JDK_PREVIOUS_VERSION)"
@$(ECHO) \ @$(ECHO) \
" $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(VERSION_STRING)"
# Universal build support # Universal build support
ifeq ($(OS_VENDOR), Darwin) ifeq ($(OS_VENDOR), Darwin)

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright 2012, 2013 SAP AG. All rights reserved. # Copyright 2012, 2013 SAP AG. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
@ -210,7 +210,7 @@ TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright 2012, 2013 SAP AG. All rights reserved. # Copyright 2012, 2013 SAP AG. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
@ -37,9 +37,8 @@
# GAMMADIR - top of workspace # GAMMADIR - top of workspace
# OS_FAMILY - operating system # OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered # VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] # VERSION_STRING - the JDK version string as specified by JEP-223
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty # HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
# #
# Builds the directory trees with makefiles plus some convenience files in # Builds the directory trees with makefiles plus some convenience files in
# each directory: # each directory:
@ -132,11 +131,7 @@ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
# Define variables to be set in flags.make. # Define variables to be set in flags.make.
# Default values are set in make/defs.make. # Default values are set in make/defs.make.
ifeq ($(HOTSPOT_BUILD_VERSION),)
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
else
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
endif
# Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
ifndef HOTSPOT_BUILD_USER ifndef HOTSPOT_BUILD_USER
HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@ -161,7 +156,7 @@ ifndef OPENJDK
endif endif
endif endif
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE = \ BUILDTREE = \
$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@ -210,9 +205,9 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo "BUILDARCH = $(BUILDARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \
echo "LIBARCH = $(LIBARCH)"; \ echo "LIBARCH = $(LIBARCH)"; \
echo "TARGET = $(TARGET)"; \ echo "TARGET = $(TARGET)"; \
echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ echo "VERSION_STRING = $(VERSION_STRING)"; \
echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
echo "OPENJDK = $(OPENJDK)"; \ echo "OPENJDK = $(OPENJDK)"; \

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright 2012, 2013 SAP AG. All rights reserved. # Copyright 2012, 2013 SAP AG. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
@ -79,102 +79,85 @@ ifeq ($(JVM_VARIANTS),)
endif endif
endif endif
# determine if HotSpot is being built in JDK6 or earlier version # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
JDK6_OR_EARLIER=0 # builds is enabled with debug info files ZIP'ed to save space. For
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
# if the longer variable names (newer build style) are set, then check those # debug build without debug info isn't very useful.
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
JDK6_OR_EARLIER=1 #
endif # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
else # disabled for a BUILD_FLAVOR == product build.
# the longer variables aren't set so check the shorter variable names #
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1" # Note: Use of a different variable name for the FDS override option
JDK6_OR_EARLIER=1 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
endif # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
endif # in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
ifeq ($(JDK6_OR_EARLIER),0) # Due to the multiple sub-make processes that occur this logic gets
# Full Debug Symbols is supported on JDK7 or newer. # executed multiple times. We reduce the noise by at least checking that
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product # BUILD_FLAVOR has been set.
# builds is enabled with debug info files ZIP'ed to save space. For ifneq ($(BUILD_FLAVOR),)
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a ifeq ($(BUILD_FLAVOR), product)
# debug build without debug info isn't very useful. FULL_DEBUG_SYMBOLS ?= 1
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
# else
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be # debug variants always get Full Debug Symbols (if available)
# disabled for a BUILD_FLAVOR == product build. ENABLE_FULL_DEBUG_SYMBOLS = 1
# endif
# Note: Use of a different variable name for the FDS override option $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
# Due to the multiple sub-make processes that occur this logic gets ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# executed multiple times. We reduce the noise by at least checking that # Default OBJCOPY comes from GNU Binutils on Linux
# BUILD_FLAVOR has been set. ifeq ($(CROSS_COMPILE_ARCH),)
ifneq ($(BUILD_FLAVOR),) DEF_OBJCOPY=/usr/bin/objcopy
ifeq ($(BUILD_FLAVOR), product)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
else else
# debug variants always get Full Debug Symbols (if available) # Assume objcopy is part of the cross-compilation toolset
ENABLE_FULL_DEBUG_SYMBOLS = 1 ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(OBJCOPY),)
# Default OBJCOPY comes from GNU Binutils on Linux $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
ifeq ($(CROSS_COMPILE_ARCH),) ENABLE_FULL_DEBUG_SYMBOLS=0
DEF_OBJCOPY=/usr/bin/objcopy $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
else else
# Assume objcopy is part of the cross-compilation toolset $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
ifeq ($(OBJCOPY),) # Library stripping policies for .debuginfo configs:
$(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")) # all_strip - strips everything from the library
ENABLE_FULL_DEBUG_SYMBOLS=0 # min_strip - strips most stuff from the library; leaves minimum symbols
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) # no_strip - does not strip the library at all
else #
$(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files.")) # Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
#
STRIP_POLICY ?= min_strip
# Library stripping policies for .debuginfo configs: $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
#
STRIP_POLICY ?= min_strip
$(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) ZIP_DEBUGINFO_FILES ?= 1
ZIP_DEBUGINFO_FILES ?= 1 $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
endif
$(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif endif # BUILD_FLAVOR
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR
endif # JDK_6_OR_EARLIER
# unused JDK_INCLUDE_SUBDIR=aix # unused JDK_INCLUDE_SUBDIR=aix

View File

@ -74,12 +74,14 @@ else
endif endif
# The following variables are defined in the generated flags.make file. # The following variables are defined in the generated flags.make file.
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \ JDK_VER_DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \ -DVERSION_MINOR=$(VERSION_MINOR) \
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \ -DVERSION_SECURITY=$(VERSION_SECURITY) \
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\"" -DVERSION_PATCH=$(VERSION_PATCH) \
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \ -DVERSION_BUILD=$(VERSION_BUILD)
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \ VM_VER_DEFS = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
-DVERSION_STRING="\"$(VERSION_STRING)\"" \
-DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
$(JDK_VER_DEFS) $(JDK_VER_DEFS)
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\" HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\"" BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -203,7 +203,7 @@ TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)

View File

@ -36,9 +36,8 @@
# GAMMADIR - top of workspace # GAMMADIR - top of workspace
# OS_FAMILY - operating system # OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered # VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] # VERSION_STRING - the JDK version string as specified by JEP-223
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty # HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
# #
# Builds the directory trees with makefiles plus some convenience files in # Builds the directory trees with makefiles plus some convenience files in
# each directory: # each directory:
@ -137,11 +136,7 @@ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
# Define variables to be set in flags.make. # Define variables to be set in flags.make.
# Default values are set in make/defs.make. # Default values are set in make/defs.make.
ifeq ($(HOTSPOT_BUILD_VERSION),)
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
else
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
endif
# Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
ifndef HOTSPOT_BUILD_USER ifndef HOTSPOT_BUILD_USER
HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@ -166,7 +161,7 @@ ifndef OPENJDK
endif endif
endif endif
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE = \ BUILDTREE = \
$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@ -216,9 +211,9 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo "BUILDARCH = $(BUILDARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \
echo "LIBARCH = $(LIBARCH)"; \ echo "LIBARCH = $(LIBARCH)"; \
echo "TARGET = $(TARGET)"; \ echo "TARGET = $(TARGET)"; \
echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ echo "VERSION_STRING = $(VERSION_STRING)"; \
echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
echo "OPENJDK = $(OPENJDK)"; \ echo "OPENJDK = $(OPENJDK)"; \

View File

@ -144,117 +144,100 @@ endif
OS_VENDOR:=$(shell uname -s) OS_VENDOR:=$(shell uname -s)
# determine if HotSpot is being built in JDK6 or earlier version # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
JDK6_OR_EARLIER=0 # builds is enabled with debug info files ZIP'ed to save space. For
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
# if the longer variable names (newer build style) are set, then check those # debug build without debug info isn't very useful.
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
JDK6_OR_EARLIER=1 #
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
# disabled for a BUILD_FLAVOR == product build.
#
# Note: Use of a different variable name for the FDS override option
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
# Due to the multiple sub-make processes that occur this logic gets
# executed multiple times. We reduce the noise by at least checking that
# BUILD_FLAVOR has been set.
ifneq ($(BUILD_FLAVOR),)
# FULL_DEBUG_SYMBOLS not created for individual static libraries
ifeq ($(STATIC_BUILD),false)
ifeq ($(BUILD_FLAVOR), product)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
else
# debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1
endif
endif endif
else $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# the longer variables aren't set so check the shorter variable names # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
JDK6_OR_EARLIER=1
endif
endif
ifeq ($(JDK6_OR_EARLIER),0) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# Full Debug Symbols is supported on JDK7 or newer. ifeq ($(OS_VENDOR), Darwin)
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product # MacOS X doesn't use OBJCOPY or STRIP_POLICY
# builds is enabled with debug info files ZIP'ed to save space. For OBJCOPY=
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a STRIP_POLICY=
# debug build without debug info isn't very useful. ZIP_DEBUGINFO_FILES ?= 1
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. else
# # Default OBJCOPY comes from GNU Binutils on BSD
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be ifeq ($(CROSS_COMPILE_ARCH),)
# disabled for a BUILD_FLAVOR == product build. DEF_OBJCOPY=/usr/bin/objcopy
#
# Note: Use of a different variable name for the FDS override option
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
# Due to the multiple sub-make processes that occur this logic gets
# executed multiple times. We reduce the noise by at least checking that
# BUILD_FLAVOR has been set.
ifneq ($(BUILD_FLAVOR),)
# FULL_DEBUG_SYMBOLS not created for individual static libraries
ifeq ($(STATIC_BUILD),false)
ifeq ($(BUILD_FLAVOR), product)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
else else
# debug variants always get Full Debug Symbols (if available) # Assume objcopy is part of the cross-compilation toolset
ENABLE_FULL_DEBUG_SYMBOLS = 1 ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
endif
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(OBJCOPY),)
ifeq ($(OS_VENDOR), Darwin) $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo" \
# MacOS X doesn't use OBJCOPY or STRIP_POLICY "files. You may need to set ALT_OBJCOPY."))
OBJCOPY= ENABLE_FULL_DEBUG_SYMBOLS=0
STRIP_POLICY= $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
ZIP_DEBUGINFO_FILES ?= 1
else else
# Default OBJCOPY comes from GNU Binutils on BSD $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo" \
ifeq ($(CROSS_COMPILE_ARCH),) "files."))
DEF_OBJCOPY=/usr/bin/objcopy
else
# Assume objcopy is part of the cross-compilation toolset
ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
ifeq ($(OBJCOPY),) # Library stripping policies for .debuginfo configs:
$(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo" \ # all_strip - strips everything from the library
"files. You may need to set ALT_OBJCOPY.")) # min_strip - strips most stuff from the library; leaves
ENABLE_FULL_DEBUG_SYMBOLS=0 # minimum symbols
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) # no_strip - does not strip the library at all
else #
$(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo" \ # Oracle security policy requires "all_strip". A waiver was
"files.")) # granted on 2011.09.01 that permits using "min_strip" in the
# Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols
# is enabled.
#
STRIP_POLICY ?= min_strip
# Library stripping policies for .debuginfo configs: $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves
# minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was
# granted on 2011.09.01 that permits using "min_strip" in the
# Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols
# is enabled.
#
STRIP_POLICY ?= min_strip
$(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) ZIP_DEBUGINFO_FILES ?= 1
ZIP_DEBUGINFO_FILES ?= 1
endif
$(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
endif # JDK_6_OR_EARLIER endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR
JDK_INCLUDE_SUBDIR=bsd JDK_INCLUDE_SUBDIR=bsd
@ -274,7 +257,7 @@ EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
# jsig library not needed for static builds # jsig library not needed for static builds
ifneq ($(STATIC_BUILD),true) ifneq ($(STATIC_BUILD),true)
# client and server subdirectories have symbolic links to ../libjsig.so # client and server subdirectories have symbolic links to ../libjsig.so
EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
endif endif

View File

@ -73,12 +73,14 @@ else
endif endif
# The following variables are defined in the generated flags.make file. # The following variables are defined in the generated flags.make file.
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \ JDK_VER_DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \ -DVERSION_MINOR=$(VERSION_MINOR) \
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \ -DVERSION_SECURITY=$(VERSION_SECURITY) \
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\"" -DVERSION_PATCH=$(VERSION_PATCH) \
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \ -DVERSION_BUILD=$(VERSION_BUILD)
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \ VM_VER_DEFS = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
-DVERSION_STRING="\"$(VERSION_STRING)\"" \
-DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
$(JDK_VER_DEFS) $(JDK_VER_DEFS)
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\" HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\"" BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""

View File

@ -122,58 +122,49 @@ endif
# hotspot version definitions # hotspot version definitions
include $(GAMMADIR)/make/jdk_version include $(GAMMADIR)/make/jdk_version
# JDK_PREVIOUS_VERSION is only needed to facilitate standalone builds
ifeq ($(JDK_PREVIOUS_VERSION),)
JDK_PREVIOUS_VERSION=$(STANDALONE_JDK_PREVIOUS_VERSION)
endif
# Java versions needed # Java versions needed
ifeq ($(PREVIOUS_JDK_VERSION),) ifeq ($(VERSION_MAJOR),)
PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION) VERSION_MAJOR=$(STANDALONE_JDK_MAJOR_VER)
endif endif
ifeq ($(JDK_MAJOR_VERSION),) ifeq ($(VERSION_MINOR),)
JDK_MAJOR_VERSION=$(JDK_MAJOR_VER) VERSION_MINOR=$(STANDALONE_JDK_MINOR_VER)
endif endif
ifeq ($(JDK_MINOR_VERSION),) ifeq ($(VERSION_SECURITY),)
JDK_MINOR_VERSION=$(JDK_MINOR_VER) VERSION_SECURITY=$(STANDALONE_JDK_SECURITY_VER)
endif endif
ifeq ($(JDK_MICRO_VERSION),) ifeq ($(VERSION_PATCH),)
JDK_MICRO_VERSION=$(JDK_MICRO_VER) VERSION_PATCH=$(STANDALONE_JDK_PATCH_VER)
endif endif
ifeq ($(JDK_BUILD_NUMBER),) ifeq ($(VERSION_BUILD),)
JDK_BUILD_NUMBER=0 VERSION_BUILD=0
endif endif
ifeq ($(JDK_MKTG_VERSION),) ifeq ($(VERSION_SHORT),)
JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION) VERSION_SHORT=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SECURITY)
endif endif
ifeq ($(JDK_VERSION),) ifeq ($(VERSION_STRING),)
ifeq ($(BUILD_FLAVOR), product) # Note that this is an extremely rough and incorrect approximation of a correct version string.
JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION) VERSION_STRING=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SECURITY)-internal
else
JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)-$(BUILD_FLAVOR)
endif
endif
ifeq ($(FULL_VERSION),)
FULL_VERSION="$(JDK_VERSION)"
endif endif
# FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used ifneq ($(HOTSPOT_RELEASE_VERSION),)
# as JRE version in VM -Xinternalversion output. # Allow old command-line overrides
ifndef JRE_RELEASE_VERSION HOTSPOT_VERSION_STRING := $(HOTSPOT_RELEASE_VERSION)
JRE_RELEASE_VERSION=$(FULL_VERSION)
endif
ifndef HOTSPOT_RELEASE_VERSION
HOTSPOT_RELEASE_VERSION=$(FULL_VERSION)
endif
ifdef HOTSPOT_BUILD_VERSION
# specified in command line
else else
ifdef COOKED_BUILD_NUMBER # Normally get from surrounding JDK build
# JRE build HOTSPOT_VERSION_STRING := $(VERSION_STRING)
HOTSPOT_BUILD_VERSION= endif
else
ifdef USER_RELEASE_SUFFIX ifneq ($(HOTSPOT_BUILD_VERSION),)
HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX) # If old command-lines variable exists, append to version string
else HOTSPOT_VERSION_STRING := $(HOTSPOT_VERSION_STRING)-$(HOTSPOT_BUILD_VERSION)
HOTSPOT_BUILD_VERSION=internal else
endif ifeq ($(SPEC),)
# If building standalone, add -internal.
HOTSPOT_VERSION_STRING := $(HOTSPOT_VERSION_STRING)-internal
endif endif
endif endif
@ -233,7 +224,7 @@ ifneq ($(ALT_OUTPUTDIR),)
endif endif
# Find latest promoted JDK area # Find latest promoted JDK area
JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM) JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(VERSION_STRING)/promoted/latest/binaries/$(PLATFORM)
ifneq ($(ALT_JDK_IMPORT_PATH),) ifneq ($(ALT_JDK_IMPORT_PATH),)
JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH) JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
endif endif
@ -246,7 +237,7 @@ ifneq ($(ALT_JDK_TARGET_IMPORT_PATH),)
endif endif
# Find JDK used for javac compiles # Find JDK used for javac compiles
BOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM) BOOTDIR=$(SLASH_JAVA)/re/j2se/$(JDK_PREVIOUS_VERSION)/latest/binaries/$(PLATFORM)
ifneq ($(ALT_BOOTDIR),) ifneq ($(ALT_BOOTDIR),)
BOOTDIR=$(ALT_BOOTDIR) BOOTDIR=$(ALT_BOOTDIR)
endif endif
@ -337,12 +328,7 @@ MAKE_ARGS += BOOTDIR=$(ABS_BOOTDIR)
MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR) MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR) MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE) MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) MAKE_ARGS += VERSION_STRING=$(VERSION_STRING)
# Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
# to overwrite the default definition since OS specific Makefile also
# includes this make/defs.make file.
MAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
MAKE_ARGS += BOOT_JDK_SOURCETARGET="$(BOOT_JDK_SOURCETARGET)" MAKE_ARGS += BOOT_JDK_SOURCETARGET="$(BOOT_JDK_SOURCETARGET)"

View File

@ -1,32 +0,0 @@
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# This file format must remain compatible with both
# GNU Makefile and Microsoft nmake formats.
#
# Don't put quotes (fail windows build).
HOTSPOT_VM_DISTRO=Java HotSpot(TM)
COMPANY_NAME=Sun Microsystems, Inc.
PRODUCT_NAME=Java(TM) Platform SE

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -26,11 +26,12 @@
# #
# Don't put quotes (fail windows build). # Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2014 HOTSPOT_VM_COPYRIGHT=Copyright 2015
JDK_MAJOR_VER=1 STANDALONE_JDK_MAJOR_VER=9
JDK_MINOR_VER=9 STANDALONE_JDK_MINOR_VER=0
JDK_MICRO_VER=0 STANDALONE_JDK_SECURITY_VER=0
STANDALONE_JDK_PATCH_VER=0
# Previous (bootdir) JDK version # Previous (bootdir) JDK version
JDK_PREVIOUS_VERSION=1.8.0 STANDALONE_JDK_PREVIOUS_VERSION=1.8.0

View File

@ -210,7 +210,7 @@ TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)

View File

@ -36,9 +36,8 @@
# GAMMADIR - top of workspace # GAMMADIR - top of workspace
# OS_FAMILY - operating system # OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered # VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] # VERSION_STRING - the JDK version string as specified by JEP-223
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty # HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
# #
# Builds the directory trees with makefiles plus some convenience files in # Builds the directory trees with makefiles plus some convenience files in
# each directory: # each directory:
@ -134,11 +133,7 @@ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
# Define variables to be set in flags.make. # Define variables to be set in flags.make.
# Default values are set in make/defs.make. # Default values are set in make/defs.make.
ifeq ($(HOTSPOT_BUILD_VERSION),)
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
else
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
endif
# Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
ifndef HOTSPOT_BUILD_USER ifndef HOTSPOT_BUILD_USER
HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@ -163,7 +158,7 @@ ifndef OPENJDK
endif endif
endif endif
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE = \ BUILDTREE = \
$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@ -217,9 +212,9 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo "BUILDARCH = $(BUILDARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \
echo "LIBARCH = $(LIBARCH)"; \ echo "LIBARCH = $(LIBARCH)"; \
echo "TARGET = $(TARGET)"; \ echo "TARGET = $(TARGET)"; \
echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ echo "VERSION_STRING = $(VERSION_STRING)"; \
echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
echo "OPENJDK = $(OPENJDK)"; \ echo "OPENJDK = $(OPENJDK)"; \

View File

@ -139,102 +139,85 @@ ifeq ($(JVM_VARIANTS),)
endif endif
endif endif
# determine if HotSpot is being built in JDK6 or earlier version # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
JDK6_OR_EARLIER=0 # builds is enabled with debug info files ZIP'ed to save space. For
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
# if the longer variable names (newer build style) are set, then check those # debug build without debug info isn't very useful.
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
JDK6_OR_EARLIER=1 #
endif # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
else # disabled for a BUILD_FLAVOR == product build.
# the longer variables aren't set so check the shorter variable names #
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1" # Note: Use of a different variable name for the FDS override option
JDK6_OR_EARLIER=1 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
endif # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
endif # in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
ifeq ($(JDK6_OR_EARLIER),0) # Due to the multiple sub-make processes that occur this logic gets
# Full Debug Symbols is supported on JDK7 or newer. # executed multiple times. We reduce the noise by at least checking that
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product # BUILD_FLAVOR has been set.
# builds is enabled with debug info files ZIP'ed to save space. For ifneq ($(BUILD_FLAVOR),)
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a ifeq ($(BUILD_FLAVOR), product)
# debug build without debug info isn't very useful. FULL_DEBUG_SYMBOLS ?= 1
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
# else
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be # debug variants always get Full Debug Symbols (if available)
# disabled for a BUILD_FLAVOR == product build. ENABLE_FULL_DEBUG_SYMBOLS = 1
# endif
# Note: Use of a different variable name for the FDS override option $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
# Due to the multiple sub-make processes that occur this logic gets ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# executed multiple times. We reduce the noise by at least checking that # Default OBJCOPY comes from GNU Binutils on Linux
# BUILD_FLAVOR has been set. ifeq ($(CROSS_COMPILE_ARCH),)
ifneq ($(BUILD_FLAVOR),) DEF_OBJCOPY=/usr/bin/objcopy
ifeq ($(BUILD_FLAVOR), product)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
else else
# debug variants always get Full Debug Symbols (if available) # Assume objcopy is part of the cross-compilation toolset
ENABLE_FULL_DEBUG_SYMBOLS = 1 ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(OBJCOPY),)
# Default OBJCOPY comes from GNU Binutils on Linux $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
ifeq ($(CROSS_COMPILE_ARCH),) ENABLE_FULL_DEBUG_SYMBOLS=0
DEF_OBJCOPY=/usr/bin/objcopy $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
else else
# Assume objcopy is part of the cross-compilation toolset $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
ifneq ($(ALT_COMPILER_PATH),)
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
endif
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
ifeq ($(OBJCOPY),) # Library stripping policies for .debuginfo configs:
$(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")) # all_strip - strips everything from the library
ENABLE_FULL_DEBUG_SYMBOLS=0 # min_strip - strips most stuff from the library; leaves minimum symbols
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) # no_strip - does not strip the library at all
else #
$(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files.")) # Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
#
STRIP_POLICY ?= min_strip
# Library stripping policies for .debuginfo configs: $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
#
STRIP_POLICY ?= min_strip
$(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) ZIP_DEBUGINFO_FILES ?= 1
ZIP_DEBUGINFO_FILES ?= 1 $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
endif
$(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif endif # BUILD_FLAVOR
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR
endif # JDK_6_OR_EARLIER
JDK_INCLUDE_SUBDIR=linux JDK_INCLUDE_SUBDIR=linux

View File

@ -75,12 +75,14 @@ else
endif endif
# The following variables are defined in the generated flags.make file. # The following variables are defined in the generated flags.make file.
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \ JDK_VER_DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \ -DVERSION_MINOR=$(VERSION_MINOR) \
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \ -DVERSION_SECURITY=$(VERSION_SECURITY) \
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\"" -DVERSION_PATCH=$(VERSION_PATCH) \
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \ -DVERSION_BUILD=$(VERSION_BUILD)
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \ VM_VER_DEFS = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
-DVERSION_STRING="\"$(VERSION_STRING)\"" \
-DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
$(JDK_VER_DEFS) $(JDK_VER_DEFS)
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\" HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\"" BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -157,7 +157,7 @@ TARGETS_CORE = $(addsuffix core,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -36,9 +36,8 @@
# GAMMADIR - top of workspace # GAMMADIR - top of workspace
# OS_FAMILY - operating system # OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered # VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] # VERSION_STRING - the JDK version string as specified by JEP-223
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty # HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
# #
# Builds the directory trees with makefiles plus some convenience files in # Builds the directory trees with makefiles plus some convenience files in
# each directory: # each directory:
@ -124,11 +123,7 @@ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
# Define variables to be set in flags.make. # Define variables to be set in flags.make.
# Default values are set in make/defs.make. # Default values are set in make/defs.make.
ifeq ($(HOTSPOT_BUILD_VERSION),)
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
else
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
endif
# Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
ifndef HOTSPOT_BUILD_USER ifndef HOTSPOT_BUILD_USER
HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@ -153,7 +148,7 @@ ifndef OPENJDK
endif endif
endif endif
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
BUILDTREE = \ BUILDTREE = \
$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@ -203,9 +198,9 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo "BUILDARCH = $(BUILDARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \
echo "LIBARCH = $(LIBARCH)"; \ echo "LIBARCH = $(LIBARCH)"; \
echo "TARGET = $(TARGET)"; \ echo "TARGET = $(TARGET)"; \
echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ echo "VERSION_STRING = $(VERSION_STRING)"; \
echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
echo "OPENJDK = $(OPENJDK)"; \ echo "OPENJDK = $(OPENJDK)"; \

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -77,144 +77,127 @@ ifeq ($(JVM_VARIANTS),)
endif endif
endif endif
# determine if HotSpot is being built in JDK6 or earlier version # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
JDK6_OR_EARLIER=0 # builds is enabled with debug info files ZIP'ed to save space. For
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
# if the longer variable names (newer build style) are set, then check those # debug build without debug info isn't very useful.
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
JDK6_OR_EARLIER=1 #
endif # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
else # disabled for a BUILD_FLAVOR == product build.
# the longer variables aren't set so check the shorter variable names #
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1" # Note: Use of a different variable name for the FDS override option
JDK6_OR_EARLIER=1 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
endif # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
endif # in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
ifeq ($(JDK6_OR_EARLIER),0) # Due to the multiple sub-make processes that occur this logic gets
# Full Debug Symbols is supported on JDK7 or newer. # executed multiple times. We reduce the noise by at least checking that
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product # BUILD_FLAVOR has been set.
# builds is enabled with debug info files ZIP'ed to save space. For ifneq ($(BUILD_FLAVOR),)
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a ifeq ($(BUILD_FLAVOR), product)
# debug build without debug info isn't very useful. FULL_DEBUG_SYMBOLS ?= 1
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
# else
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be # debug variants always get Full Debug Symbols (if available)
# disabled for a BUILD_FLAVOR == product build. ENABLE_FULL_DEBUG_SYMBOLS = 1
# endif
# Note: Use of a different variable name for the FDS override option $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
# the same variable name is used, then different values can be picked
# up by different parts of the build. Just to be clear, we only need
# two variable names because the incoming option value can be
# overridden in some situations, e.g., a BUILD_FLAVOR != product
# build.
# Due to the multiple sub-make processes that occur this logic gets ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# executed multiple times. We reduce the noise by at least checking that # Default OBJCOPY comes from the SUNWbinutils package:
# BUILD_FLAVOR has been set. DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
ifneq ($(BUILD_FLAVOR),) OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifeq ($(BUILD_FLAVOR), product) ifneq ($(ALT_OBJCOPY),)
FULL_DEBUG_SYMBOLS ?= 1 $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
else
# debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1
endif endif
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifneq ($(OBJCOPY),)
# Default OBJCOPY comes from the SUNWbinutils package: # OBJCOPY version check:
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy # - version number is last blank separate word on first line
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) # - version number formats that have been seen:
ifneq ($(ALT_OBJCOPY),) # - <major>.<minor>
$(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)")) # - <major>.<minor>.<micro>
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) #
endif # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
#
ifneq ($(OBJCOPY),) OBJCOPY_VERS_CHK := $(shell \
# OBJCOPY version check: $(OBJCOPY) --version \
# - version number is last blank separate word on first line | sed -n \
# - version number formats that have been seen: -e 's/.* //' \
# - <major>.<minor> -e '/^[01]\./b bad' \
# - <major>.<minor>.<micro> -e '/^2\./{' \
# -e ' s/^2\.//' \
# Full Debug Symbols on Solaris needs version 2.21.1 or newer. -e ' /^[0-9]$$/b bad' \
# -e ' /^[0-9]\./b bad' \
OBJCOPY_VERS_CHK := $(shell \ -e ' /^1[0-9]$$/b bad' \
$(OBJCOPY) --version \ -e ' /^1[0-9]\./b bad' \
| sed -n \ -e ' /^20\./b bad' \
-e 's/.* //' \ -e ' /^21\.0$$/b bad' \
-e '/^[01]\./b bad' \ -e ' /^21\.0\./b bad' \
-e '/^2\./{' \ -e '}' \
-e ' s/^2\.//' \ -e ':good' \
-e ' /^[0-9]$$/b bad' \ -e 's/.*/VALID_VERSION/p' \
-e ' /^[0-9]\./b bad' \ -e 'q' \
-e ' /^1[0-9]$$/b bad' \ -e ':bad' \
-e ' /^1[0-9]\./b bad' \ -e 's/.*/BAD_VERSION/p' \
-e ' /^20\./b bad' \ -e 'q' \
-e ' /^21\.0$$/b bad' \ )
-e ' /^21\.0\./b bad' \ ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
-e '}' \ _JUNK_ := $(shell \
-e ':good' \ echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
-e 's/.*/VALID_VERSION/p' \ $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
-e 'q' \ echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
-e ':bad' \ "is needed to create valid .debuginfo files."; \
-e 's/.*/BAD_VERSION/p' \ echo >&2 "WARNING: ignoring above objcopy command."; \
-e 'q' \ echo >&2 "WARNING: patch 149063-01 or newer contains the" \
"correct Solaris 10 SPARC version."; \
echo >&2 "WARNING: patch 149064-01 or newer contains the" \
"correct Solaris 10 X86 version."; \
echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
"correct version."; \
) )
ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION) OBJCOPY=
_JUNK_ := $(shell \
echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
$(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
"is needed to create valid .debuginfo files."; \
echo >&2 "WARNING: ignoring above objcopy command."; \
echo >&2 "WARNING: patch 149063-01 or newer contains the" \
"correct Solaris 10 SPARC version."; \
echo >&2 "WARNING: patch 149064-01 or newer contains the" \
"correct Solaris 10 X86 version."; \
echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
"correct version."; \
)
OBJCOPY=
endif
endif endif
endif
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
$(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files.")) $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
else else
$(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files.")) $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
# Library stripping policies for .debuginfo configs: # Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library # all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols # min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all # no_strip - does not strip the library at all
# #
# Oracle security policy requires "all_strip". A waiver was granted on # Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
# #
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
# #
STRIP_POLICY ?= min_strip STRIP_POLICY ?= min_strip
$(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
ZIP_DEBUGINFO_FILES ?= 1 ZIP_DEBUGINFO_FILES ?= 1
$(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR endif # BUILD_FLAVOR
endif # JDK_6_OR_EARLIER
JDK_INCLUDE_SUBDIR=solaris JDK_INCLUDE_SUBDIR=solaris

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
# If a SPEC is not set already, then use these defaults. # If a SPEC is not set already, then use these defaults.
@ -39,7 +39,7 @@ ifeq ($(SPEC),)
STRIP = /usr/ccs/bin/strip STRIP = /usr/ccs/bin/strip
endif endif
# Check for the versions of C++ and C compilers ($CXX and $CC) used. # Check for the versions of C++ and C compilers ($CXX and $CC) used.
# Get the last thing on the line that looks like x.x+ (x is a digit). # Get the last thing on the line that looks like x.x+ (x is a digit).
COMPILER_REV := \ COMPILER_REV := \
@ -48,15 +48,9 @@ CC_COMPILER_REV := \
$(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
# Pick which compiler is validated # Pick which compiler is validated
ifeq ($(JRE_RELEASE_VER),1.6.0) # Validated compiler for JDK9 is SS12.3 (5.12)
# Validated compiler for JDK6 is SS11 (5.8) VALIDATED_COMPILER_REVS := 5.12
VALIDATED_COMPILER_REVS := 5.8 VALIDATED_CC_COMPILER_REVS := 5.12
VALIDATED_CC_COMPILER_REVS := 5.8
else
# Validated compiler for JDK9 is SS12.3 (5.12)
VALIDATED_COMPILER_REVS := 5.12
VALIDATED_CC_COMPILER_REVS := 5.12
endif
# Warning messages about not using the above validated versions # Warning messages about not using the above validated versions
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS}) ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
@ -237,7 +231,7 @@ CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_
CFLAGS/NOEX=-features=no%except CFLAGS/NOEX=-features=no%except
# avoid compilation problems arising from fact that C++ compiler tries # avoid compilation problems arising from fact that C++ compiler tries
# to search for external template definition by just compiling additional # to search for external template definition by just compiling additional
# source files in th same context # source files in th same context
CFLAGS += -template=no%extdef CFLAGS += -template=no%extdef
@ -245,7 +239,7 @@ CFLAGS += -template=no%extdef
# Reduce code bloat by reverting back to 5.0 behavior for static initializers # Reduce code bloat by reverting back to 5.0 behavior for static initializers
CFLAGS += -features=no%split_init CFLAGS += -features=no%split_init
# Use -D_Crun_inline_placement so we don't get references to # Use -D_Crun_inline_placement so we don't get references to
# __1c2n6FIpv_0_ or void*operator new(unsigned,void*) # __1c2n6FIpv_0_ or void*operator new(unsigned,void*)
# This avoids the hard requirement of the newer Solaris C++ runtime patches. # This avoids the hard requirement of the newer Solaris C++ runtime patches.
# NOTE: This is an undocumented feature of the SS10 compiler. See 6306698. # NOTE: This is an undocumented feature of the SS10 compiler. See 6306698.

View File

@ -69,12 +69,14 @@ else
endif endif
# The following variables are defined in the generated flags.make file. # The following variables are defined in the generated flags.make file.
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \ JDK_VER_DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \ -DVERSION_MINOR=$(VERSION_MINOR) \
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \ -DVERSION_SECURITY=$(VERSION_SECURITY) \
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\"" -DVERSION_PATCH=$(VERSION_PATCH) \
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \ -DVERSION_BUILD=$(VERSION_BUILD)
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \ VM_VER_DEFS = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
-DVERSION_STRING="\"$(VERSION_STRING)\"" \
-DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
$(JDK_VER_DEFS) $(JDK_VER_DEFS)
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\" HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\"" BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -123,38 +123,12 @@ VARIANT_TEXT=Tiered
# or make/hotspot_distro. # or make/hotspot_distro.
!ifndef HOTSPOT_VM_DISTRO !ifndef HOTSPOT_VM_DISTRO
!if exists($(WorkSpace)\src\closed) !if exists($(WorkSpace)\src\closed)
# if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro,
# instead of hotspot_distro.
JDK6_OR_EARLIER=0
!if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != ""
!if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7
JDK6_OR_EARLIER=1
!endif
!else
!if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7
JDK6_OR_EARLIER=1
!endif
!endif
!if $(JDK6_OR_EARLIER) == 1
!include $(WorkSpace)\make\jdk6_hotspot_distro
!else
!include $(WorkSpace)\make\hotspot_distro !include $(WorkSpace)\make\hotspot_distro
!endif
!else !else
!include $(WorkSpace)\make\openjdk_distro !include $(WorkSpace)\make\openjdk_distro
!endif !endif
!endif !endif
# Following the Web Start / Plugin model here....
# We can have update versions like "01a", but Windows requires
# we use only integers in the file version field. So:
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
#
JDK_UPDATE_VER=0
JDK_BUILD_NUMBER=0
HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
# JDK ProductVersion: # JDK ProductVersion:
@ -163,34 +137,27 @@ HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
# 1.6.0-b01 will be 6.0.0.1 # 1.6.0-b01 will be 6.0.0.1
# 1.6.0_01a-b02 will be 6.0.11.2 # 1.6.0_01a-b02 will be 6.0.11.2
# #
# JDK_* variables are defined in make/jdk_version or on command line # STANDALONE_JDK_* variables are defined in make/jdk_version or on command line
# #
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER) !if "$(JDK_VER)" == ""
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER) JDK_VER=$(STANDALONE_JDK_MAJOR_VER),$(STANDALONE_JDK_MINOR_VER),$(STANDALONE_JDK_SECURITY_VER),$(STANDALONE_JDK_PATCH_VER)
!if "$(JRE_RELEASE_VERSION)" == ""
JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)
!else
JRE_RELEASE_VER=$(JRE_RELEASE_VERSION)
!endif !endif
!if "$(JDK_MKTG_VERSION)" == "" !if "$(JDK_DOTVER)" == ""
JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER) JDK_DOTVER=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER).$(STANDALONE_JDK_PATCH_VER)
!endif
!if "$(VERSION_SHORT)" == ""
VERSION_SHORT=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER)
!endif !endif
# Hotspot Express VM FileVersion:
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
#
#
HS_VER=$(JDK_VER) HS_VER=$(JDK_VER)
HS_DOTVER=$(JDK_DOTVER) HS_DOTVER=$(JDK_DOTVER)
!if "$(HOTSPOT_RELEASE_VERSION)" == "" !if "$(HOTSPOT_RELEASE_VERSION)" == ""
HOTSPOT_RELEASE_VERSION=$(JRE_RELEASE_VERSION) HOTSPOT_RELEASE_VERSION=$(VERSION_STRING)
!endif !endif
!if "$(HOTSPOT_BUILD_VERSION)" == "" !if "$(HOTSPOT_VERSION_STRING)" == ""
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_VERSION_STRING=$(HOTSPOT_RELEASE_VERSION)
!else
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
!endif !endif
# End VERSIONINFO parameters # End VERSIONINFO parameters
@ -280,15 +247,15 @@ $(variantDir)\local.make: checks
@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@
@ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK) >> $@ @ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK) >> $@
@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ @ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@
@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@ @ echo HS_NAME=$(PRODUCT_NAME) $(VERSION_SHORT) >> $@
@ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@ @ echo HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) >> $@
@ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@ @ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@
@ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@ @ echo SA_BUILD_VERSION=$(HOTSPOT_VERSION_STRING) >> $@
@ echo SA_INCLUDE=$(SA_INCLUDE) >> $@ @ echo SA_INCLUDE=$(SA_INCLUDE) >> $@
@ echo SA_LIB=$(SA_LIB) >> $@ @ echo SA_LIB=$(SA_LIB) >> $@
@ echo JDK_VER=$(JDK_VER) >> $@ @ echo JDK_VER=$(JDK_VER) >> $@
@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ @ echo JDK_DOTVER=$(JDK_DOTVER) >> $@
@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@ @ echo VERSION_STRING=$(VERSION_STRING) >> $@
@ echo BUILDARCH=$(BUILDARCH) >> $@ @ echo BUILDARCH=$(BUILDARCH) >> $@
@ echo Platform_arch=$(Platform_arch) >> $@ @ echo Platform_arch=$(Platform_arch) >> $@
@ echo Platform_arch_model=$(Platform_arch_model) >> $@ @ echo Platform_arch_model=$(Platform_arch_model) >> $@

View File

@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
# Generic compiler settings # Generic compiler settings
@ -167,7 +167,7 @@ LD_FLAGS= $(LD_FLAGS) /map /debug
!endif !endif
!if $(MSC_VER) >= 1600 !if $(MSC_VER) >= 1600
LD_FLAGS= $(LD_FLAGS) psapi.lib LD_FLAGS= $(LD_FLAGS) psapi.lib
!endif !endif
@ -191,4 +191,3 @@ RC_FLAGS=/D "HS_VER=$(HS_VER)" \
!if "$(MFC_DEBUG)" == "true" !if "$(MFC_DEBUG)" == "true"
RC_FLAGS = $(RC_FLAGS) /D "_DEBUG" RC_FLAGS = $(RC_FLAGS) /D "_DEBUG"
!endif !endif

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
HS_INTERNAL_NAME=jvm HS_INTERNAL_NAME=jvm
@ -44,7 +44,7 @@ CXX_FLAGS=$(CXX_FLAGS) $(DEBUG_OPT_OPTION) /D "_NMT_NOINLINE_"
!include $(WorkSpace)/make/windows/makefiles/vm.make !include $(WorkSpace)/make/windows/makefiles/vm.make
!include local.make !include local.make
HS_BUILD_ID=$(HS_BUILD_VER)-debug HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-debug
# Force resources to be rebuilt every time # Force resources to be rebuilt every time
$(Res_Files): FORCE $(Res_Files): FORCE

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -177,24 +177,19 @@ JDK_INCLUDE_SUBDIR=win32
# Library suffix # Library suffix
LIBRARY_SUFFIX=dll LIBRARY_SUFFIX=dll
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
# and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
# next parameters are defined in $(GAMMADIR)/make/defs.make. # next parameters are defined in $(GAMMADIR)/make/defs.make.
MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) MAKE_ARGS += VERSION_SHORT=$(VERSION_SHORT)
MAKE_ARGS += JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) MAKE_ARGS += VERSION_MAJOR=$(VERSION_MAJOR)
MAKE_ARGS += JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) MAKE_ARGS += VERSION_MINOR=$(VERSION_MINOR)
MAKE_ARGS += JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) MAKE_ARGS += VERSION_SECURITY=$(VERSION_SECURITY)
MAKE_ARGS += VERSION_PATCH=$(VERSION_PATCH)
MAKE_ARGS += VERSION_BUILD=$(VERSION_BUILD)
MAKE_ARGS += DEBUG_LEVEL=$(DEBUG_LEVEL)
ifdef COOKED_JDK_UPDATE_VERSION # JDK_DOTVER and JDK_VER are needed in Windows RC files
MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION) COMMA:=,
endif MAKE_ARGS += JDK_DOTVER=$(VERSION_NUMBER_FOUR_POSITIONS)
MAKE_ARGS += JDK_VER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))
# COOKED_BUILD_NUMBER should only be set if we have a numeric
# build number. It must not be zero padded.
ifdef COOKED_BUILD_NUMBER
MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
endif
NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO
ifndef SYSTEM_UNAME ifndef SYSTEM_UNAME

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
HS_INTERNAL_NAME=jvm HS_INTERNAL_NAME=jvm
@ -43,7 +43,7 @@ CXX_FLAGS=$(CXX_FLAGS) $(FASTDEBUG_OPT_OPTION)
!include $(WorkSpace)/make/windows/makefiles/vm.make !include $(WorkSpace)/make/windows/makefiles/vm.make
!include local.make !include local.make
HS_BUILD_ID=$(HS_BUILD_VER)-fastdebug HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-fastdebug
# Force resources to be rebuilt every time # Force resources to be rebuilt every time
$(Res_Files): FORCE $(Res_Files): FORCE

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
HS_INTERNAL_NAME=jvm HS_INTERNAL_NAME=jvm
@ -46,7 +46,7 @@ RC_FLAGS=$(RC_FLAGS) /D "NDEBUG"
!include $(WorkSpace)/make/windows/makefiles/vm.make !include $(WorkSpace)/make/windows/makefiles/vm.make
!include local.make !include local.make
HS_BUILD_ID=$(HS_BUILD_VER) HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)
# Force resources to be rebuilt every time # Force resources to be rebuilt every time
$(Res_Files): FORCE $(Res_Files): FORCE

View File

@ -58,12 +58,14 @@ HOTSPOT_LIB_ARCH=$(BUILDARCH)
!endif !endif
# The following variables are defined in the generated local.make file. # The following variables are defined in the generated local.make file.
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VERSION_STRING=\"$(HOTSPOT_VERSION_STRING)\""
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\"" CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MAJOR=$(VERSION_MAJOR)"
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\"" CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MINOR=$(VERSION_MINOR)"
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MICRO_VERSION=\"$(JDK_MICRO_VERSION)\"" CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_SECURITY=$(VERSION_SECURITY)"
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_BUILD_NUMBER=\"$(JDK_BUILD_NUMBER)\"" CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_PATCH=$(VERSION_PATCH)"
CXX_FLAGS=$(CXX_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\"" CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_BUILD=$(VERSION_BUILD)"
CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_STRING=\"$(VERSION_STRING)\""
CXX_FLAGS=$(CXX_FLAGS) /D "DEBUG_LEVEL=\"$(DEBUG_LEVEL)\""
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
@ -414,4 +416,3 @@ BUILD_VM_DEF_FLAG=-nosa
vm.def: $(Obj_Files) vm.def: $(Obj_Files)
sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG) sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG)

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
# #
!ifdef LOCAL_MAKE !ifdef LOCAL_MAKE
@ -80,15 +80,15 @@ default:: $(AdditionalTargets) $(JvmtiGeneratedFiles) $(TraceGeneratedFiles)
!include $(HOTSPOTWORKSPACE)/make/jdk_version !include $(HOTSPOTWORKSPACE)/make/jdk_version
!if "$(USER_RELEASE_SUFFIX)" != "" !if "$(VERSION_OPT)" != ""
HOTSPOT_BUILD_VERSION = internal-$(USER_RELEASE_SUFFIX) HOTSPOT_BUILD_VERSION = internal-$(VERSION_OPT)
!else !else
HOTSPOT_BUILD_VERSION = internal HOTSPOT_BUILD_VERSION = internal
!endif !endif
!if "$(JRE_RELEASE_VERSION)" != "" !if "$(VERSION_STRING)" != ""
JRE_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\"" JRE_RELEASE_VERSION="\\\"$(VERSION_STRING)\\\""
!else !else
JRE_RELEASE_VERSION="\\\"$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)\\\"" JRE_RELEASE_VERSION="\\\"$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER)\\\""
!endif !endif
!if "$(HOTSPOT_RELEASE_VERSION)" != "" !if "$(HOTSPOT_RELEASE_VERSION)" != ""
HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\"" HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
@ -105,18 +105,17 @@ HOTSPOT_VM_DISTRO="\\\"Java HotSpot(TM)\\\""
!else !else
HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\"" HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\""
!endif !endif
!if "$(JDK_BUILD_NUMBER)" != "" !if "$(VERSION_BUILD)" == ""
JDK_BUILD_NUMBER="\\\"$(JDK_BUILD_NUMBER)\\\"" VERSION_BUILD=0
!else
JDK_BUILD_NUMBER="\\\"00\\\""
!endif !endif
!endif !endif
JDK_MAJOR_VERSION="\\\"$(JDK_MAJOR_VER)\\\"" VERSION_MAJOR=$(STANDALONE_JDK_MAJOR_VER)
JDK_MINOR_VERSION="\\\"$(JDK_MINOR_VER)\\\"" VERSION_MINOR=$(STANDALONE_JDK_MINOR_VER)
JDK_MICRO_VERSION="\\\"$(JDK_MICRO_VER)\\\"" VERSION_SECURITY=$(STANDALONE_JDK_SECURITY_VER)
VERSION_PATCH=$(STANDALONE_JDK_PATCH_VER)
ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) -define VISUAL_STUDIO_BUILD=true ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define VERSION_MAJOR=$(VERSION_MAJOR) -define VERSION_MINOR=$(VERSION_MINOR) -define VERSION_SECURITY=$(VERSION_SECURITY) -define VERSION_PATCH=$(VERSION_PATCH) -define DEBUG_LEVEL=$(DEBUG_LEVEL) -define VISUAL_STUDIO_BUILD=true
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions) ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class $(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class

View File

@ -155,7 +155,7 @@ static const char* get_jimage_version_string() {
static char version_string[10] = ""; static char version_string[10] = "";
if (version_string[0] == '\0') { if (version_string[0] == '\0') {
jio_snprintf(version_string, sizeof(version_string), "%d.%d", jio_snprintf(version_string, sizeof(version_string), "%d.%d",
Abstract_VM_Version::vm_minor_version(), Abstract_VM_Version::vm_micro_version()); Abstract_VM_Version::vm_major_version(), Abstract_VM_Version::vm_minor_version());
} }
return (const char*)version_string; return (const char*)version_string;
} }

View File

@ -354,37 +354,6 @@ void Universe::genesis(TRAPS) {
// Have already been initialized. // Have already been initialized.
_objectArrayKlassObj->append_to_sibling_list(); _objectArrayKlassObj->append_to_sibling_list();
// Compute is_jdk version flags.
// Only 1.3 or later has the java.lang.Shutdown class.
// Only 1.4 or later has the java.lang.CharSequence interface.
// Only 1.5 or later has the java.lang.management.MemoryUsage class.
if (JDK_Version::is_partially_initialized()) {
uint8_t jdk_version;
Klass* k = SystemDictionary::resolve_or_null(
vmSymbols::java_lang_management_MemoryUsage(), THREAD);
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
k = SystemDictionary::resolve_or_null(
vmSymbols::java_lang_CharSequence(), THREAD);
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
k = SystemDictionary::resolve_or_null(
vmSymbols::java_lang_Shutdown(), THREAD);
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
jdk_version = 2;
} else {
jdk_version = 3;
}
} else {
jdk_version = 4;
}
} else {
jdk_version = 5;
}
JDK_Version::fully_initialize(jdk_version);
}
#ifdef ASSERT #ifdef ASSERT
if (FullGCALot) { if (FullGCALot) {
// Allocate an array of dummy objects. // Allocate an array of dummy objects.

View File

@ -3652,8 +3652,7 @@ JVM_ENTRY(void, JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t i
memset(info, 0, info_size); memset(info, 0, info_size);
info->jvm_version = Abstract_VM_Version::jvm_version(); info->jvm_version = Abstract_VM_Version::jvm_version();
info->update_version = 0; /* 0 in HotSpot Express VM */ info->patch_version = Abstract_VM_Version::vm_patch_version();
info->special_update_version = 0; /* 0 in HotSpot Express VM */
// when we add a new capability in the jvm_version_info struct, we should also // when we add a new capability in the jvm_version_info struct, we should also
// consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat

View File

@ -1184,10 +1184,9 @@ JVM_GetEnclosingMethodInfo(JNIEnv* env, jclass ofClass);
* ========================================================================== * ==========================================================================
*/ */
typedef struct { typedef struct {
/* VM version string: follows the JDK release version naming convention */ unsigned int jvm_version; /* Encoded $VNUM as defined by JEP-223 */
unsigned int jvm_version; /* <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] */ unsigned int patch_version : 8; /* JEP-223 patch version */
unsigned int update_version : 8; unsigned int reserved3 : 8;
unsigned int special_update_version : 8;
unsigned int reserved1 : 16; unsigned int reserved1 : 16;
unsigned int reserved2; unsigned int reserved2;
@ -1206,18 +1205,16 @@ typedef struct {
#define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24) #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
#define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16) #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
#define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8) #define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
#define JVM_VERSION_BUILD(version) ((version & 0x000000FF)) #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size); JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
typedef struct { typedef struct {
// Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx unsigned int jdk_version; /* Encoded $VNUM as defined by JEP-223 */
unsigned int jdk_version; /* Consists of major, minor, micro (n.n.n) */ unsigned int patch_version : 8; /* JEP-223 patch version */
/* and build number (xx) */ unsigned int reserved3 : 8;
unsigned int update_version : 8; /* Update release version (uu) */
unsigned int special_update_version : 8; /* Special update release version (c)*/
unsigned int reserved1 : 16; unsigned int reserved1 : 16;
unsigned int reserved2; unsigned int reserved2;
@ -1238,11 +1235,7 @@ typedef struct {
#define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24) #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
#define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16) #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
#define JDK_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8) #define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to bNN)
* It will be zero for internal builds.
*/
#define JDK_VERSION_BUILD(version) ((version & 0x000000FF)) #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
/* /*

View File

@ -197,6 +197,7 @@ void Arguments::init_system_properties() {
PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
PropertyList_add(&_system_properties, new SystemProperty("jdk.debug", VM_Version::jdk_debug_level(), false));
// Following are JVMTI agent writable properties. // Following are JVMTI agent writable properties.
// Properties values are set to NULL and they are // Properties values are set to NULL and they are
@ -228,7 +229,7 @@ void Arguments::init_version_specific_system_properties() {
const char* spec_vendor = "Oracle Corporation"; const char* spec_vendor = "Oracle Corporation";
uint32_t spec_version = JDK_Version::current().major_version(); uint32_t spec_version = JDK_Version::current().major_version();
jio_snprintf(buffer, bufsz, "1." UINT32_FORMAT, spec_version); jio_snprintf(buffer, bufsz, UINT32_FORMAT, spec_version);
PropertyList_add(&_system_properties, PropertyList_add(&_system_properties,
new SystemProperty("java.vm.specification.vendor", spec_vendor, false)); new SystemProperty("java.vm.specification.vendor", spec_vendor, false));

View File

@ -651,47 +651,23 @@ void JDK_Version::initialize() {
jdk_version_info_fn_t func = CAST_TO_FN_PTR(jdk_version_info_fn_t, jdk_version_info_fn_t func = CAST_TO_FN_PTR(jdk_version_info_fn_t,
os::dll_lookup(lib_handle, "JDK_GetVersionInfo0")); os::dll_lookup(lib_handle, "JDK_GetVersionInfo0"));
if (func == NULL) { assert(func != NULL, "Support for JDK 1.5 or older has been removed after JEP-223");
// JDK older than 1.6
_current._partially_initialized = true;
} else {
(*func)(&info, sizeof(info));
int major = JDK_VERSION_MAJOR(info.jdk_version); (*func)(&info, sizeof(info));
int minor = JDK_VERSION_MINOR(info.jdk_version);
int micro = JDK_VERSION_MICRO(info.jdk_version);
int build = JDK_VERSION_BUILD(info.jdk_version);
if (major == 1 && minor > 4) {
// We represent "1.5.0" as "5.0", but 1.4.2 as itself.
major = minor;
minor = micro;
micro = 0;
}
// Incompatible with pre-4243978 JDK.
if (info.pending_list_uses_discovered_field == 0) {
vm_exit_during_initialization(
"Incompatible JDK is not using Reference.discovered field for pending list");
}
_current = JDK_Version(major, minor, micro, info.update_version,
info.special_update_version, build,
info.thread_park_blocker == 1,
info.post_vm_init_hook_enabled == 1);
}
}
void JDK_Version::fully_initialize( int major = JDK_VERSION_MAJOR(info.jdk_version);
uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) { int minor = JDK_VERSION_MINOR(info.jdk_version);
// This is only called when current is less than 1.6 and we've gotten int security = JDK_VERSION_SECURITY(info.jdk_version);
// far enough in the initialization to determine the exact version. int build = JDK_VERSION_BUILD(info.jdk_version);
assert(major < 6, "not needed for JDK version >= 6");
assert(is_partially_initialized(), "must not initialize"); // Incompatible with pre-4243978 JDK.
if (major < 5) { if (info.pending_list_uses_discovered_field == 0) {
// JDK verison sequence: 1.2.x, 1.3.x, 1.4.x, 5.0.x, 6.0.x, etc. vm_exit_during_initialization(
micro = minor; "Incompatible JDK is not using Reference.discovered field for pending list");
minor = major;
major = 1;
} }
_current = JDK_Version(major, minor, micro, update); _current = JDK_Version(major, minor, security, info.patch_version, build,
info.thread_park_blocker == 1,
info.post_vm_init_hook_enabled == 1);
} }
void JDK_Version_init() { void JDK_Version_init() {
@ -700,29 +676,18 @@ void JDK_Version_init() {
static int64_t encode_jdk_version(const JDK_Version& v) { static int64_t encode_jdk_version(const JDK_Version& v) {
return return
((int64_t)v.major_version() << (BitsPerByte * 5)) | ((int64_t)v.major_version() << (BitsPerByte * 4)) |
((int64_t)v.minor_version() << (BitsPerByte * 4)) | ((int64_t)v.minor_version() << (BitsPerByte * 3)) |
((int64_t)v.micro_version() << (BitsPerByte * 3)) | ((int64_t)v.security_version() << (BitsPerByte * 2)) |
((int64_t)v.update_version() << (BitsPerByte * 2)) | ((int64_t)v.patch_version() << (BitsPerByte * 1)) |
((int64_t)v.special_update_version() << (BitsPerByte * 1)) |
((int64_t)v.build_number() << (BitsPerByte * 0)); ((int64_t)v.build_number() << (BitsPerByte * 0));
} }
int JDK_Version::compare(const JDK_Version& other) const { int JDK_Version::compare(const JDK_Version& other) const {
assert(is_valid() && other.is_valid(), "Invalid version (uninitialized?)"); assert(is_valid() && other.is_valid(), "Invalid version (uninitialized?)");
if (!is_partially_initialized() && other.is_partially_initialized()) { uint64_t e = encode_jdk_version(*this);
return -(other.compare(*this)); // flip the comparators uint64_t o = encode_jdk_version(other);
} return (e > o) ? 1 : ((e == o) ? 0 : -1);
assert(!other.is_partially_initialized(), "Not initialized yet");
if (is_partially_initialized()) {
assert(other.major_version() >= 6,
"Invalid JDK version comparison during initialization");
return -1;
} else {
uint64_t e = encode_jdk_version(*this);
uint64_t o = encode_jdk_version(other);
return (e > o) ? 1 : ((e == o) ? 0 : -1);
}
} }
void JDK_Version::to_string(char* buffer, size_t buflen) const { void JDK_Version::to_string(char* buffer, size_t buflen) const {
@ -731,28 +696,21 @@ void JDK_Version::to_string(char* buffer, size_t buflen) const {
if (!is_valid()) { if (!is_valid()) {
jio_snprintf(buffer, buflen, "%s", "(uninitialized)"); jio_snprintf(buffer, buflen, "%s", "(uninitialized)");
} else if (is_partially_initialized()) {
jio_snprintf(buffer, buflen, "%s", "(uninitialized) pre-1.6.0");
} else { } else {
int rc = jio_snprintf( int rc = jio_snprintf(
&buffer[index], buflen - index, "%d.%d", _major, _minor); &buffer[index], buflen - index, "%d.%d", _major, _minor);
if (rc == -1) return; if (rc == -1) return;
index += rc; index += rc;
if (_micro > 0) { if (_security > 0) {
rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _micro); rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
} }
if (_update > 0) { if (_patch > 0) {
rc = jio_snprintf(&buffer[index], buflen - index, "_%02d", _update); rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _patch);
if (rc == -1) return;
index += rc;
}
if (_special > 0) {
rc = jio_snprintf(&buffer[index], buflen - index, "%c", _special);
if (rc == -1) return; if (rc == -1) return;
index += rc; index += rc;
} }
if (_build > 0) { if (_build > 0) {
rc = jio_snprintf(&buffer[index], buflen - index, "-b%02d", _build); rc = jio_snprintf(&buffer[index], buflen - index, "+%d", _build);
if (rc == -1) return; if (rc == -1) return;
index += rc; index += rc;
} }

View File

@ -51,18 +51,9 @@ extern void vm_exit_during_initialization(const char* error, const char* message
extern void vm_shutdown_during_initialization(const char* error, const char* message = NULL); extern void vm_shutdown_during_initialization(const char* error, const char* message = NULL);
/** /**
* Discovering the JDK_Version during initialization is tricky when the * With the integration of the changes to handle the version string
* running JDK is less than JDK6. For JDK6 and greater, a "GetVersion" * as defined by JEP-223, most of the code related to handle the version
* function exists in libjava.so and we simply call it during the * string prior to JDK 1.6 was removed (partial initialization)
* 'initialize()' call to find the version. For JDKs with version < 6, no
* such call exists and we have to probe the JDK in order to determine
* the exact version. This probing cannot happen during late in
* the VM initialization process so there's a period of time during
* initialization when we don't know anything about the JDK version other than
* that it less than version 6. This is the "partially initialized" time,
* when we can answer only certain version queries (such as, is the JDK
* version greater than 5? Answer: no). Once the JDK probing occurs, we
* know the version and are considered fully initialized.
*/ */
class JDK_Version VALUE_OBJ_CLASS_SPEC { class JDK_Version VALUE_OBJ_CLASS_SPEC {
friend class VMStructs; friend class VMStructs;
@ -74,53 +65,32 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
static const char* _runtime_name; static const char* _runtime_name;
static const char* _runtime_version; static const char* _runtime_version;
// In this class, we promote the minor version of release to be the
// major version for releases >= 5 in anticipation of the JDK doing the
// same thing. For example, we represent "1.5.0" as major version 5 (we
// drop the leading 1 and use 5 as the 'major').
uint8_t _major; uint8_t _major;
uint8_t _minor; uint8_t _minor;
uint8_t _micro; uint8_t _security;
uint8_t _update; uint8_t _patch;
uint8_t _special;
uint8_t _build; uint8_t _build;
// If partially initialized, the above fields are invalid and we know
// that we're less than major version 6.
bool _partially_initialized;
bool _thread_park_blocker; bool _thread_park_blocker;
bool _post_vm_init_hook_enabled; bool _post_vm_init_hook_enabled;
bool is_valid() const { bool is_valid() const {
return (_major != 0 || _partially_initialized); return (_major != 0);
} }
// initializes or partially initializes the _current static field // initializes or partially initializes the _current static field
static void initialize(); static void initialize();
// Completes initialization for a pre-JDK6 version.
static void fully_initialize(uint8_t major, uint8_t minor = 0,
uint8_t micro = 0, uint8_t update = 0);
public: public:
// Returns true if the the current version has only been partially initialized JDK_Version() : _major(0), _minor(0), _security(0), _patch(0), _build(0),
static bool is_partially_initialized() {
return _current._partially_initialized;
}
JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
_special(0), _build(0), _partially_initialized(false),
_thread_park_blocker(false), _post_vm_init_hook_enabled(false) _thread_park_blocker(false), _post_vm_init_hook_enabled(false)
{} {}
JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0, JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t security = 0,
uint8_t update = 0, uint8_t special = 0, uint8_t build = 0, uint8_t patch = 0, uint8_t build = 0,
bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) : bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) :
_major(major), _minor(minor), _micro(micro), _update(update), _major(major), _minor(minor), _security(security), _patch(patch), _build(build),
_special(special), _build(build), _partially_initialized(false),
_thread_park_blocker(thread_park_blocker), _thread_park_blocker(thread_park_blocker),
_post_vm_init_hook_enabled(post_vm_init_hook_enabled) _post_vm_init_hook_enabled(post_vm_init_hook_enabled)
{} {}
@ -133,23 +103,18 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
return JDK_Version(m); return JDK_Version(m);
} }
static JDK_Version jdk_update(uint8_t major, uint8_t update_number) {
return JDK_Version(major, 0, 0, update_number);
}
static JDK_Version undefined() { static JDK_Version undefined() {
return JDK_Version(0); return JDK_Version(0);
} }
bool is_undefined() const { bool is_undefined() const {
return (_major == 0); return _major == 0;
} }
uint8_t major_version() const { return _major; } uint8_t major_version() const { return _major; }
uint8_t minor_version() const { return _minor; } uint8_t minor_version() const { return _minor; }
uint8_t micro_version() const { return _micro; } uint8_t security_version() const { return _security; }
uint8_t update_version() const { return _update; } uint8_t patch_version() const { return _patch; }
uint8_t special_update_version() const { return _special; }
uint8_t build_number() const { return _build; } uint8_t build_number() const { return _build; }
bool supports_thread_park_blocker() const { bool supports_thread_park_blocker() const {
@ -159,7 +124,7 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
return _post_vm_init_hook_enabled; return _post_vm_init_hook_enabled;
} }
// Performs a full ordering comparison using all fields (update, build, etc.) // Performs a full ordering comparison using all fields (patch, build, etc.)
int compare(const JDK_Version& other) const; int compare(const JDK_Version& other) const;
/** /**
@ -168,16 +133,7 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
* equal, and a positive value if it is greater. * equal, and a positive value if it is greater.
*/ */
int compare_major(int version) const { int compare_major(int version) const {
if (_partially_initialized) {
if (version >= 6) {
return -1;
} else {
assert(false, "Can't make this comparison during init time");
return -1; // conservative
}
} else {
return major_version() - version; return major_version() - version;
}
} }
void to_string(char* buffer, size_t buflen) const; void to_string(char* buffer, size_t buflen) const;

View File

@ -223,6 +223,7 @@ static const char* property_counters_ss[] = {
"java.vm.name", "java.vm.name",
"java.vm.vendor", "java.vm.vendor",
"java.vm.info", "java.vm.info",
"jdk.debug",
"java.library.path", "java.library.path",
"java.class.path", "java.class.path",
"java.version", "java.version",

View File

@ -1313,12 +1313,11 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \ static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \
static_field(Abstract_VM_Version, _vm_major_version, int) \ static_field(Abstract_VM_Version, _vm_major_version, int) \
static_field(Abstract_VM_Version, _vm_minor_version, int) \ static_field(Abstract_VM_Version, _vm_minor_version, int) \
static_field(Abstract_VM_Version, _vm_micro_version, int) \ static_field(Abstract_VM_Version, _vm_security_version, int) \
static_field(Abstract_VM_Version, _vm_build_number, int) \ static_field(Abstract_VM_Version, _vm_build_number, int) \
static_field(Abstract_VM_Version, _reserve_for_allocation_prefetch, int) \ static_field(Abstract_VM_Version, _reserve_for_allocation_prefetch, int) \
\ \
static_field(JDK_Version, _current, JDK_Version) \ static_field(JDK_Version, _current, JDK_Version) \
nonstatic_field(JDK_Version, _partially_initialized, bool) \
nonstatic_field(JDK_Version, _major, unsigned char) \ nonstatic_field(JDK_Version, _major, unsigned char) \
\ \
/*************************/ \ /*************************/ \

View File

@ -40,79 +40,55 @@ unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0; unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0; int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
#ifndef HOTSPOT_RELEASE_VERSION #ifndef HOTSPOT_VERSION_STRING
#error HOTSPOT_RELEASE_VERSION must be defined #error HOTSPOT_VERSION_STRING must be defined
#endif #endif
#ifndef JDK_MAJOR_VERSION #ifndef VERSION_MAJOR
#error JDK_MAJOR_VERSION must be defined #error VERSION_MAJOR must be defined
#endif #endif
#ifndef JDK_MINOR_VERSION #ifndef VERSION_MINOR
#error JDK_MINOR_VERSION must be defined #error VERSION_MINOR must be defined
#endif #endif
#ifndef JDK_MICRO_VERSION #ifndef VERSION_SECURITY
#error JDK_MICRO_VERSION must be defined #error VERSION_SECURITY must be defined
#endif #endif
#ifndef JDK_BUILD_NUMBER #ifndef VERSION_PATCH
#error JDK_BUILD_NUMBER must be defined #error VERSION_PATCH must be defined
#endif
#ifndef VERSION_BUILD
#error VERSION_BUILD must be defined
#endif #endif
#ifndef JRE_RELEASE_VERSION #ifndef VERSION_STRING
#error JRE_RELEASE_VERSION must be defined #error VERSION_STRING must be defined
#endif
#ifndef DEBUG_LEVEL
#error DEBUG_LEVEL must be defined
#endif #endif
// NOTE: Builds within Visual Studio do not define the build target in // NOTE: Builds within Visual Studio do not define the build target in
// HOTSPOT_RELEASE_VERSION, so it must be done here // HOTSPOT_VERSION_STRING, so it must be done here
#if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT) #if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT)
#ifndef HOTSPOT_BUILD_TARGET #ifndef HOTSPOT_BUILD_TARGET
#error HOTSPOT_BUILD_TARGET must be defined #error HOTSPOT_BUILD_TARGET must be defined
#endif #endif
#define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET #define VM_RELEASE HOTSPOT_VERSION_STRING "-" HOTSPOT_BUILD_TARGET
#else #else
#define VM_RELEASE HOTSPOT_RELEASE_VERSION #define VM_RELEASE HOTSPOT_VERSION_STRING
#endif #endif
// HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention // HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden
// <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] // in a standalone build).
int Abstract_VM_Version::_vm_major_version = 0; int Abstract_VM_Version::_vm_major_version = VERSION_MAJOR;
int Abstract_VM_Version::_vm_minor_version = 0; int Abstract_VM_Version::_vm_minor_version = VERSION_MINOR;
int Abstract_VM_Version::_vm_micro_version = 0; int Abstract_VM_Version::_vm_security_version = VERSION_SECURITY;
int Abstract_VM_Version::_vm_build_number = 0; int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH;
bool Abstract_VM_Version::_initialized = false; int Abstract_VM_Version::_vm_build_number = VERSION_BUILD;
unsigned int Abstract_VM_Version::_parallel_worker_threads = 0; unsigned int Abstract_VM_Version::_parallel_worker_threads = 0;
bool Abstract_VM_Version::_parallel_worker_threads_initialized = false; bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
#ifdef ASSERT
static void assert_digits(const char * s, const char * message) {
for (int i = 0; s[i] != '\0'; i++) {
assert(isdigit(s[i]), "%s", message);
}
}
#endif
static void set_version_field(int * version_field, const char * version_str,
const char * const assert_msg) {
if (version_str != NULL && *version_str != '\0') {
DEBUG_ONLY(assert_digits(version_str, assert_msg));
*version_field = atoi(version_str);
}
}
void Abstract_VM_Version::initialize() {
if (_initialized) {
return;
}
set_version_field(&_vm_major_version, JDK_MAJOR_VERSION, "bad major version");
set_version_field(&_vm_minor_version, JDK_MINOR_VERSION, "bad minor version");
set_version_field(&_vm_micro_version, JDK_MICRO_VERSION, "bad micro version");
int offset = (JDK_BUILD_NUMBER != NULL && JDK_BUILD_NUMBER[0] == 'b') ? 1 : 0;
set_version_field(&_vm_build_number, &JDK_BUILD_NUMBER[offset],
"bad build number");
_initialized = true;
}
#if defined(_LP64) #if defined(_LP64)
#define VMLP "64-Bit " #define VMLP "64-Bit "
#else #else
@ -154,6 +130,7 @@ const char* Abstract_VM_Version::vm_vendor() {
#endif #endif
} }
const char* Abstract_VM_Version::vm_info_string() { const char* Abstract_VM_Version::vm_info_string() {
if (CodeCacheExtensions::use_pregenerated_interpreter()) { if (CodeCacheExtensions::use_pregenerated_interpreter()) {
return "interpreted mode, pregenerated"; return "interpreted mode, pregenerated";
@ -181,7 +158,7 @@ const char* Abstract_VM_Version::vm_release() {
// fatal error handlers. if the crash is in native thread, // fatal error handlers. if the crash is in native thread,
// stringStream cannot get resource allocated and will SEGV. // stringStream cannot get resource allocated and will SEGV.
const char* Abstract_VM_Version::jre_release_version() { const char* Abstract_VM_Version::jre_release_version() {
return JRE_RELEASE_VERSION; return VERSION_STRING;
} }
#define OS LINUX_ONLY("linux") \ #define OS LINUX_ONLY("linux") \
@ -262,7 +239,7 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#endif #endif
return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR
" JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__ " JRE (" VERSION_STRING "), built on " __DATE__ " " __TIME__
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER; " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
} }
@ -270,10 +247,14 @@ const char *Abstract_VM_Version::vm_build_user() {
return HOTSPOT_BUILD_USER; return HOTSPOT_BUILD_USER;
} }
const char *Abstract_VM_Version::jdk_debug_level() {
return DEBUG_LEVEL;
}
unsigned int Abstract_VM_Version::jvm_version() { unsigned int Abstract_VM_Version::jvm_version() {
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) | return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) | ((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
((Abstract_VM_Version::vm_micro_version() & 0xFF) << 8) | ((Abstract_VM_Version::vm_security_version() & 0xFF) << 8) |
(Abstract_VM_Version::vm_build_number() & 0xFF); (Abstract_VM_Version::vm_build_number() & 0xFF);
} }

View File

@ -45,9 +45,9 @@ class Abstract_VM_Version: AllStatic {
static unsigned int _L1_data_cache_line_size; static unsigned int _L1_data_cache_line_size;
static int _vm_major_version; static int _vm_major_version;
static int _vm_minor_version; static int _vm_minor_version;
static int _vm_micro_version; static int _vm_security_version;
static int _vm_patch_version;
static int _vm_build_number; static int _vm_build_number;
static bool _initialized;
static unsigned int _parallel_worker_threads; static unsigned int _parallel_worker_threads;
static bool _parallel_worker_threads_initialized; static bool _parallel_worker_threads_initialized;
static int _reserve_for_allocation_prefetch; static int _reserve_for_allocation_prefetch;
@ -75,10 +75,11 @@ class Abstract_VM_Version: AllStatic {
static const char* vm_platform_string(); static const char* vm_platform_string();
static const char* vm_build_user(); static const char* vm_build_user();
static int vm_major_version() { assert(_initialized, "not initialized"); return _vm_major_version; } static int vm_major_version() { return _vm_major_version; }
static int vm_minor_version() { assert(_initialized, "not initialized"); return _vm_minor_version; } static int vm_minor_version() { return _vm_minor_version; }
static int vm_micro_version() { assert(_initialized, "not initialized"); return _vm_micro_version; } static int vm_security_version() { return _vm_security_version; }
static int vm_build_number() { assert(_initialized, "not initialized"); return _vm_build_number; } static int vm_patch_version() { return _vm_patch_version; }
static int vm_build_number() { return _vm_build_number; }
// Gets the jvm_version_info.jvm_version defined in jvm.h // Gets the jvm_version_info.jvm_version defined in jvm.h
static unsigned int jvm_version(); static unsigned int jvm_version();
@ -86,6 +87,7 @@ class Abstract_VM_Version: AllStatic {
// Internal version providing additional build information // Internal version providing additional build information
static const char* internal_vm_info_string(); static const char* internal_vm_info_string();
static const char* jre_release_version(); static const char* jre_release_version();
static const char* jdk_debug_level();
// does HW support an 8-byte compare-exchange operation? // does HW support an 8-byte compare-exchange operation?
static bool supports_cx8() { static bool supports_cx8() {

View File

@ -179,12 +179,13 @@ void VersionDCmd::execute(DCmdSource source, TRAPS) {
output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(), output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(),
Abstract_VM_Version::vm_release()); Abstract_VM_Version::vm_release());
JDK_Version jdk_version = JDK_Version::current(); JDK_Version jdk_version = JDK_Version::current();
if (jdk_version.update_version() > 0) { if (jdk_version.patch_version() > 0) {
output()->print_cr("JDK %d.%d_%02d", jdk_version.major_version(), output()->print_cr("JDK %d.%d.%d.%d", jdk_version.major_version(),
jdk_version.minor_version(), jdk_version.update_version()); jdk_version.minor_version(), jdk_version.security_version(),
jdk_version.patch_version());
} else { } else {
output()->print_cr("JDK %d.%d", jdk_version.major_version(), output()->print_cr("JDK %d.%d.%d", jdk_version.major_version(),
jdk_version.minor_version()); jdk_version.minor_version(), jdk_version.security_version());
} }
} }

View File

@ -84,10 +84,6 @@ void management_init() {
ClassLoadingService::init(); ClassLoadingService::init();
#else #else
ThreadService::init(); ThreadService::init();
// Make sure the VM version is initialized
// This is normally called by RuntimeService::init().
// Since that is conditionalized out, we need to call it here.
Abstract_VM_Version::initialize();
#endif // INCLUDE_MANAGEMENT #endif // INCLUDE_MANAGEMENT
} }

View File

@ -42,8 +42,6 @@ PerfCounter* RuntimeService::_application_time_ticks = NULL;
double RuntimeService::_last_safepoint_sync_time_sec = 0.0; double RuntimeService::_last_safepoint_sync_time_sec = 0.0;
void RuntimeService::init() { void RuntimeService::init() {
// Make sure the VM version is initialized
Abstract_VM_Version::initialize();
if (UsePerfData) { if (UsePerfData) {
EXCEPTION_MARK; EXCEPTION_MARK;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,12 +38,13 @@ public class Test6981737 {
*/ */
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String version = verifyProperty("java.version", "[0-9]+\\.[0-9]+\\..*"); String version = verifyProperty("java.version", "[0-9]+[\\\\.[0-9]+]*\\-.*");
String major_version_spec = version.split("\\.")[1]; String version_tokens[] = version.split("-|\\.");
String major_version_spec = version_tokens[0];
int major_version = new Integer(major_version_spec).intValue(); int major_version = new Integer(major_version_spec).intValue();
String vendor_re = "Oracle Corporation"; String vendor_re = "Oracle Corporation";
String vm_spec_version_re = "1\\." + major_version_spec; String vm_spec_version_re = major_version_spec;
if (major_version < 7) { if (major_version < 7) {
vendor_re = "Sun Microsystems Inc\\."; vendor_re = "Sun Microsystems Inc\\.";
vm_spec_version_re = "1\\.0"; vm_spec_version_re = "1\\.0";

View File

@ -29,7 +29,7 @@ public class Platform {
private static final String osName = System.getProperty("os.name"); private static final String osName = System.getProperty("os.name");
private static final String dataModel = System.getProperty("sun.arch.data.model"); private static final String dataModel = System.getProperty("sun.arch.data.model");
private static final String vmVersion = System.getProperty("java.vm.version"); private static final String vmVersion = System.getProperty("java.vm.version");
private static final String javaVersion = System.getProperty("java.version"); private static final String jdkDebug = System.getProperty("jdk.debug");
private static final String osArch = System.getProperty("os.arch"); private static final String osArch = System.getProperty("os.arch");
private static final String vmName = System.getProperty("java.vm.name"); private static final String vmName = System.getProperty("java.vm.name");
private static final String userName = System.getProperty("user.name"); private static final String userName = System.getProperty("user.name");
@ -100,8 +100,7 @@ public class Platform {
} }
public static boolean isDebugBuild() { public static boolean isDebugBuild() {
return (vmVersion.toLowerCase().contains("debug") || return (jdkDebug.toLowerCase().contains("debug"));
javaVersion.toLowerCase().contains("debug"));
} }
public static String getVMVersion() { public static String getVMVersion() {