This commit is contained in:
Lana Steuck 2015-12-02 09:34:13 -08:00
commit a8d022b540
25 changed files with 2810 additions and 184 deletions

View File

@ -423,7 +423,10 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
AC_MSG_ERROR([fixpath did not work!])
fi
AC_MSG_RESULT([yes])
FIXPATH_DETACH_FLAG="--detach"
fi
AC_SUBST(FIXPATH)
AC_SUBST(FIXPATH_DETACH_FLAG)
])

View File

@ -375,6 +375,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
AC_SUBST(JAVA_FLAGS_BIG)
# By default, the main javac compilations use big
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
AC_SUBST(JAVA_FLAGS_JAVAC)
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])

View File

@ -59,3 +59,8 @@ JAVAH_CMD:=$(BOOT_JDK)/bin/javah
JAR_CMD:=$(BOOT_JDK)/bin/jar
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
# When building a 32bit target, make sure the sjavac server flags are compatible
# with a 32bit JVM.
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
SJAVAC_SERVER_JAVA_FLAGS:= -Xms256M -Xmx1500M
endif

View File

@ -138,14 +138,6 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
JOBS="$memory_gb"
else
JOBS="$NUM_CORES"
# On bigger machines, leave some room for other processes to run
if test "$JOBS" -gt "4"; then
JOBS=`expr $JOBS '*' 90 / 100`
fi
fi
# Cap number of jobs to 16
if test "$JOBS" -gt "16"; then
JOBS=16
fi
if test "$JOBS" -eq "0"; then
JOBS=1
@ -246,6 +238,73 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
fi
])
################################################################################
#
# Optionally enable distributed compilation of native code using icecc/icecream
#
AC_DEFUN([BPERF_SETUP_ICECC],
[
AC_ARG_ENABLE([icecc], [AS_HELP_STRING([--enable-icecc],
[enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
if test "x${enable_icecc}" = "xyes"; then
BASIC_REQUIRE_PROGS(ICECC_CMD, icecc)
old_path="$PATH"
# Look for icecc-create-env in some known places
PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
BASIC_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
# Use icecc-create-env to create a minimal compilation environment that can
# be sent to the other hosts in the icecream cluster.
icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
AC_MSG_CHECKING([for icecc build environment for target compiler])
if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
# For clang, the icecc compilerwrapper is needed. It usually resides next
# to icecc-create-env.
BASIC_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
else
AC_MSG_ERROR([Can only create icecc compiler packages for toolchain types gcc and clang])
fi
PATH="$old_path"
# The bundle with the compiler gets a name based on checksums. Parse log file
# to find it.
ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
AC_MSG_RESULT([${ICECC_ENV_BUNDLE}])
ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
if test "x${COMPILE_TYPE}" = "xcross"; then
# If cross compiling, create a separate env package for the build compiler
AC_MSG_CHECKING([for icecc build environment for build compiler])
# Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
if test "x${BUILD_CC##*/}" = "xgcc" || test "x${BUILD_CC##*/}" = "xcc"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
elif test "x${BUILD_CC##*/}" = "xclang"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
else
AC_MSG_ERROR([Cannot create icecc compiler package for ${BUILD_CC}])
fi
ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
AC_MSG_RESULT([${ICECC_ENV_BUNDLE}])
BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
else
BUILD_ICECC="${ICECC}"
fi
AC_SUBST(ICECC)
AC_SUBST(BUILD_ICECC)
fi
])
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
[
@ -258,8 +317,15 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1
AC_MSG_CHECKING([If precompiled header is enabled])
if test "x$ENABLE_PRECOMPH" = xno; then
AC_MSG_RESULT([no, forced])
USE_PRECOMPILED_HEADER=0
elif test "x$ICECC" != "x"; then
AC_MSG_RESULT([no, does not work effectively with icecc])
USE_PRECOMPILED_HEADER=0
else
AC_MSG_RESULT([yes])
fi
if test "x$ENABLE_PRECOMPH" = xyes; then
@ -337,9 +403,9 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
AC_MSG_RESULT([$ENABLE_SJAVAC])
AC_SUBST(ENABLE_SJAVAC)
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
[use only the server part of sjavac for faster javac compiles @<:@disabled@:>@])],
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="no"])
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--disable-javac-server],
[disable javac server @<:@enabled@:>@])],
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="yes"])
if test "x$JVM_ARG_OK" = "xfalse"; then
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server])
ENABLE_JAVAC_SERVER="no"
@ -347,4 +413,10 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
AC_MSG_CHECKING([whether to use javac server])
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
AC_SUBST(ENABLE_JAVAC_SERVER)
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
# When using a server javac, the small client instances do not need much
# resources.
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
fi
])

View File

@ -237,6 +237,9 @@ BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
# Setup smart javac (after cores and memory have been setup)
BPERF_SETUP_SMART_JAVAC
# Setup use of icecc if requested
BPERF_SETUP_ICECC
# Can the C/C++ compiler use precompiled headers?
BPERF_SETUP_PRECOMPILED_HEADERS

View File

@ -976,6 +976,19 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
DISABLE_WARNING_PREFIX=
fi
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Repeate the check for the BUILD_CC
CC_OLD="$CC"
CC="$BUILD_CC"
FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
[BUILD_CC_CAN_DISABLE_WARNINGS=true],
[BUILD_CC_CAN_DISABLE_WARNINGS=false]
)
if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
else
BUILD_CC_DISABLE_WARNING_PREFIX=
fi
CC="$CC_OLD"
;;
clang)
DISABLE_WARNING_PREFIX="-Wno-"

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,8 @@ ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
# compiler that produces code that can be run on the build platform.
HOSTCC:=@FIXPATH@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
HOSTCXX:=@FIXPATH@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
####################################################
#
@ -105,7 +105,7 @@ USE_CLANG := @USE_CLANG@
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
# Hotspot has its own handling on the Windows path situation.
CXX:=@CCACHE@ @HOTSPOT_CXX@
CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@
LD:=@HOTSPOT_LD@
MT:=@HOTSPOT_MT@
RC:=@HOTSPOT_RC@

View File

@ -329,7 +329,7 @@ WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @CC@
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
@ -339,7 +339,7 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
CXX:=@FIXPATH@ @CCACHE@ @CXX@
CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
#CXXFLAGS:=@CXXFLAGS@
CPP:=@FIXPATH@ @CPP@
@ -382,8 +382,12 @@ LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
BUILD_CC:=@FIXPATH@ @BUILD_CC@
BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
BUILD_LD:=@FIXPATH@ @BUILD_LD@
BUILD_AS:=@FIXPATH@ @BUILD_AS@
BUILD_AR:=@FIXPATH@ @BUILD_AR@
BUILD_NM:=@FIXPATH@ @BUILD_NM@
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
@ -446,6 +450,7 @@ STRIPFLAGS:=@STRIPFLAGS@
JAVA_FLAGS:=@JAVA_FLAGS@
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
@ -462,13 +467,15 @@ SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
# it possible to override only the *_CMD variables.
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(JAVAC_CMD)
JAVAH=@FIXPATH@ $(JAVAH_CMD)
JAR=@FIXPATH@ $(JAR_CMD)
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
# A specific java binary with specific options can be used to run
# the long running background sjavac servers and other long running tasks.
SJAVAC_SERVER_JAVA=@FIXPATH@ $(SJAVAC_SERVER_JAVA_CMD) $(SJAVAC_SERVER_JAVA_FLAGS)
SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
$(SJAVAC_SERVER_JAVA_FLAGS)
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.

View File

@ -539,6 +539,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The corresponding ar tool is lib.exe (used to create static libraries)
AC_CHECK_PROG([AR], [lib],[lib],,,)
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
BASIC_CHECK_TOOLS(AR, ar gcc-ar)
else
BASIC_CHECK_TOOLS(AR, ar)
fi
@ -584,7 +586,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
# FIXME: we should unify this with the solaris case above.
BASIC_CHECK_TOOLS(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP)
BASIC_CHECK_TOOLS(NM, nm)
if test "x$TOOLCHAIN_TYPE" = xgcc; then
BASIC_CHECK_TOOLS(NM, nm gcc-nm)
else
BASIC_CHECK_TOOLS(NM, nm)
fi
BASIC_FIXUP_EXECUTABLE(NM)
GNM="$NM"
AC_SUBST(GNM)
@ -717,6 +723,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
BASIC_FIXUP_EXECUTABLE(BUILD_NM)
BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
BASIC_FIXUP_EXECUTABLE(BUILD_AR)
# Assume the C compiler is the assembler
BUILD_AS="$BUILD_CC -c"
# Just like for the target compiler, use the compiler as linker
BUILD_LD="$BUILD_CC"
PATH="$OLDPATH"
@ -726,15 +739,21 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
BUILD_CC="$CC"
BUILD_CXX="$CXX"
BUILD_LD="$LD"
BUILD_NM="$NM"
BUILD_AS="$AS"
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
BUILD_AR="$AR"
fi
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CXX)
AC_SUBST(BUILD_LD)
AC_SUBST(BUILD_NM)
AC_SUBST(BUILD_AS)
AC_SUBST(BUILD_SYSROOT_CFLAGS)
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
AC_SUBST(BUILD_AR)
])
# Setup legacy variables that are still needed as alternative ways to refer to

View File

@ -358,10 +358,13 @@ int main(int argc, char const ** argv)
char *line;
char *current;
int i, cmd;
DWORD exitCode;
DWORD exitCode = 0;
DWORD processFlags = 0;
BOOL processInheritHandles = TRUE;
BOOL waitForChild = TRUE;
if (argc<2 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> [--detach] /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
exit(0);
}
@ -386,7 +389,22 @@ int main(int argc, char const ** argv)
exit(-1);
}
i = 2;
if (argv[2][0] == '-') {
if (strcmp(argv[2], "--detach") == 0) {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath in detached mode\n");
}
processFlags |= DETACHED_PROCESS;
processInheritHandles = FALSE;
waitForChild = FALSE;
} else {
fprintf(stderr, "fixpath Unknown argument: %s\n", argv[2]);
exit(-1);
}
i = 3;
} else {
i = 2;
}
// handle assignments
while (i < argc) {
@ -428,6 +446,10 @@ int main(int argc, char const ** argv)
while (i < argc) {
char const *replaced = replace_cygdrive(argv[i]);
if (replaced[0] == '@') {
if (waitForChild == FALSE) {
fprintf(stderr, "fixpath Cannot use @-files in detached mode: %s\n", replaced);
exit(1);
}
// Found at-file! Fix it!
replaced = fix_at_file(replaced);
}
@ -480,8 +502,8 @@ int main(int argc, char const ** argv)
line,
0,
0,
TRUE,
0,
processInheritHandles,
processFlags,
NULL,
NULL,
&si,
@ -492,24 +514,30 @@ int main(int argc, char const ** argv)
exit(126);
}
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &exitCode);
if (waitForChild == TRUE) {
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &exitCode);
if (getenv("DEBUG_FIXPATH") != NULL) {
for (i=0; i<num_files_to_delete; ++i) {
fprintf(stderr, "fixpath Not deleting temporary file %s\n",
files_to_delete[i]);
if (getenv("DEBUG_FIXPATH") != NULL) {
for (i=0; i<num_files_to_delete; ++i) {
fprintf(stderr, "fixpath Not deleting temporary file %s\n",
files_to_delete[i]);
}
} else {
for (i=0; i<num_files_to_delete; ++i) {
remove(files_to_delete[i]);
}
}
if (exitCode != 0) {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath exit code %d\n",
exitCode);
}
}
} else {
for (i=0; i<num_files_to_delete; ++i) {
remove(files_to_delete[i]);
}
}
if (exitCode != 0) {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath exit code %d\n",
exitCode);
fprintf(stderr, "fixpath Not waiting for child process");
}
}

View File

@ -56,6 +56,14 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
java.base_EXCLUDE_FILES += sun/nio/fs/GnomeFileTypeDetector.java
endif
ifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), )
java.base_EXCLUDE_FILES += \
sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/PollSelectorImpl.java \
sun/nio/ch/PollSelectorProvider.java \
#
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
java.base_EXCLUDE_FILES += \
SolarisLoginModule.java \
@ -72,8 +80,6 @@ endif
ifeq ($(OPENJDK_TARGET_OS), windows)
java.base_EXCLUDE_FILES += \
sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/PollSelectorProvider.java \
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
#
endif
@ -361,6 +367,29 @@ jdk.compiler_CLEAN_FILES := $(wildcard \
################################################################################
jdk.hotspot.agent_SRC += \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent \
$(HOTSPOT_TOPDIR)/agent/src/share/classes \
#
jdk.hotspot.agent_ADD_JAVAC_FLAGS := $(DISABLE_WARNINGS),-overrides
jdk.hotspot.agent_COPY := .png sa.js .properties
ifeq ($(MODULE), jdk.hotspot.agent)
### Copy gif files
# Special handling to copy gif files in images/toolbarButtonGraphics \
# -> classes/toolbarButtonGraphics.
# These can't be handled by COPY to SetupJavaCompilation since they chop off
# one directory level.
$(eval $(call SetupCopyFiles, COPY_SA_IMAGES, \
SRC := $(HOTSPOT_TOPDIR)/agent/src/share/classes/images, \
DEST := $(JDK_OUTPUTDIR)/modules/$(MODULE), \
FILES := $(wildcard $(HOTSPOT_TOPDIR)/agent/src/share/classes/images/*/*/*.gif), \
))
jdk.hotspot.agent: $(COPY_SA_IMAGES)
endif
################################################################################
jdk.internal.le_COPY := .properties
################################################################################
@ -369,6 +398,10 @@ jdk.jcmd_COPY := _options
################################################################################
jdk.dynalink_CLEAN := .properties
################################################################################
jdk.javadoc_COPY := .xml .css .js .png
################################################################################
@ -471,33 +504,29 @@ jdk.localedata_COPY := _dict _th
jdk.localedata_EXCLUDE_FILES += sun/text/resources/th/BreakIteratorRules_th.java
################################################################################
# Setup the compilation of each module
#
# Do not include nashorn src here since it needs to be compiled separately due
# to nasgen.
# Setup the compilation for the module
#
# Order src dirs in order of override with the most important first. Generated
# source before static source and platform specific source before shared.
#
# To use this variable, use $(call ALL_SRC_DIRS,module) with no space.
GENERATED_SRC_DIRS += \
$(SUPPORT_OUTPUTDIR)/gensrc/$1 \
$(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$1 \
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) \
$(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(MODULE) \
#
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/classes
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_TYPE)/classes
OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/classes
endif
SHARE_SRC_DIRS += \
$(HOTSPOT_TOPDIR)/src/$1/share/classes \
$(JDK_TOPDIR)/src/$1/share/classes \
$(LANGTOOLS_TOPDIR)/src/$1/share/classes \
$(CORBA_TOPDIR)/src/$1/share/classes \
$(JAXP_TOPDIR)/src/$1/share/classes \
$(JAXWS_TOPDIR)/src/$1/share/classes \
$(NASHORN_TOPDIR)/src/$1/share/classes \
$(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes \
$(JDK_TOPDIR)/src/$(MODULE)/share/classes \
$(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes \
$(CORBA_TOPDIR)/src/$(MODULE)/share/classes \
$(JAXP_TOPDIR)/src/$(MODULE)/share/classes \
$(JAXWS_TOPDIR)/src/$(MODULE)/share/classes \
$(NASHORN_TOPDIR)/src/$(MODULE)/share/classes \
#
ALL_SRC_DIRS = \
@ -507,11 +536,6 @@ ALL_SRC_DIRS = \
$(SHARE_SRC_DIRS) \
#
# Find all modules with java sources. Filter out nashorn since it needs to be
# compiled separately.
ALL_JAVA_MODULES := $(filter-out jdk.scripting.nashorn, $(call FindJavaModules))
JAVA_MODULES := $(ALL_JAVA_MODULES)
# The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
# JDK_FILTER at the make command line, only a subset of the JDK java files will
# be recompiled. If multiple paths are separated by comma, convert that into a
@ -522,50 +546,38 @@ JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir
$(call MakeDir, $(EMPTY_DIR))
# This macro sets up compilation of a module and declares dependencies for it.
# Param 1 - module name
define SetupModuleCompilation
# Find the module dependencies by parsing modules.list file
$1_DEPS := $$(call FindDepsForModule, $1)
# Find the module dependencies by parsing modules.list file
DEPS := $(call FindDepsForModule, $(MODULE))
$1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
$(JDK_OUTPUTDIR)/modules/$$d))
CLASSPATH := $(foreach d, $(DEPS), $(if $($d_BIN), $($d_BIN), \
$(JDK_OUTPUTDIR)/modules/$d))
# When crypto classes are prebuilt, need to look for classes already in
# output dir.
ifneq ($(BUILD_CRYPTO), true)
$1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
CLASSPATH += $(JDK_OUTPUTDIR)/modules/$(MODULE)
endif
ifeq ($1, jdk.hotspot.agent)
## The source of this module is compiled elsewhere, hotspot, and imported.
## Service types are required in the classpath when compiing module-info
$1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
endif
$1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) $$($1_ADD_JAVAC_FLAGS)
JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) \
-endorseddirs $(EMPTY_DIR) $($(MODULE)_ADD_JAVAC_FLAGS)
$$(eval $$(call SetupJavaCompilation,$1, \
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
SRC := $$(if $$($1_SRC), $$($1_SRC), $$(wildcard $$(call ALL_SRC_DIRS,$1))), \
$(eval $(call SetupJavaCompilation, $(MODULE), \
SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
SRC := $(if $($(MODULE)_SRC), $($(MODULE)_SRC), $(wildcard $(ALL_SRC_DIRS))), \
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
CLASSPATH := $$($1_CLASSPATH), \
ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules/$(MODULE)), \
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$(MODULE), \
CLASSPATH := $(CLASSPATH), \
ADD_JAVAC_FLAGS := $($(MODULE)_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS) \
))
TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
$1: $$($1) $$($1_COPY_EXTRA)
# Declare dependencies between java compilation of different modules.
# Since not all modules have been declared yet, or might be declared
# in different invocations of this file, use the macro to find the
# correct target file to depend on.
# Only the javac compilation actually depends on other modules so limit
# dependency declaration to that by using the *_COMPILE_TARGET variable.
$$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
$$(call SetupJavaCompilationCompileTarget, $$d, \
$$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))
endef
# Setup compilation for each module
$(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
# Declare dependencies between java compilations of different modules.
# Since the other modules are declared in different invocations of this file,
# use the macro to find the correct target file to depend on.
# Only the javac compilation actually depends on other modules so limit
# dependency declaration to that by using the *_COMPILE_TARGET variable.
$($(MODULE)_COMPILE_TARGET): $(foreach d, $($(MODULE)_DEPS), \
$(call SetupJavaCompilationCompileTarget, $d, \
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
################################################################################
# Copy zh_HK properties files from zh_TW
@ -573,15 +585,21 @@ $(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
$(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
$(install-file)
define CreateHkTargets
$(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
$(subst /share/classes,, \
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
endef
CreateHkTargets = \
$(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
$(subst /share/classes,, \
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
java.sql.rowset: $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
java.rmi: $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
ifeq ($(MODULE), java.sql.rowset)
TARGETS += $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
endif
all: $(JAVA_MODULES)
ifeq ($(MODULE), java.rmi)
TARGETS += $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
endif
.PHONY: all $(JAVA_MODULES)
################################################################################
all: $(TARGETS)
.PHONY: all

View File

@ -27,6 +27,7 @@ default: all
include $(SPEC)
include MakeBase.gmk
include Modules.gmk
TOOL_TARGETS :=
JDK_TARGETS :=
@ -39,12 +40,13 @@ $(eval $(call IncludeCustomExtension, , Images-pre.gmk))
MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \
jdk.accessibility jdk.internal.le jdk.scripting.nashorn.shell \
jdk.accessibility jdk.internal.le jdk.dynalink \
jdk.scripting.nashorn jdk.scripting.nashorn.shell \
jdk.vm.ci jdk.management
# providers
PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs
PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.jvmstat.rmi \
jdk.localedata jdk.naming.dns jdk.naming.rmi jdk.zipfs
# tools
TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev \
@ -64,8 +66,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
MAIN_MODULES += jdk.deploy.osx
endif
JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES)
JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES)
JRE_MODULES := $(filter-out $(MODULES_FILTER), $(MAIN_MODULES) $(PROVIDER_MODULES))
JDK_MODULES := $(filter-out $(MODULES_FILTER), $(JRE_MODULES) $(TOOLS_MODULES))
# compact3 builds have additional modules
JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \
@ -510,7 +512,6 @@ $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
$(SYMBOLS_TARGETS)
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)

View File

@ -287,13 +287,6 @@ else # $(HAS_SPEC)=true
BUILD_LOG_WRAPPER := $(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)
# Disable the build log wrapper on sjavac+windows until
# we have solved how to prevent the log wrapper to wait
# for the background sjavac server process.
ifeq ($(ENABLE_SJAVAC)X$(OPENJDK_BUILD_OS),yesXwindows)
LOG_NOFILE := true
endif
# Sanity check the spec file, so it matches this source code
define CheckSpecSanity
ifneq ($$(ACTUAL_TOPDIR), $$(TOPDIR))

View File

@ -49,7 +49,7 @@ endif
# When running in JPRT these will be provided. Need defaults so that this makefile
# is valid anyway.
ifndef JPRT_ARCHIVE_BUNDLE
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
endif
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip

View File

@ -53,8 +53,7 @@ ALL_TARGETS :=
$(eval $(call IncludeCustomExtension, , Main.gmk))
# All modules for the current target platform.
# Manually add jdk.hotspot.agent for now.
ALL_MODULES := $(call FindAllModules) jdk.hotspot.agent
ALL_MODULES := $(call FindAllModules)
################################################################################
################################################################################
@ -144,8 +143,8 @@ JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
define DeclareCompileJavaRecipe
$1-java:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
$1 JAVA_MODULES=$1 MODULE=$1)
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
-f CompileJavaModules.gmk MODULE=$1)
endef
$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
@ -154,7 +153,8 @@ $(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
# Build nashorn. Needs to be compiled separately from the rest of the modules
# due to nasgen.
jdk.scripting.nashorn-java:
+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk compile)
+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
-f BuildNashorn.gmk compile)
ALL_TARGETS += $(JAVA_TARGETS)
@ -195,7 +195,7 @@ ALL_TARGETS += $(LAUNCHER_TARGETS)
ifeq ($(BUILD_HOTSPOT),true)
hotspot:
($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
endif
ALL_TARGETS += hotspot
@ -225,8 +225,8 @@ $(SUPPORT_OUTPUTDIR)/source_tips: FRC
BOOTCYCLE_TARGET := product-images
bootcycle-images:
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
+$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Main.gmk \
SPEC=$(dir $(SPEC))bootcycle-spec.gmk $(BOOTCYCLE_TARGET)
+$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
zip-security:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
@ -423,11 +423,6 @@ else
# virtual target.
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
# Until the module system is in place, jdk.jdi-gensrc needs to combine service
# loader configuration with jdk.hotspot.agent so is dependent on importing
# hotspot.
jdk.jdi-gensrc-jdk: import-hotspot
# The swing beans need to have java base properly generated to avoid errors
# in javadoc.
java.desktop-gensrc-jdk: java.base-gensrc
@ -511,7 +506,7 @@ launchers: $(LAUNCHER_TARGETS)
jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
# Declare dependencies from <module> to all the individual targets specific
# to that module <module>-*.
# to that module <module>-*, that are needed for the exploded image.
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
@ -520,15 +515,12 @@ $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
$(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
$(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
demos: demos-jdk
samples: samples-jdk
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
exploded-image: $(ALL_MODULE_TARGETS)
exploded-image: $(ALL_MODULES)
mac-bundles: mac-bundles-jdk
@ -554,7 +546,7 @@ test-image: prepare-test-image test-image-hotspot-jtreg-native \
all-images: product-images test-image docs-image
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) demos samples exploded-image \
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
mac-bundles product-images docs-image test-image all-images
################################################################################

View File

@ -224,6 +224,7 @@ CORE_PKGS = \
javax.tools \
javax.transaction \
javax.transaction.xa \
javax.xml.catalog \
javax.xml.parsers \
javax.xml.bind \
javax.xml.bind.annotation \

View File

@ -74,7 +74,7 @@ define add_file_to_copy
# already has one
ifneq ($$($1_COPY_$$($2_TARGET)), 1)
$1_COPY_$$($2_TARGET) := 1
# Now we can setup the depency that will trigger the copying.
# Now we can setup the dependency that will trigger the copying.
$$($1_BIN)$$($2_TARGET) : $2
$(MKDIR) -p $$(@D)
$(CP) $$< $$@
@ -311,22 +311,23 @@ define SetupJavaCompilationBody
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
$1_COMPILE_TARGET := $$($1_BIN)/_the.$1_batch
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
# Using sjavac to compile.
ifneq (,$$($1_HEADERS))
$1_HEADERS_ARG := -h $$($1_HEADERS)
endif
# Using sjavac to compile.
$1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
$1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS) $$($1_FLAGS) \
$$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$1.vardeps)
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
$(ECHO) Compiling $1
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
$$($1_JVM) $$($1_SJAVAC) \
@ -334,14 +335,14 @@ define SetupJavaCompilationBody
-j 1 \
--permit-unidentified-artifacts \
--permit-sources-without-package \
--compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
--compare-found-sources $$@.tmp \
--log=$(LOG_LEVEL) \
--state-dir=$$($1_BIN) \
$$($1_SJAVAC_ARGS) \
$$($1_FLAGS) \
$$($1_HEADERS_ARG) \
-d $$($1_BIN)) && \
$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
$(MV) $$@.tmp $$@
# Create a pubapi file that only changes when the pubapi changes. Dependent
# compilations can use this file to only get recompiled when pubapi has changed.
# Grep returns 1 if no matching lines are found. Do not fail for this.
@ -354,14 +355,13 @@ define SetupJavaCompilationBody
else
# Using plain javac to batch compile everything.
$1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
# When building in batch, put headers in a temp dir to filter out those that actually
# changed before copying them to the real header dir.
ifneq (,$$($1_HEADERS))
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
$$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
$(MKDIR) -p $$(@D)
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
for f in `ls $$($1_HEADERS).$1.tmp`; do \
@ -389,19 +389,19 @@ define SetupJavaCompilationBody
endif
# When not using sjavac, pass along all sources to javac using an @file.
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$(MKDIR) -p $$(@D)
$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
$(ECHO) Compiling `$(WC) $$@.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
$$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
-implicit:none \
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp) && \
$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
$(MV) $$@.tmp $$@
endif
# Add all targets to main variable
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGETS) \
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
$$($1_HEADER_TARGETS)
# Check if a jar file was specified, then setup the rules for the jar.

View File

@ -29,6 +29,12 @@ _MODULES_GMK := 1
include JavaCompilation.gmk
include SetupJavaCompilers.gmk
################################################################################
# Some platforms don't have the serviceability agent
ifeq ($(INCLUDE_SA), false)
MODULES_FILTER += jdk.hotspot.agent
endif
################################################################################
# Module list macros
@ -43,21 +49,25 @@ ALL_TOP_SRC_DIRS := \
#
# Find all modules with java sources by looking in the source dirs
# jdk.hotspot.agent currently doesn't comply with source dir policy.
define FindJavaModules
$(filter-out $(MODULES_FILTER), $(sort $(notdir \
$(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
$(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
$(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
$(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
$(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))) \
jdk.hotspot.agent)
endef
# Find all modules with source for the target platform.
# jdk.hotspot.agent currently doesn't comply with source dir policy.
define FindAllModules
$(sort $(filter-out $(MODULES_FILTER) closed demo sample, \
$(notdir $(patsubst %/,%, $(dir \
$(wildcard $(patsubst %, %/*/share, $(ALL_TOP_SRC_DIRS)) \
$(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \
$(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
$(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS)))))) \
jdk.hotspot.agent))
endef
################################################################################

View File

@ -120,9 +120,11 @@ $(eval $(call DefineNativeToolchain, TOOLCHAIN_LINK_CXX, \
# are to be run during the build.
# The BUILD_SYSROOT_*FLAGS variables are empty for now.
$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
EXTENDS := TOOLCHAIN_DEFAULT, \
CC := $(BUILD_CC), \
CXX := $(BUILD_CXX), \
LD := $(BUILD_LD), \
AR := $(BUILD_AR), \
AS := $(BUILD_AS), \
SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
))
@ -294,6 +296,10 @@ endef
# LD the linker to use, default is $(LD)
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
# DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
# DISABLED_WARNINGS_C_<toolchain> Disable the given warnings for the specified toolchain
# when compiling C code
# DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified
# toolchain when compiling C++ code
# STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
# STRIPFLAGS Optionally change the flags given to the strip command
SetupNativeCompilation = $(NamedParamsMacroTemplate)
@ -537,8 +543,12 @@ define SetupNativeCompilationBody
# Pick up disabled warnings, if possible on this platform.
ifneq ($(DISABLE_WARNING_PREFIX),)
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
$$($1_DISABLED_WARNINGS_CXX_$(TOOLCHAIN_TYPE)))
endif
# Check if warnings should be considered errors.

View File

@ -63,7 +63,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
# The generate new bytecode javac setup uses the new compiler to compile for the
# new jdk. This new bytecode might only be possible to run using the new jvm.
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
JVM := $(JAVA), \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 9 -target 9 \
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
@ -73,7 +73,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
# The generate new bytecode javac setup uses the new compiler to compile for the
# new jdk. This new bytecode might only be possible to run using the new jvm.
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
JVM := $(JAVA), \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 9 -target 9 \
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2015, 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
@ -43,12 +43,12 @@
#
# To build the full set of crosstools, use a command line looking like this:
#
# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
# make tars RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
#
# To create a x86_64 package without the redundant i686 cross compiler, do
# like this:
#
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
#
# Main makefile which iterates over all host and target platforms.

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2015, 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
@ -63,11 +63,11 @@ MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
# RPMs in OEL5.5
LINUX_VERSION := OEL5.5
# RPMs in OEL6.4
LINUX_VERSION := OEL6.4
RPM_LIST := \
kernel-headers \
glibc-2 glibc-headers glibc-devel \
glibc glibc-headers glibc-devel \
cups-libs cups-devel \
libX11 libX11-devel \
xorg-x11-proto-devel \
@ -87,7 +87,7 @@ RPM_LIST := \
ifeq ($(ARCH),x86_64)
RPM_DIR ?= $(RPM_DIR_x86_64)
RPM_ARCHS := x86_64
RPM_ARCHS := x86_64 noarch
ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode.
@ -102,6 +102,8 @@ endif
# Sort to remove duplicates
RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
#$(info RPM_FILE_LIST $(RPM_FILE_LIST))
ifeq ($(RPM_FILE_LIST),)
$(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
endif
@ -473,13 +475,25 @@ $(PREFIX)/devkit.info: FRC
##########################################################################################
ifeq ($(TARGET), $(HOST))
$(PREFIX)/bin/%:
@echo 'Creating missing $* soft link'
ln -s $(TARGET)-$* $@
missing-links := $(addprefix $(PREFIX)/bin/, \
addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
size strings strip)
endif
##########################################################################################
bfdlib : $(bfdlib)
binutils : $(binutils)
rpms : $(rpms)
libs : $(libs)
sysroot : rpms libs
gcc : sysroot $(gcc) $(gccpatch)
all : binutils gcc bfdlib $(PREFIX)/devkit.info
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links)
# this is only built for host. so separate.
ccache : $(ccache)

View File

@ -342,7 +342,9 @@
<to>java.logging</to>
<to>java.sql</to>
<to>java.sql.rowset</to>
<to>jdk.dynalink</to>
<to>jdk.scripting.nashorn</to>
<to>jdk.vm.cds</to>
</export>
<export>
<name>sun.reflect.annotation</name>
@ -1064,6 +1066,9 @@
<export>
<name>javax.xml</name>
</export>
<export>
<name>javax.xml.catalog</name>
</export>
<export>
<name>javax.xml.datatype</name>
</export>
@ -1656,6 +1661,26 @@
<name>jdk.dev</name>
<depend>java.base</depend>
</module>
<module>
<name>jdk.dynalink</name>
<depend>java.base</depend>
<depend>java.logging</depend>
<export>
<name>jdk.dynalink</name>
</export>
<export>
<name>jdk.dynalink.beans</name>
</export>
<export>
<name>jdk.dynalink.linker</name>
</export>
<export>
<name>jdk.dynalink.linker.support</name>
</export>
<export>
<name>jdk.dynalink.support</name>
</export>
</module>
<module>
<name>jdk.hotspot.agent</name>
<depend>java.base</depend>
@ -1789,16 +1814,31 @@
<module>
<name>jdk.jvmstat</name>
<depend>java.base</depend>
<depend>java.rmi</depend>
<export>
<name>sun.jvmstat.monitor</name>
<to>jdk.attach</to>
<to>jdk.jcmd</to>
<to>jdk.jconsole</to>
<to>jdk.jvmstat.rmi</to>
</export>
<export>
<name>sun.jvmstat.monitor.event</name>
<to>jdk.jcmd</to>
<to>jdk.jvmstat.rmi</to>
</export>
<export>
<name>sun.jvmstat.perfdata.monitor</name>
<to>jdk.jvmstat.rmi</to>
</export>
</module>
<module>
<name>jdk.jvmstat.rmi</name>
<depend>java.base</depend>
<depend>java.rmi</depend>
<depend>jdk.jvmstat</depend>
<export>
<name>sun.jvmstat.monitor.remote</name>
<to>java.rmi</to>
</export>
</module>
<module>
@ -1849,6 +1889,7 @@
<name>jdk.scripting.nashorn</name>
<depend>java.base</depend>
<depend>java.logging</depend>
<depend>jdk.dynalink</depend>
<depend re-exports="true">java.scripting</depend>
<export>
<name>jdk.nashorn.internal.runtime</name>

View File

@ -407,6 +407,7 @@ public class WhiteBox {
public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
// Sharing
public native boolean isSharedClass(Class<?> c);
public native boolean isShared(Object o);
public native boolean areSharedStringsIgnored();
}