8049367: Modular Run-Time Images

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
This commit is contained in:
Chris Hegarty 2014-12-03 14:20:24 +00:00
parent 7f650a64d5
commit 92828b7e7c
5 changed files with 72 additions and 96 deletions

View File

@ -1,53 +0,0 @@
#
# Copyright (c) 2014, 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.
#
################################################################################
# The Corba sources are old and generates a LOT of warnings.
# Disable these using Xlint, until someone cares to fix them.
DISABLE_CORBA_WARNINGS := -Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
# The "generate old bytecode" javac setup uses the new compiler to compile for the
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to the boot jdk bytecode.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := $(BOOT_JDK_SOURCETARGET) \
-bootclasspath "$(BOOT_RTJAR)$(PATH_SEP)$(BOOT_TOOLSJAR)" \
$(DISABLE_CORBA_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
# The "generate new bytecode" uses the new compiler to generate bytecode
# for the new jdk that is being built. The code compiled by this setup
# cannot necessarily be run with the boot jdk.
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
################################################################################

View File

@ -29,16 +29,16 @@ default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include CommonCorba.gmk
include SetupJavaCompilers.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(CORBA_TOPDIR)/src/java.corba/share/classes \
SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes \
$(CORBA_TOPDIR)/src/java.corba/share/classes \
$(CORBA_TOPDIR)/src/jdk.rmic/share/classes \
$(CORBA_OUTPUTDIR)/gensrc/java.corba, \
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
EXCLUDES := com/sun/corba/se/PortableActivationIDL, \
EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
@ -47,16 +47,9 @@ $(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
COPY := .prp, \
CLEAN := .properties, \
BIN := $(CORBA_OUTPUTDIR)/interim_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_interim_classes, \
JAR := $(INTERIM_CORBA_JAR)))
################################################################################
# Copy idl files straight to jdk/include.
$(JDK_OUTPUTDIR)/include/%: $(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/%
$(install-file)
IDL_TARGET_FILES := $(JDK_OUTPUTDIR)/include/orb.idl $(JDK_OUTPUTDIR)/include/ir.idl
################################################################################
all: $(BUILD_INTERIM_CORBA) $(IDL_TARGET_FILES)
all: $(BUILD_INTERIM_CORBA)

View File

@ -0,0 +1,34 @@
#
# Copyright (c) 2014, 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.
#
################################################################################
# Copy idl files to jdk/lib.
$(eval $(call SetupCopyFiles,COPY_IDL, \
SRC := $(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
FILES := $(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/orb.idl \
$(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/ir.idl))
TARGETS := $(COPY_IDL)

View File

@ -29,35 +29,37 @@ include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include IdlCompilation.gmk
include CommonCorba.gmk
include SetupJavaCompilers.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_CORBA, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(CORBA_TOPDIR)/make/src/classes, \
BIN := $(CORBA_OUTPUTDIR)/tools_classes))
BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes))
TOOL_LOGUTIL_CMD := $(JAVA) -cp $(CORBA_OUTPUTDIR)/tools_classes \
TOOL_LOGUTIL_CMD := $(JAVA) -cp $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes \
build.tools.logutil.MC
$(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(CORBA_TOPDIR)/src/java.corba/share/classes, \
BIN := $(CORBA_OUTPUTDIR)/idlj_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/idlj_classes, \
COPY := .prp, \
INCLUDES := com/sun/tools/corba/se/idl, \
EXCLUDE_FILES := ResourceBundleUtil.java))
# Force the language to english for predictable source code generation.
TOOL_IDLJ_CMD := $(JAVA) -cp $(CORBA_OUTPUTDIR)/idlj_classes \
TOOL_IDLJ_CMD := $(JAVA) -cp $(BUILDTOOLS_OUTPUTDIR)/idlj_classes \
-Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
################################################################################
EXCEPTION_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging
LOGWRAPPER_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/_logwrappers
# Generate LogWrapper classes
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/%SystemException.java: \
$(EXCEPTION_DIR)/%SystemException.java: \
$(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(MKDIR) -p $(@D)
@ -66,21 +68,21 @@ $(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/%SystemExcept
$(TOOL_LOGUTIL_CMD) make-class $< $(@D)
# Generate LogWrapper properties file by concatening resource files
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/LogStrings.properties: \
$(CORBA_OUTPUTDIR)/logwrappers/ActivationSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/IORSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/InterceptorsSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/NamingSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/OMGSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/ORBUtilSystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/POASystemException.resource \
$(CORBA_OUTPUTDIR)/logwrappers/UtilSystemException.resource
$(EXCEPTION_DIR)/LogStrings.properties: \
$(LOGWRAPPER_DIR)/ActivationSystemException.resource \
$(LOGWRAPPER_DIR)/IORSystemException.resource \
$(LOGWRAPPER_DIR)/InterceptorsSystemException.resource \
$(LOGWRAPPER_DIR)/NamingSystemException.resource \
$(LOGWRAPPER_DIR)/OMGSystemException.resource \
$(LOGWRAPPER_DIR)/ORBUtilSystemException.resource \
$(LOGWRAPPER_DIR)/POASystemException.resource \
$(LOGWRAPPER_DIR)/UtilSystemException.resource
$(MKDIR) -p $(@D)
$(ECHO) $(LOG_INFO) Concatenating 8 resource files into $(@F)
$(CAT) $^ > $@
# The resources files are generated from lisp-like .mc files.
$(CORBA_OUTPUTDIR)/logwrappers/%SystemException.resource: \
$(LOGWRAPPER_DIR)/%SystemException.resource: \
$(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(MKDIR) -p $(@D)
@ -90,15 +92,15 @@ $(CORBA_OUTPUTDIR)/logwrappers/%SystemException.resource: \
LOGWRAPPER_TARGETS := \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/ActivationSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/IORSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/InterceptorsSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/NamingSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/OMGSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/ORBUtilSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/POASystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/UtilSystemException.java \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging/LogStrings.properties
$(EXCEPTION_DIR)/ActivationSystemException.java \
$(EXCEPTION_DIR)/IORSystemException.java \
$(EXCEPTION_DIR)/InterceptorsSystemException.java \
$(EXCEPTION_DIR)/NamingSystemException.java \
$(EXCEPTION_DIR)/OMGSystemException.java \
$(EXCEPTION_DIR)/ORBUtilSystemException.java \
$(EXCEPTION_DIR)/POASystemException.java \
$(EXCEPTION_DIR)/UtilSystemException.java \
$(EXCEPTION_DIR)/LogStrings.properties
################################################################################
# Build the IDLs.
@ -215,7 +217,7 @@ IDL_DELETES := \
$(eval $(call SetupIdlCompilation,BUILD_IDLS, \
IDLJ := $(TOOL_IDLJ_CMD), \
SRC := $(CORBA_TOPDIR)/src/java.corba/share/classes, \
BIN := $(CORBA_OUTPUTDIR)/gensrc/java.corba, \
BIN := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
EXCLUDES := com/sun/tools/corba/se/idl/% \
org/omg/CORBA/% \
com/sun/corba/se/GiopIDL/% \
@ -230,12 +232,12 @@ $(BUILD_IDLS): $(BUILD_IDLJ)
################################################################################
# zh_HK is just a copy of zh_TW
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties: \
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties: \
$(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
$(install-file)
################################################################################
all: $(BUILD_IDLS) $(LOGWRAPPER_TARGETS) \
$(CORBA_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties

View File

@ -352,7 +352,7 @@ public abstract class Generator implements sun.rmi.rmic.Generator,
env.output(Main.getText("rmic.generated", file.getPath(), Long.toString(duration)));
}
if (sourceFile) {
env.parseFile(new ClassFile(file));
env.parseFile(ClassFile.newClassFile(file));
}
} catch (IOException e) {
env.error(0, "cant.write", file.toString());