This commit is contained in:
J. Duke 2017-07-05 21:39:55 +02:00
commit 9358700a2c
15 changed files with 248 additions and 74 deletions

View File

@ -359,3 +359,4 @@ f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
1d992540870ff33fe6cc550443388588df9b9e4f jdk-9+114 1d992540870ff33fe6cc550443388588df9b9e4f jdk-9+114
09617ce980b99d49abfd54dacfed353c47e2a115 jdk-9+115 09617ce980b99d49abfd54dacfed353c47e2a115 jdk-9+115
6743a8e0cab7b5f6f4a0575f6664892f0ab740af jdk-9+116 6743a8e0cab7b5f6f4a0575f6664892f0ab740af jdk-9+116
e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117

View File

@ -435,6 +435,9 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
elif test ! -x "$BUILD_JDK/bin/jlink"; then elif test ! -x "$BUILD_JDK/bin/jlink"; then
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring]) AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring])
BUILD_JDK_FOUND=no BUILD_JDK_FOUND=no
elif test ! -x "$BUILD_JDK/bin/jmod"; then
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring])
BUILD_JDK_FOUND=no
elif test ! -x "$BUILD_JDK/bin/javac"; then elif test ! -x "$BUILD_JDK/bin/javac"; then
# Do we have a bin/javac? # Do we have a bin/javac?
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring]) AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring])
@ -474,7 +477,8 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk], AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
[path to JDK of same version as is being built@<:@the newly built JDK@:>@])]) [path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
CREATE_BUILDJDK_FOR_HOST=false CREATE_BUILDJDK=false
EXTERNAL_BUILDJDK=false
BUILD_JDK_FOUND="no" BUILD_JDK_FOUND="no"
if test "x$with_build_jdk" != "x"; then if test "x$with_build_jdk" != "x"; then
BOOTJDK_CHECK_BUILD_JDK([ BOOTJDK_CHECK_BUILD_JDK([
@ -483,6 +487,7 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
BUILD_JDK_FOUND=maybe BUILD_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Build JDK using configure arguments]) AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
fi]) fi])
EXTERNAL_BUILDJDK=true
else else
if test "x$COMPILE_TYPE" = "xcross"; then if test "x$COMPILE_TYPE" = "xcross"; then
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk" BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
@ -498,6 +503,11 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
fi fi
fi fi
JMOD="$BUILD_JDK/bin/jmod"
JLINK="$BUILD_JDK/bin/jlink"
AC_SUBST(JMOD)
AC_SUBST(JLINK)
if test "x$BUILD_JDK_FOUND" != "xyes"; then if test "x$BUILD_JDK_FOUND" != "xyes"; then
AC_MSG_CHECKING([for Build JDK]) AC_MSG_CHECKING([for Build JDK])
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
@ -506,4 +516,5 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
AC_SUBST(CREATE_BUILDJDK) AC_SUBST(CREATE_BUILDJDK)
AC_SUBST(BUILD_JDK) AC_SUBST(BUILD_JDK)
AC_SUBST(EXTERNAL_BUILDJDK)
]) ])

View File

@ -46,6 +46,7 @@ HOTSPOT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPO
HOTSPOT_DIST := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_DIST)) HOTSPOT_DIST := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_DIST))
SUPPORT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(SUPPORT_OUTPUTDIR)) SUPPORT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(SUPPORT_OUTPUTDIR))
JDK_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(JDK_OUTPUTDIR)) JDK_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(JDK_OUTPUTDIR))
IMAGES_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(IMAGES_OUTPUTDIR))
OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@ OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@ OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@

View File

@ -896,8 +896,11 @@ JAXWS_TOPDIR
JAXP_TOPDIR JAXP_TOPDIR
CORBA_TOPDIR CORBA_TOPDIR
LANGTOOLS_TOPDIR LANGTOOLS_TOPDIR
EXTERNAL_BUILDJDK
BUILD_JDK BUILD_JDK
CREATE_BUILDJDK CREATE_BUILDJDK
JLINK
JMOD
BOOT_JDK_BITS BOOT_JDK_BITS
JAVAC_FLAGS JAVAC_FLAGS
BOOT_JDK_MODULAR BOOT_JDK_MODULAR
@ -5070,7 +5073,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1462204427 DATE_WHEN_GENERATED=1462806878
############################################################################### ###############################################################################
# #
@ -30171,7 +30174,8 @@ if test "${with_build_jdk+set}" = set; then :
fi fi
CREATE_BUILDJDK_FOR_HOST=false CREATE_BUILDJDK=false
EXTERNAL_BUILDJDK=false
BUILD_JDK_FOUND="no" BUILD_JDK_FOUND="no"
if test "x$with_build_jdk" != "x"; then if test "x$with_build_jdk" != "x"; then
@ -30196,6 +30200,10 @@ $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/ja
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;} $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
BUILD_JDK_FOUND=no BUILD_JDK_FOUND=no
elif test ! -x "$BUILD_JDK/bin/jmod"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
BUILD_JDK_FOUND=no
elif test ! -x "$BUILD_JDK/bin/javac"; then elif test ! -x "$BUILD_JDK/bin/javac"; then
# Do we have a bin/javac? # Do we have a bin/javac?
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
@ -30364,6 +30372,7 @@ $as_echo "$BUILD_JDK_VERSION" >&6; }
fi # end check build jdk found fi # end check build jdk found
fi fi
EXTERNAL_BUILDJDK=true
else else
if test "x$COMPILE_TYPE" = "xcross"; then if test "x$COMPILE_TYPE" = "xcross"; then
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk" BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
@ -30383,6 +30392,11 @@ $as_echo "yes, will use output dir" >&6; }
fi fi
fi fi
JMOD="$BUILD_JDK/bin/jmod"
JLINK="$BUILD_JDK/bin/jlink"
if test "x$BUILD_JDK_FOUND" != "xyes"; then if test "x$BUILD_JDK_FOUND" != "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
$as_echo_n "checking for Build JDK... " >&6; } $as_echo_n "checking for Build JDK... " >&6; }
@ -30395,6 +30409,7 @@ $as_echo "no" >&6; }
############################################################################### ###############################################################################
# #
# Configure the sources to use. We can add or override individual directories. # Configure the sources to use. We can add or override individual directories.

View File

@ -283,6 +283,7 @@ BOOT_JDK:=@BOOT_JDK@
BUILD_JDK:=@BUILD_JDK@ BUILD_JDK:=@BUILD_JDK@
CREATE_BUILDJDK:=@CREATE_BUILDJDK@ CREATE_BUILDJDK:=@CREATE_BUILDJDK@
EXTERNAL_BUILDJDK:=@EXTERNAL_BUILDJDK@
# When compiling Java source to be run by the boot jdk # When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6 # use these extra flags, eg -source 6 -target 6
@ -542,6 +543,8 @@ JAVA_CMD:=@JAVA@
JAVAC_CMD:=@JAVAC@ JAVAC_CMD:=@JAVAC@
JAVAH_CMD:=@JAVAH@ JAVAH_CMD:=@JAVAH@
JAR_CMD:=@JAR@ JAR_CMD:=@JAR@
JLINK_CMD := @JLINK@
JMOD_CMD := @JMOD@
JARSIGNER_CMD:=@JARSIGNER@ JARSIGNER_CMD:=@JARSIGNER@
SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@ SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
# These variables are meant to be used. They are defined with = instead of := to make # These variables are meant to be used. They are defined with = instead of := to make
@ -552,6 +555,8 @@ JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(JAVAC_CMD) JAVAC=@FIXPATH@ $(JAVAC_CMD)
JAVAH=@FIXPATH@ $(JAVAH_CMD) JAVAH=@FIXPATH@ $(JAVAH_CMD)
JAR=@FIXPATH@ $(JAR_CMD) JAR=@FIXPATH@ $(JAR_CMD)
JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD) JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
# A specific java binary with specific options can be used to run # A specific java binary with specific options can be used to run
# the long running background sjavac servers and other long running tasks. # the long running background sjavac servers and other long running tasks.
@ -569,14 +574,15 @@ BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
# Use ?= as this can be overridden from bootcycle-spec.gmk # Use ?= as this can be overridden from bootcycle-spec.gmk
BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@ BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@
INTERIM_OVERRIDE_MODULES := java.compiler jdk.compiler \
jdk.jdeps jdk.javadoc jdk.rmic
ifeq ($(BOOT_JDK_MODULAR), true) ifeq ($(BOOT_JDK_MODULAR), true)
INTERIM_OVERRIDE_MODULES_ARGS = -Xpatch:$(BUILDTOOLS_OUTPUTDIR)/override_modules INTERIM_OVERRIDE_MODULES_ARGS = $(foreach m, $(INTERIM_OVERRIDE_MODULES), \
-Xpatch:$m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m)
INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS) INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS)
JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main
JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main
else else
INTERIM_OVERRIDE_MODULES := java.compiler jdk.compiler \
jdk.jdeps jdk.javadoc jdk.rmic
INTERIM_OVERRIDE_MODULES_ARGS = \ INTERIM_OVERRIDE_MODULES_ARGS = \
-Xbootclasspath/p:$(call PathList, \ -Xbootclasspath/p:$(call PathList, \
$(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \ $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
@ -591,12 +597,8 @@ endif
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS) NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS) NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
# JLink/Jmod are run using the BUILD_JDK, which is normally the jdk output dir.
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@ JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
JLINK = @FIXPATH@ $(BUILD_JDK)/bin/jlink $(JAVA_TOOL_FLAGS_SMALL)
JMOD = @FIXPATH@ $(BUILD_JDK)/bin/jmod $(JAVA_TOOL_FLAGS_SMALL)
# Base flags for RC # Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple # Guarding this against resetting value. Legacy make files include spec multiple
# times. # times.
@ -776,6 +778,9 @@ TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
SYMBOLS_IMAGE_SUBDIR:=symbols SYMBOLS_IMAGE_SUBDIR:=symbols
SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR) SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
# Interim image
INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image
# Macosx bundles directory definitions # Macosx bundles directory definitions
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents

View File

@ -404,7 +404,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: { jtreg: {
server: "javare", server: "javare",
revision: "4.2", revision: "4.2",
build_number: "b01", build_number: "b02",
checksum_file: "MD5_VALUES", checksum_file: "MD5_VALUES",
file: "jtreg_bin-4.2.zip", file: "jtreg_bin-4.2.zip",
environment_name: "JT_HOME" environment_name: "JT_HOME"

View File

@ -99,7 +99,7 @@ java.datatransfer_COPY := flavormap.properties
################################################################################ ################################################################################
java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \ java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \
'-Xdoclint/package:java.*,javax.*' '-Xdoclint/package:java.*,javax.*' -Xlint:-deprecation
java.desktop_COPY := .gif .png .wav .txt .xml .css .pf java.desktop_COPY := .gif .png .wav .txt .xml .css .pf
java.desktop_CLEAN := iio-plugin.properties cursors.properties java.desktop_CLEAN := iio-plugin.properties cursors.properties

View File

@ -29,13 +29,15 @@ include $(SPEC)
include MakeBase.gmk include MakeBase.gmk
include Modules.gmk include Modules.gmk
MODULES_TO_COPY := $(call FindTransitiveDepsForModule, jdk.jlink) jdk.jlink MODULES_TO_COPY := $(sort \
$(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
$(call FindTransitiveDepsForModule, $m) $m))
################################################################################ ################################################################################
# Copy the modules needed to run jlink and jmod. Use bulk copy instead of # Copy the modules needed to run jlink and jmod. Use bulk copy instead of
# SetupCopyFiles since there are so many files. # SetupCopyFiles since there are so many files.
COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/_buildjdk-copy-maker COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/java.base/_the.buildjdk-copy-marker
$(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \ $(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY)))) $(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY))))
@ -49,15 +51,6 @@ $(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \
TARGETS += $(COPY_CLASSES_TARGET) TARGETS += $(COPY_CLASSES_TARGET)
#$(eval $(call SetupCopyFiles, COPY_JDK_MODULES, \
SRC := $(BUILD_OUTPUT), \
DEST := $(BUILDJDK_OUTPUTDIR), \
FILES := $(call DoubleDollar, $(call DoubleDollar, $(call CacheFind, $(wildcard \
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY)))))), \
))
#TARGETS += $(COPY_JDK_MODULES)
################################################################################ ################################################################################
$(eval $(call SetupCopyFiles, COPY_SUPPORT_HEADERS, \ $(eval $(call SetupCopyFiles, COPY_SUPPORT_HEADERS, \

View File

@ -1,4 +1,4 @@
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2014, 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.
# #
@ -35,6 +35,8 @@ endif
################################################################################ ################################################################################
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
LIBS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \ LIBS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
$(SUPPORT_OUTPUTDIR)/modules_libs-stripped $(IMPORT_MODULES_LIBS)))) $(SUPPORT_OUTPUTDIR)/modules_libs-stripped $(IMPORT_MODULES_LIBS))))
CMDS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \ CMDS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
@ -64,15 +66,35 @@ ifneq ($(CLASSES_DIR), )
DEPS += $(call CacheFind, $(CLASSES_DIR)) DEPS += $(call CacheFind, $(CLASSES_DIR))
endif endif
# Add dependencies on other jmod files # Add dependencies on other jmod files. Only java.base needs access to other
DEPS += $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, \ # jmods.
$(call FindDepsForModule, $(MODULE))) ifeq ($(MODULE), java.base)
# When creating a BUILDJDK, we don't need to add hashes to java.base
ifneq ($(CREATING_BUILDJDK), true)
DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \
$(filter-out java.base, $(call FindAllModules)))
# TODO: find modules that directly and indirectly depend on upgradeable
# modules
EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \
java.se.ee \
jdk.rmic \
jdk.xml.bind \
jdk.xml.ws \
#
EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES))))
JMOD_FLAGS += --modulepath $(JMODS_DIR) \
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
endif
endif
# TODO: What about headers? # TODO: What about headers?
# Create jmods in a temp dir and then move them into place to keep the # Create jmods in a temp dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
$(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS) $(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
$(call LogWarn, Creating $(notdir $@)) $(call LogWarn, Creating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods) $(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods)
$(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(JMOD) create \ $(JMOD) create \
@ -80,8 +102,7 @@ $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS)
--os-name $(REQUIRED_OS_NAME) \ --os-name $(REQUIRED_OS_NAME) \
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
--os-version $(REQUIRED_OS_VERSION) \ --os-version $(REQUIRED_OS_VERSION) \
--modulepath $(IMAGES_OUTPUTDIR)/jmods\ --modulepath $(JMODS_DIR) \
--hash-dependencies '.*' \
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \ --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@ $(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@

View File

@ -56,19 +56,11 @@ JRE_COMPACT1_MODULES := java.compact1 $(COMPACT1_EXTRA_MODULES)
JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 $(COMPACT2_EXTRA_MODULES) JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 $(COMPACT2_EXTRA_MODULES)
JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES) JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES)
# Replacing double-comma with a single comma is to workaround the issue JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
# with some version of make on windows that doesn't substitute spaces JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES))
# with one comma properly as with make 4.0 JRE_COMPACT1_MODULES_LIST := $(call CommaList, $(JRE_COMPACT1_MODULES))
SubstComma = \ JRE_COMPACT2_MODULES_LIST := $(call CommaList, $(JRE_COMPACT2_MODULES))
$(strip \ JRE_COMPACT3_MODULES_LIST := $(call CommaList, $(JRE_COMPACT3_MODULES))
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
)
JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES))
JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES))
JRE_COMPACT1_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT1_MODULES))
JRE_COMPACT2_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT2_MODULES))
JRE_COMPACT3_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT3_MODULES))
################################################################################ ################################################################################
# Release file # Release file
@ -363,6 +355,23 @@ $(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip
################################################################################
# classlist
$(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \
FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
DEST := $(JDK_IMAGE_DIR)/lib, \
))
JDK_TARGETS += $(JDK_COPY_CLASSLIST)
$(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \
FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
DEST := $(JRE_IMAGE_DIR)/lib, \
))
JRE_TARGETS += $(JRE_COPY_CLASSLIST)
################################################################################ ################################################################################
# /demo dir # /demo dir
ifneq ($(findstring images, $(MAKECMDGOALS)), ) ifneq ($(findstring images, $(MAKECMDGOALS)), )

60
make/InterimImage.gmk Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (c) 2016, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
default: all
include $(SPEC)
include MakeBase.gmk
include Modules.gmk
################################################################################
# Use this file inside the image as target for make rule
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))
JMODS := $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, $(INTERIM_IMAGE_MODULES))
JLINK_TOOL := $(JLINK) \
--modulepath $(IMAGES_OUTPUTDIR)/jmods \
--endian $(OPENJDK_BUILD_CPU_ENDIAN)
$(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, INTERIM_MODULES_LIST)
$(ECHO) Creating interim jimage
$(RM) -r $(INTERIM_IMAGE_DIR)
$(JLINK_TOOL) \
--output $(INTERIM_IMAGE_DIR) \
--addmods $(INTERIM_MODULES_LIST)
$(TOUCH) $@
TARGETS += $(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
################################################################################
all: $(TARGETS)
.PHONY: all

View File

@ -348,25 +348,35 @@ ALL_TARGETS += docs-javadoc docs-jvmtidoc zip-docs
################################################################################ ################################################################################
# Cross compilation support # Cross compilation support
ifeq ($(CREATE_BUILDJDK), true) ifeq ($(CREATING_BUILDJDK), true)
# This target is only called by the recursive call below. # This target is only called by the recursive call below.
create-buildjdk-compile-hotspot-helper: hotspot create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
create-buildjdk-compile-modules-helper: jdk.jlink-launchers java.base-copy \ java.base-copy jdk.jdeps-launchers
jdk.jdeps-launchers
endif endif
create-buildjdk-copy: create-buildjdk-copy:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
create-buildjdk-compile-hotspot create-buildjdk-compile-modules: create-buildjdk-interim-image:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
$@-helper \ $@-helper \
SPEC=$(dir $(SPEC))buildjdk-spec.gmk \ SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \ HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
CREATING_BUILDJDK=true) CREATING_BUILDJDK=true)
ALL_TARGETS += create-buildjdk-copy create-buildjdk-compile-hotspot \ ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
create-buildjdk-compile-modules
################################################################################
# The interim-image is a small jlinked image that is used to generate artifacts
# at build time for use when linking the real images.
interim-image:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk)
generate-classlist:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateClasslist.gmk)
ALL_TARGETS += interim-image generate-classlist
################################################################################ ################################################################################
# Build tests # Build tests
@ -522,10 +532,11 @@ else
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java)) $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
# Declare dependencies from <module>-lib to <module>-java # Declare dependencies from <module>-lib to <module>-java
# Skip modules that do not have java source. When creating a BUILD_JDK, the # Skip modules that do not have java source.
# java compilation has already been done by the normal build and copied in. # When creating a BUILDJDK, the java compilation has already been done by the
# normal build and copied in.
ifneq ($(CREATING_BUILDJDK), true) ifneq ($(CREATING_BUILDJDK), true)
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java)) $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
endif endif
# Declare dependencies from all other <module>-lib to java.base-lib # Declare dependencies from all other <module>-lib to java.base-lib
@ -562,13 +573,21 @@ else
$(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata)) $(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
$(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy)) $(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
# Declare dependencies between jmod targets # Declare dependencies between jmod targets. Only java.base jmod needs access
$(foreach m, $(JMOD_MODULES), \ # to the other jmods to be built.
$(eval $m-jmod: $(addsuffix -jmod, $(call FindDepsForModule,$m)))) # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
# we don't need to depend on all other jmods
ifneq ($(CREATING_BUILDJDK), true)
java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
endif
# Declare dependencies from <module>-jmod to all other module targets # Declare dependencies from <module>-jmod to all other module targets
$(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip)) $(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
$(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java)) # When creating a BUILDJDK, the java compilation has already been done by the
# normal build and copied in.
ifneq ($(CREATING_BUILDJDK), true)
$(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
endif
$(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata)) $(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata))
$(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic)) $(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic))
$(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs)) $(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs))
@ -577,10 +596,18 @@ else
# Jmods cannot be created until we have the jlink tool ready to run, which requires # Jmods cannot be created until we have the jlink tool ready to run, which requires
# all java modules to be compiled and jdk.jlink-launchers. # all java modules to be compiled and jdk.jlink-launchers.
$(JMOD_TARGETS): java java.base-libs jdk.jlink-launchers $(JMOD_TARGETS): java.base-libs jdk.jlink-launchers
# When creating a BUILDJDK, the java compilation has already been done by the
# normal build and copied in.
ifneq ($(CREATING_BUILDJDK), true)
$(JMOD_TARGETS): java
endif
ifeq ($(CREATE_BUILDJDK), true) ifeq ($(CREATE_BUILDJDK), true)
$(JMOD_TARGETS): create-buildjdk # Avoid calling create-buildjdk from within a create-buildjdk call
ifneq ($(CREATING_BUILDJDK), true)
$(JMOD_TARGETS): create-buildjdk
endif
endif endif
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \ zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
@ -590,7 +617,18 @@ else
jrtfs-jar: interim-langtools jrtfs-jar: interim-langtools
jimages: jmods zip-source source-tips demos samples jrtfs-jar ifeq ($(CREATE_BUILDJDK), true)
# If creating a buildjdk, the interim image needs to be based on that.
generate-classlist: create-buildjdk
else ifeq ($(EXTERNAL_BUILDJDK), false)
# If an external buildjdk has been provided, we skip generating an
# interim-image and just use the external buildjdk for generating
# classlist.
generate-classlist: interim-image
endif
generate-classlist: buildtools-jdk
jimages: jmods zip-source source-tips demos samples jrtfs-jar generate-classlist
profiles: jmods zip-source source-tips jrtfs-jar profiles: jmods zip-source source-tips jrtfs-jar
@ -606,9 +644,12 @@ else
test: jimages test-image test: jimages test-image
create-buildjdk-copy: jdk.jlink-java java.base-gendata create-buildjdk-copy: jdk.jlink-java java.base-gendata \
$(addsuffix -java, $(INTERIM_IMAGE_MODULES))
create-buildjdk-compile-modules: create-buildjdk-copy create-buildjdk-compile-hotspot create-buildjdk-interim-image: create-buildjdk-copy
interim-image: $(addsuffix -jmod, $(INTERIM_IMAGE_MODULES))
test-make: clean-test-make test-make: clean-test-make
@ -682,8 +723,7 @@ samples: samples-jdk
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk. # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
exploded-image: $(ALL_MODULES) exploded-image: $(ALL_MODULES)
create-buildjdk: create-buildjdk-compile-modules create-buildjdk-copy \ create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image
create-buildjdk-compile-hotspot
mac-bundles: mac-bundles-jdk mac-bundles: mac-bundles-jdk
@ -694,10 +734,14 @@ mac-bundles: mac-bundles-jdk
# (and possibly other, more specific versions) # (and possibly other, more specific versions)
product-images: jimages demos samples zip-security exploded-image product-images: jimages demos samples zip-security exploded-image
# When cross compiling and building a partial BUILDJDK for the build host, # The module summary cannot be run when:
# the summary generation cannot be run. # * Cross compiling and building a partial BUILDJDK for the build host
# * An external buildjdk has been supplied since it may not match the
# module selection of the target jdk
ifneq ($(CREATE_BUILDJDK), true) ifneq ($(CREATE_BUILDJDK), true)
product-images: generate-summary ifeq ($(EXTERNAL_BUILDJDK), false)
product-images: generate-summary
endif
endif endif
ifeq ($(OPENJDK_TARGET_OS), macosx) ifeq ($(OPENJDK_TARGET_OS), macosx)

View File

@ -181,7 +181,7 @@ define SetupJavaCompilationBody
# Extract the info from the java compiler setup. # Extract the info from the java compiler setup.
$1_JVM := $$($$($1_SETUP)_JVM) $1_JVM := $$($$($1_SETUP)_JVM)
$1_JAVAC := $$($$($1_SETUP)_JAVAC) $1_JAVAC := $$($$($1_SETUP)_JAVAC)
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS) $1_FLAGS := $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
ifneq ($$($1_CLASSPATH), ) ifneq ($$($1_CLASSPATH), )
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH)) $1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
endif endif

View File

@ -741,6 +741,17 @@ check-jvm-variant = \
$(error Internal error: Invalid variant tested: $1)) \ $(error Internal error: Invalid variant tested: $1)) \
$(if $(filter $1, $(JVM_VARIANTS)), true, false)) $(if $(filter $1, $(JVM_VARIANTS)), true, false))
################################################################################
# Converts a space separated list to a comma separated list.
#
# Replacing double-comma with a single comma is to workaround the issue with
# some version of make on windows that doesn't substitute spaces with one comma
# properly.
CommaList = \
$(strip \
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
)
################################################################################ ################################################################################
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.

View File

@ -38,13 +38,12 @@ _MODULES_GMK := 1
BOOT_MODULES := BOOT_MODULES :=
PLATFORM_MODULES := PLATFORM_MODULES :=
JRE_TOOL_MODULES := JRE_TOOL_MODULES :=
UPGRADEABLE_MODULES :=
AGGREGATOR_MODULES :=
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, , common/Modules.gmk)) $(eval $(call IncludeCustomExtension, , common/Modules.gmk))
UPGRADEABLE_MDOULES :=
AGGREGATOR_MDOULES :=
BOOT_MODULES += \ BOOT_MODULES += \
java.base \ java.base \
java.datatransfer \ java.datatransfer \
@ -73,11 +72,9 @@ BOOT_MODULES += \
# to be deprivileged # to be deprivileged
BOOT_MODULES += \ BOOT_MODULES += \
java.compiler \
java.scripting \ java.scripting \
java.sql.rowset \ java.sql.rowset \
java.smartcardio \ java.smartcardio \
jdk.charsets \
jdk.naming.rmi \ jdk.naming.rmi \
# #
@ -104,7 +101,9 @@ PLATFORM_MODULES += \
# #
PLATFORM_MODULES += \ PLATFORM_MODULES += \
java.compiler \
jdk.accessibility \ jdk.accessibility \
jdk.charsets \
jdk.crypto.ec \ jdk.crypto.ec \
jdk.crypto.pkcs11 \ jdk.crypto.pkcs11 \
jdk.dynalink \ jdk.dynalink \
@ -129,6 +128,10 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
PLATFORM_MODULES += jdk.crypto.ucrypto PLATFORM_MODULES += jdk.crypto.ucrypto
endif endif
# These modules are included in the interim image which is used to run profiling
# before building the real images.
INTERIM_IMAGE_MODULES := java.base java.logging
################################################################################ ################################################################################
# Some platforms don't have the serviceability agent # Some platforms don't have the serviceability agent