openjdk-1.8.0/src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies.patch

1702 lines
80 KiB
Diff

commit 0c4b13e561bd71a58b454d8324e7270ba85d1ddc
Author: aijiaming <aijiaming1@huawei.com>
Date: Mon Apr 12 09:34:00 2021 +0800
fix patch
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index 077efa29..a96fe5e1 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -170,7 +170,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
else
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1'
+ SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1 -Xlinker --disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
@@ -686,7 +686,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
fi
# TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDK="$LDFLAGS_JDK"
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
LDFLAGS_JDKLIB_SUFFIX=""
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
@@ -706,7 +706,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
# And since we now know that the linker is gnu, then add:
# -z defs, to forbid undefined symbols in object files
# -z noexecstack, to mark stack regions as non-executable
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack -Xlinker -z -Xlinker relro -Xlinker -z -Xlinker now"
if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well?
@@ -747,11 +747,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
- # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
- # java heap.
- if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
- LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
- fi
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
fi
fi
AC_SUBST(LDFLAGS_JDKLIB)
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index ea43a7a0..bdfdd207 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4288,7 +4288,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
################################################################################
# The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
+VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
@@ -4346,6 +4346,18 @@ VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
+VS_DESCRIPTION_2019="Microsoft Visual Studio 2019 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2019=141
+VS_MSVCR_2019=vcruntime140.dll
+VS_MSVCP_2019=msvcp140.dll
+VS_ENVVAR_2019="VS150COMNTOOLS"
+VS_USE_UCRT_2019="true"
+VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
+VS_EDITIONS_2019="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2019=
+VS_VS_PLATFORM_NAME_2019="v141"
+VS_SDK_PLATFORM_NAME_2019=
+
################################################################################
@@ -25694,10 +25706,10 @@ $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25751,10 +25763,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25790,8 +25802,6 @@ $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
fi
fi
- VS_ENV_CMD=""
-
if test "x$VS_COMNTOOLS" != x; then
if test "x$VS_ENV_CMD" = x; then
@@ -25824,10 +25834,10 @@ $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25883,10 +25893,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25944,10 +25954,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -26002,10 +26012,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -26059,10 +26069,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -41322,7 +41332,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
else
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
+ SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1 -Xlinker --disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
@@ -42188,7 +42198,7 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
fi
# TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDK="$LDFLAGS_JDK"
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
LDFLAGS_JDKLIB_SUFFIX=""
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
@@ -42208,7 +42218,7 @@ $as_echo "$supports" >&6; }
# And since we now know that the linker is gnu, then add:
# -z defs, to forbid undefined symbols in object files
# -z noexecstack, to mark stack regions as non-executable
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack -Xlinker -z -Xlinker relro -Xlinker -z -Xlinker now"
if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well?
@@ -42249,11 +42259,7 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
- # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
- # java heap.
- if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
- LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
- fi
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
fi
fi
diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4
index a78f9ac6..0b5efdad 100644
--- a/common/autoconf/toolchain_windows.m4
+++ b/common/autoconf/toolchain_windows.m4
@@ -25,7 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
+VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
@@ -83,6 +83,18 @@ VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
+VS_DESCRIPTION_2019="Microsoft Visual Studio 2019 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2019=141
+VS_MSVCR_2019=vcruntime140.dll
+VS_MSVCP_2019=msvcp140.dll
+VS_ENVVAR_2019="VS150COMNTOOLS"
+VS_USE_UCRT_2019="true"
+VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
+VS_EDITIONS_2019="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2019=
+VS_VS_PLATFORM_NAME_2019="v141"
+VS_SDK_PLATFORM_NAME_2019=
+
################################################################################
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
@@ -107,10 +119,10 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
if test -d "$VS_BASE"; then
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -198,8 +210,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
fi
fi
- VS_ENV_CMD=""
-
if test "x$VS_COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
[$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
index 7e0d8373..b5da891d 100644
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
@@ -1129,7 +1129,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util
Util.getMessage ("Version.product", Util.getMessage ("Version.number"))));
// <d48911> Do not introduce invalid escape characters into comment! <daz>
//stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file));
- stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file.replace (File.separatorChar, '/')));
///////////////
// This SHOULD work, but there's a bug in the JDK.
@@ -1146,8 +1145,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util
else
formatter.setTimeZone (java.util.TimeZone.getDefault ());
- stream.println ("* " + formatter.format (new Date ()));
-
// <daz>
///////////////
diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
index b2fd98a5..1a6f8035 100644
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
@@ -154,7 +154,6 @@ public class MC {
groupName);
pw.println("//");
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
- pw.printMsg("// Generated from input file @ on @", inFile, new Date());
pw.println();
}
diff --git a/hotspot/make/linux/makefiles/jsig.make b/hotspot/make/linux/makefiles/jsig.make
index 6290db5a..9838a50a 100644
--- a/hotspot/make/linux/makefiles/jsig.make
+++ b/hotspot/make/linux/makefiles/jsig.make
@@ -63,7 +63,6 @@ $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make
index ffc0ec5c..25858536 100644
--- a/hotspot/make/linux/makefiles/saproc.make
+++ b/hotspot/make/linux/makefiles/saproc.make
@@ -46,6 +46,11 @@ SASRCFILES = $(SASRCDIR)/salibelf.c \
$(SASRCDIR)/LinuxDebuggerLocal.c \
$(AGENT_DIR)/src/share/native/sadis.c
+# wrap memcpy
+ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
+ SASRCFILES += $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp
+endif
+
-include $(HS_ALT_MAKE)/linux/makefiles/saproc.make
SAMAPFILE = $(SASRCDIR)/mapfile
@@ -107,7 +112,6 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make
index 1985db07..408b0cc9 100644
--- a/hotspot/make/linux/makefiles/vm.make
+++ b/hotspot/make/linux/makefiles/vm.make
@@ -359,7 +359,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/hotspot/make/pic.make b/hotspot/make/pic.make
index 0e61ad93..3d85546c 100644
--- a/hotspot/make/pic.make
+++ b/hotspot/make/pic.make
@@ -30,7 +30,7 @@ include $(GAMMADIR)/make/scm.make
ifneq ($(OSNAME), windows)
ifndef LP64
- PARTIAL_NONPIC=1
+ PARTIAL_NONPIC=0
endif
PIC_ARCH = ppc arm
ifneq ("$(filter $(PIC_ARCH),$(BUILDARCH))","")
diff --git a/hotspot/make/windows/create_obj_files.sh b/hotspot/make/windows/create_obj_files.sh
index 5449d866..ad734beb 100644
--- a/hotspot/make/windows/create_obj_files.sh
+++ b/hotspot/make/windows/create_obj_files.sh
@@ -113,8 +113,8 @@ case "${TYPE}" in
"shark") Src_Dirs="${BASE_PATHS}" ;;
esac
-COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_*"
-COMPILER1_SPECIFIC_FILES="c1_*"
+COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_* shenandoahBarrierSetC2.cpp shenandoahSupport.cpp"
+COMPILER1_SPECIFIC_FILES="c1_* shenandoahBarrierSetC1.cpp"
SHARK_SPECIFIC_FILES="shark"
ZERO_SPECIFIC_FILES="zero"
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index f3581c16..79d4aed9 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -53,7 +53,11 @@ CXX=cl.exe
# improving the quality of crash log stack traces involving jvm.dll.
# These are always used in all compiles
-CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX
+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /GS
+
+!if "$(MSC_VER)" > "1910"
+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /GS /arch:IA32
+!endif
# Let's add debug information when Full Debug Symbols is enabled
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
@@ -159,6 +163,12 @@ COMPILER_NAME=VS2017
!if "$(MSC_VER)" == "1913"
COMPILER_NAME=VS2017
!endif
+!if "$(MSC_VER)" == "1914"
+COMPILER_NAME=VS2017
+!endif
+!if "$(MSC_VER)" == "1916"
+COMPILER_NAME=VS2019
+!endif
!endif
# By default, we do not want to use the debug version of the msvcrt.dll file
@@ -308,6 +318,21 @@ MT=mt.exe
SAFESEH_FLAG = /SAFESEH
!endif
+!if "$(COMPILER_NAME)" == "VS2019"
+PRODUCT_OPT_OPTION = /O2 /Oy-
+FASTDEBUG_OPT_OPTION = /O2 /Oy-
+DEBUG_OPT_OPTION = /Od
+GX_OPTION = /EHsc
+LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
+# Manifest Tool - used in VS2005 and later to adjust manifests stored
+# as resources inside build artifacts.
+!if "x$(MT)" == "x"
+MT=mt.exe
+!endif
+SAFESEH_FLAG = /SAFESEH
+!endif
+
!if "$(BUILDARCH)" == "i486"
LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS)
!endif
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 776e58e5..520d190d 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -143,7 +143,7 @@ SA_LFLAGS = $(SA_LFLAGS) -map -debug
SA_LFLAGS = /SAFESEH $(SA_LFLAGS)
!endif
-SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG)
+SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG) /GS
# Note that we do not keep sawindbj.obj around as it would then
# get included in the dumpbin command in build_vm_def.sh
diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make
index f26cad6e..b46354a5 100644
--- a/hotspot/make/windows/makefiles/vm.make
+++ b/hotspot/make/windows/makefiles/vm.make
@@ -32,9 +32,9 @@ COMMONSRC=$(WorkSpace)\src
ALTSRC=$(WorkSpace)\src\closed
!ifdef RELEASE
-CXX_FLAGS=$(CXX_FLAGS) /D "PRODUCT"
+CXX_FLAGS=$(CXX_FLAGS) /D "PRODUCT" /GS
!else
-CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT"
+CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT" /GS
!endif
!if "$(Variant)" == "compiler1"
@@ -129,7 +129,7 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
!if "$(USE_PRECOMPILED_HEADER)" != "0"
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
-!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017"
+!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019"
# VS2012 and later require this object file to be listed:
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
!endif
diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
index 8eb031e3..cec35b75 100644
--- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
@@ -53,7 +53,7 @@ define_pd_global(intx, BackEdgeThreshold, 100000);
define_pd_global(intx, OnStackReplacePercentage, 140);
define_pd_global(intx, ConditionalMoveLimit, 3);
define_pd_global(intx, FLOATPRESSURE, 64);
-define_pd_global(intx, FreqInlineSize, 768);
+define_pd_global(intx, FreqInlineSize, 325);
define_pd_global(intx, MinJumpTableSize, 10);
define_pd_global(intx, INTPRESSURE, 25);
define_pd_global(intx, InteriorEntryAlignment, 16);
diff --git a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
index 3c59c96c..b5ce1cfa 100644
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
@@ -236,6 +236,11 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseSHA, false);
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
UseMontgomeryMultiplyIntrinsic = true;
}
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
index d7240e87..bd893e13 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -382,6 +382,11 @@ void VM_Version::initialize() {
}
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
index 3a4246c6..46b3e32e 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
@@ -628,6 +628,11 @@ void VM_Version::get_processor_features() {
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
// Adjust RTM (Restricted Transactional Memory) flags
if (!supports_rtm() && UseRTMLocking) {
// Can't continue because UseRTMLocking affects UseBiasedLocking flag
diff --git a/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp
new file mode 100644
index 00000000..0c4edeaa
--- /dev/null
+++ b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2018-2020. All rights reserved.
+ */
+
+#if defined( __GNUC__ ) && \
+(__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+#include <string.h>
+
+#if (defined AMD64) || (defined amd64)
+/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */
+asm (".symver memcpy, memcpy@GLIBC_2.2.5");
+
+extern "C"{
+ void *__wrap_memcpy(void *dest, const void *src, size_t n)
+ {
+ return memcpy(dest, src, n);
+ }
+}
+#endif
+#endif
+
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index 082c78b1..201dd959 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -1097,7 +1097,7 @@ static char* convert_into_package_name(char* name) {
char* index = strrchr(name, '/');
if (index == NULL) {
return NULL;
- } else {
+ } else {
*index = '\0'; // chop to just the package name
while ((index = strchr(name, '/')) != NULL) {
*index = '.'; // replace '/' with '.' in package name
@@ -1170,29 +1170,31 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
!class_loader.is_null() &&
parsed_name != NULL &&
parsed_name->utf8_length() >= (int)pkglen) {
- ResourceMark rm(THREAD);
- bool prohibited;
- const jbyte* base = parsed_name->base();
- if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) {
- prohibited = is_prohibited_package_slow(parsed_name);
- } else {
- char* name = parsed_name->as_C_string();
- prohibited = (strncmp(name, pkg, pkglen) == 0);
- }
- if (prohibited) {
- // It is illegal to define classes in the "java." package from
- // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader
- char* name = parsed_name->as_C_string();
- name = convert_into_package_name(name);
- assert(name != NULL, "must be");
-
- const char* fmt = "Prohibited package name: %s";
- size_t len = strlen(fmt) + strlen(name);
- char* message = NEW_RESOURCE_ARRAY(char, len);
- jio_snprintf(message, len, fmt, name);
- Exceptions::_throw_msg(THREAD_AND_LOCATION,
- vmSymbols::java_lang_SecurityException(), message);
- }
+ bool prohibited;
+ const jbyte* base = parsed_name->base();
+ if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) {
+ prohibited = is_prohibited_package_slow(parsed_name);
+ } else {
+ char* name = parsed_name->as_C_string();
+ prohibited = (strncmp(name, pkg, pkglen) == 0);
+ }
+ if (prohibited) {
+ // It is illegal to define classes in the "java." package from
+ // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader
+ char* name = parsed_name->as_C_string();
+ char* index = strrchr(name, '/');
+ assert(index != NULL, "must be");
+ *index = '\0'; // chop to just the package name
+ while ((index = strchr(name, '/')) != NULL) {
+ *index = '.'; // replace '/' with '.' in package name
+ }
+ const char* fmt = "Prohibited package name: %s";
+ size_t len = strlen(fmt) + strlen(name);
+ char* message = NEW_RESOURCE_ARRAY(char, len);
+ jio_snprintf(message, len, fmt, name);
+ Exceptions::_throw_msg(THREAD_AND_LOCATION,
+ vmSymbols::java_lang_SecurityException(), message);
+ }
}
if (!HAS_PENDING_EXCEPTION) {
@@ -1315,7 +1317,7 @@ instanceKlassHandle SystemDictionary::load_shared_class(
char* name = ik->name()->as_C_string();
Handle klass_name = java_lang_String::create_from_str(name, CHECK_0);
JavaValue result(T_OBJECT);
-
+
// load_shared_class need protected domain to handle non-bootstrap loaded class,
// so here call_virtual to call getProtectionDomainInternal function of URLClassLoader.java,
// to get protected domain and save into result.
diff --git a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp
index 1bd61b02..7b2dbba3 100644
--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp
+++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp
@@ -72,13 +72,13 @@ public:
static bool check_verification_dependencies(Klass* k, Handle class_loader,
Handle protection_domain,
char** message_buffer, TRAPS) {
- if (EnableSplitVerifierForAppCDS) {
+ if (EnableSplitVerifierForAppCDS) {
ClassVerifier split_verifier(k, THREAD);
split_verifier.verify_class(THREAD);
if (HAS_PENDING_EXCEPTION) {
return false; // use the existing exception
}
- }
+ }
return true;
}
};
diff --git a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
index 90f49027..18162856 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
@@ -21,10 +21,9 @@
*
*/
+#include "precompiled.hpp"
#include "owstTaskTerminator.hpp"
-#include "precompiled/precompiled.hpp"
-
bool OWSTTaskTerminator::exit_termination(size_t tasks, TerminatorTerminator* terminator) {
return tasks > 0 || (terminator != NULL && terminator->should_exit_termination());
}
diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp
index fd750b10..93fa1173 100644
--- a/hotspot/src/share/vm/opto/compile.hpp
+++ b/hotspot/src/share/vm/opto/compile.hpp
@@ -316,7 +316,7 @@ class Compile : public Phase {
bool _has_unsafe_access; // True if the method _may_ produce faults in unsafe loads or stores.
bool _has_stringbuilder; // True StringBuffers or StringBuilders are allocated
bool _has_boxed_value; // True if a boxed object is allocated
- int _max_vector_size; // Maximum size of generated vectors
+ uint _max_vector_size; // Maximum size of generated vectors
uint _trap_hist[trapHistLength]; // Cumulative traps
bool _trap_can_recompile; // Have we emitted a recompiling trap?
uint _decompile_count; // Cumulative decompilation counts.
@@ -581,8 +581,8 @@ class Compile : public Phase {
void set_has_stringbuilder(bool z) { _has_stringbuilder = z; }
bool has_boxed_value() const { return _has_boxed_value; }
void set_has_boxed_value(bool z) { _has_boxed_value = z; }
- int max_vector_size() const { return _max_vector_size; }
- void set_max_vector_size(int s) { _max_vector_size = s; }
+ uint max_vector_size() const { return _max_vector_size; }
+ void set_max_vector_size(uint s) { _max_vector_size = s; }
void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; }
uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; }
bool trap_can_recompile() const { return _trap_can_recompile; }
diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp
index 317c21d2..4a8fb107 100644
--- a/hotspot/src/share/vm/opto/memnode.cpp
+++ b/hotspot/src/share/vm/opto/memnode.cpp
@@ -2329,7 +2329,9 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) {
st->Opcode() == Op_StoreVector ||
Opcode() == Op_StoreVector ||
phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw ||
- (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI), // expanded ClearArrayNode
+ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || // expanded ClearArrayNode
+ (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || // initialization by arraycopy
+ (is_mismatched_access() || mem->as_Store()->is_mismatched_access()),
err_msg_res("no mismatched stores, except on raw memory: %s %s", NodeClassNames[Opcode()], NodeClassNames[st->Opcode()]));
if (st->in(MemNode::Address)->eqv_uncast(address) &&
diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp
index da0c6dd6..a9ef4f91 100644
--- a/hotspot/src/share/vm/opto/parse1.cpp
+++ b/hotspot/src/share/vm/opto/parse1.cpp
@@ -958,7 +958,7 @@ void Parse::do_exits() {
// stores. We want to quarantee the same behaviour as on platforms
// with total store order, although this is not required by the Java
// memory model. So as with finals, we add a barrier here.
- if (wrote_final() PPC64_ONLY(|| (wrote_volatile() && method()->is_initializer()))) {
+ if (method()->is_initializer() && (wrote_final() PPC64_ONLY(|| wrote_volatile()))) {
// This method (which must be a constructor by the rules of Java)
// wrote a final. The effects of all initializations must be
// committed to memory before any code after the constructor
diff --git a/hotspot/src/share/vm/opto/superword.cpp b/hotspot/src/share/vm/opto/superword.cpp
index a14210ee..2b7e7af2 100644
--- a/hotspot/src/share/vm/opto/superword.cpp
+++ b/hotspot/src/share/vm/opto/superword.cpp
@@ -1480,7 +1480,9 @@ void SuperWord::output() {
#endif
}
}
- C->set_max_vector_size(max_vlen_in_bytes);
+ if (max_vlen_in_bytes > C->max_vector_size()) {
+ C->set_max_vector_size(max_vlen_in_bytes);
+ }
}
//------------------------------vector_opd---------------------------
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index ebb5e114..5dad53a7 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -2174,7 +2174,7 @@ void Arguments::set_bytecode_flags() {
void Arguments::set_boxtype_cached_max_flags() {
if (!AggressiveOpts) {
if (!FLAG_IS_DEFAULT(BoxTypeCachedMax)) {
- int size = 1024;
+ int const size = 1024;
char buffer[size];
jio_snprintf(buffer, size, "java.lang.Long.LongCache.high=" INTX_FORMAT, BoxTypeCachedMax);
add_property(buffer);
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index f5182ea7..3242c666 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -67,6 +67,9 @@
#ifdef TARGET_OS_FAMILY_bsd
# include "os_bsd.inline.hpp"
#endif
+#ifndef _MSC_VER
+#define _MSC_VER 1916
+#endif
# include <signal.h>
diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp
index c30ebc28..4be74356 100644
--- a/hotspot/src/share/vm/runtime/vm_version.cpp
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp
@@ -142,7 +142,12 @@ const char* Abstract_VM_Version::vm_name() {
const char* Abstract_VM_Version::vm_vendor() {
- return "Huawei Technologies Co., Ltd";
+#ifdef VENDOR
+ return VENDOR;
+#else
+ return JDK_Version::is_gte_jdk17x_version() ?
+ "Oracle Corporation" : "Sun Microsystems Inc.";
+#endif
}
@@ -226,6 +231,8 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
#elif _MSC_VER == 1900
#define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)"
+ #elif _MSC_VER == 1910
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.0 (VS2017)"
#elif _MSC_VER == 1911
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)"
#elif _MSC_VER == 1912
@@ -237,7 +244,7 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#elif _MSC_VER == 1915
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)"
#elif _MSC_VER == 1916
- #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.9 (VS2017)"
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 16.2 (VS2017)"
#elif _MSC_VER == 1920
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.0 (VS2019)"
#elif _MSC_VER == 1921
diff --git a/hotspot/test/runtime/appcds/UnusedCPDuringDump.java b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java
new file mode 100644
index 00000000..7ad92392
--- /dev/null
+++ b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018, 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.
+ *
+ */
+
+/*
+ * @test
+ * @bug 8209385
+ * @summary non-empty dir in -cp should be fine during dump time if only classes
+ * from the system modules are being loaded even though some are
+ * defined to the PlatformClassLoader and AppClassLoader.
+ * @library /testlibrary
+ * @compile test-classes/Hello.java
+ * @run main/othervm -Dtest.cds.copy.child.stdout=false UnusedCPDuringDump
+ */
+
+import java.io.File;
+import com.oracle.java.testlibrary.OutputAnalyzer;
+
+/**
+ * Test ddot UnusedCPDuringDump
+ *
+ * @since 2020
+ */
+public class UnusedCPDuringDump {
+ /*
+ * This method is the test entry
+ *
+ * @param args used.
+ * @return Nothing.
+ * @throws RuntimeException On test failed.
+ */
+ public static void main(String[] args) throws Exception {
+ File dir = new File(System.getProperty("user.dir"));
+ File emptydir = new File(dir, "emptydir");
+ emptydir.mkdir();
+ String appJar = JarBuilder.getOrCreateHelloJar();
+ OutputAnalyzer output = TestCommon.dump(dir.getPath(),
+ TestCommon.list("sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo",
+ "com/sun/tools/sjavac/client/ClientMain"));
+ TestCommon.checkDump(output);
+ String jsaOpt = "-XX:SharedArchiveFile=" + TestCommon.getCurrentArchiveName();
+ TestCommon.run("-cp", appJar, jsaOpt, "Hello")
+ .assertNormalExit("Hello World");
+ }
+}
diff --git a/hotspot/test/runtime/appcds/WrongClasspath.java b/hotspot/test/runtime/appcds/WrongClasspath.java
new file mode 100644
index 00000000..87e35adb
--- /dev/null
+++ b/hotspot/test/runtime/appcds/WrongClasspath.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014, 2018, 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.
+ *
+ */
+
+/*
+ * @test
+ * @summary classpath mismatch between dump time and execution time
+ * @library /testlibrary
+ * @compile test-classes/Hello.java
+ * @run main WrongClasspath
+ */
+
+import com.oracle.java.testlibrary.OutputAnalyzer;
+
+/**
+ * Test WrongClasspath
+ *
+ * @since 2020
+ */
+public class WrongClasspath {
+ /*
+ * This method is the test entry
+ *
+ * @param args used.
+ * @return Nothing.
+ * @throws RuntimeException On test failed.
+ */
+ public static void main(String[] args) throws Exception {
+ String appJar = JarBuilder.getOrCreateHelloJar();
+ // Dump an archive with a specified JAR file in -classpath
+ TestCommon.testDump(appJar, TestCommon.list("Hello"));
+ // Then try to execute the archive without -classpath -- it should fail
+ TestCommon.run(
+ /* "-cp", appJar, */ // <- uncomment this and the execution should succeed
+ "Hello");
+ }
+}
diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk
index 6c5eb432..763c968e 100644
--- a/jdk/make/CompileDemos.gmk
+++ b/jdk/make/CompileDemos.gmk
@@ -250,6 +250,7 @@ define SetupJVMTIDemo
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CXXFLAGS := $$($1_CXXFLAGS), \
LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)), \
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
diff --git a/jdk/make/CompileLaunchers.gmk b/jdk/make/CompileLaunchers.gmk
index 9bd19ae9..3e5ae94e 100644
--- a/jdk/make/CompileLaunchers.gmk
+++ b/jdk/make/CompileLaunchers.gmk
@@ -490,9 +490,9 @@ UNPACKEXE_DEBUG_SYMBOLS := true
# It's also linked incrementally, producing a .ilk file that needs to
# be kept away.
ifeq ($(OPENJDK_TARGET_OS), windows)
- BUILD_UNPACKEXE_LDEXE := $(CC)
+ BUILD_UNPACKEXE_LDEXE := $(LD)
EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
- EXE_OUT_OPTION := -Fe
+ EXE_OUT_OPTION := -out:
# With the current way unpack200 is built, debug symbols aren't supported
# anyway.
UNPACKEXE_DEBUG_SYMBOLS :=
@@ -512,6 +512,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
EXCLUDE_FILES := jni.cpp, \
LANG := $(UNPACKEXE_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
-DFULL, \
CFLAGS_release := -DPRODUCT, \
@@ -520,7 +521,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
CFLAGS_macosx := -fPIC, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
- LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
+ LDFLAGS_windows := -incremental, \
LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
index 9368a9d5..71d87c37 100644
--- a/jdk/make/lib/Awt2dLibraries.gmk
+++ b/jdk/make/lib/Awt2dLibraries.gmk
@@ -52,6 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_CFLAGS), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
@@ -470,6 +471,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
INCLUDE_FILES := $(LIBAWT_FILES), \
LANG := $(LIBAWT_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
ASFLAGS := $(LIBAWT_ASFLAGS), \
MAPFILE := $(LIBAWT_MAPFILE), \
@@ -631,6 +633,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
$(X_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
@@ -672,6 +675,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
-DCMS_DONT_USE_FAST_FLOOR \
$(SHARED_LIBRARY_FLAGS) \
@@ -739,6 +743,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
@@ -914,6 +919,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
AccelGlyphCache.c, \
LANG := C++, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
@@ -1205,6 +1211,7 @@ ifndef BUILD_HEADLESS_ONLY
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk
index 8dffeebd..7fec6342 100644
--- a/jdk/make/lib/CoreLibraries.gmk
+++ b/jdk/make/lib/CoreLibraries.gmk
@@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -224,6 +225,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
MAPFILE := $(LIBJAVA_MAPFILE), \
@@ -288,6 +290,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
@@ -329,13 +332,14 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
EXCLUDE_FILES := main.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
- LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
+ LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
@@ -440,6 +444,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBJLI_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -541,6 +546,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
diff --git a/jdk/make/lib/NetworkingLibraries.gmk b/jdk/make/lib/NetworkingLibraries.gmk
index 347c3237..f826c66d 100644
--- a/jdk/make/lib/NetworkingLibraries.gmk
+++ b/jdk/make/lib/NetworkingLibraries.gmk
@@ -65,6 +65,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBNET_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
diff --git a/jdk/make/lib/NioLibraries.gmk b/jdk/make/lib/NioLibraries.gmk
index 6c9c46a3..54c9c29e 100644
--- a/jdk/make/lib/NioLibraries.gmk
+++ b/jdk/make/lib/NioLibraries.gmk
@@ -181,6 +181,7 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
diff --git a/jdk/make/lib/SecurityLibraries.gmk b/jdk/make/lib/SecurityLibraries.gmk
index 62226836..9e732ec6 100644
--- a/jdk/make/lib/SecurityLibraries.gmk
+++ b/jdk/make/lib/SecurityLibraries.gmk
@@ -194,6 +194,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
@@ -239,6 +240,7 @@ ifeq ($(ENABLE_INTREE_EC), yes)
$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
LANG := C++, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
diff --git a/jdk/make/lib/ServiceabilityLibraries.gmk b/jdk/make/lib/ServiceabilityLibraries.gmk
index 31ffff62..02fded0d 100644
--- a/jdk/make/lib/ServiceabilityLibraries.gmk
+++ b/jdk/make/lib/ServiceabilityLibraries.gmk
@@ -83,6 +83,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/socket \
@@ -148,6 +149,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
-I$(JDK_TOPDIR)/src/share/transport/export \
-I$(JDK_TOPDIR)/src/share/back/export \
@@ -252,6 +254,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
@@ -296,7 +299,7 @@ endif
BUILD_LIBMANAGEMENT_EXCLUDES :=
-BUILD_LIBMANAGEMENT_CFLAGS += -I$(JDK_TOPDIR)/src/share/native/sun/management
+BUILD_LIBMANAGEMENT_CFLAGS += -I$(JDK_TOPDIR)/src/share/native/sun/management -DPSAPI_VERSION=1
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
@@ -375,6 +378,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
@@ -403,6 +407,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk
index b59a9462..0ea9ba84 100644
--- a/jdk/make/lib/SoundLibraries.gmk
+++ b/jdk/make/lib/SoundLibraries.gmk
@@ -201,6 +201,7 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
PLATFORM_API_LinuxOS_ALSA_Ports.c, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE \
diff --git a/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java b/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
index 83973ef0..fc33a4ef 100644
--- a/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
+++ b/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
@@ -691,9 +691,6 @@ OUTER: for (int i = 0; i < n; i += m) {
throws FileNotFoundException, IOException {
BufferedReader in = new BufferedReader(new FileReader(theTemplateFileName));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName)));
- out.println(commentStart +
- " This file was generated AUTOMATICALLY from a template file " +
- new java.util.Date() + commentEnd);
int marklen = commandMarker.length();
LOOP: while(true) {
try {
diff --git a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
index c23dd231..1443fb04 100644
--- a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
+++ b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co. Ltd. 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
diff --git a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
index a8cce6eb..70563b58 100644
--- a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
+++ b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co. Ltd. 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
diff --git a/jdk/src/share/classes/java/io/ObjectInputStream.java b/jdk/src/share/classes/java/io/ObjectInputStream.java
index d8da694e..cdc78242 100644
--- a/jdk/src/share/classes/java/io/ObjectInputStream.java
+++ b/jdk/src/share/classes/java/io/ObjectInputStream.java
@@ -410,6 +410,11 @@ public class ObjectInputStream
new sun.security.action.GetBooleanAction(
"printFastSerializer")).booleanValue();
+ /**
+ * Magic number that is written to the stream header when using fastserilizer.
+ */
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
+
/**
* Creates an ObjectInputStream that reads from the specified InputStream.
* A serialization stream header is read from the stream and verified.
@@ -762,7 +767,7 @@ public class ObjectInputStream
* Cache the class meta during serialization.
* Only used in FastSerilizer.
*/
- protected static ConcurrentHashMap<String,Class<?>> nameToClass = new ConcurrentHashMap<>();
+ private static ConcurrentHashMap<String,Class<?>> nameToClass = new ConcurrentHashMap<>();
/**
* Load the local class equivalent of the specified stream class
@@ -1007,7 +1012,7 @@ public class ObjectInputStream
if (s0 != STREAM_MAGIC) {
throw new StreamCorruptedException(
- String.format("invalid stream header: %04X%04X, and FastSerializer is activated", s0, s1));
+ String.format("invalid stream header: %04X%04X", s0, s1));
}
if (!fastSerializerEscapeMode) {
diff --git a/jdk/src/share/classes/java/io/ObjectOutputStream.java b/jdk/src/share/classes/java/io/ObjectOutputStream.java
index 3890efc3..23c1fff5 100644
--- a/jdk/src/share/classes/java/io/ObjectOutputStream.java
+++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java
@@ -250,6 +250,11 @@ public class ObjectOutputStream
new sun.security.action.GetBooleanAction(
"printFastSerializer")).booleanValue();
+ /**
+ * Magic number that is written to the stream header when using fastserilizer.
+ */
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
+
/**
* Creates an ObjectOutputStream that writes to the specified OutputStream.
* This constructor writes the serialization stream header to the
diff --git a/jdk/src/share/classes/java/io/ObjectStreamClass.java b/jdk/src/share/classes/java/io/ObjectStreamClass.java
index fce3c347..5b8364b8 100644
--- a/jdk/src/share/classes/java/io/ObjectStreamClass.java
+++ b/jdk/src/share/classes/java/io/ObjectStreamClass.java
@@ -290,7 +290,7 @@ public class ObjectStreamClass implements Serializable {
*
* @return the flags for this class described by this descriptor
*/
- public byte getFlags(Object serialStream) {
+ byte getFlags(Object serialStream) {
byte flags = 0;
if (externalizable) {
flags |= ObjectStreamConstants.SC_EXTERNALIZABLE;
diff --git a/jdk/src/share/classes/java/io/ObjectStreamConstants.java b/jdk/src/share/classes/java/io/ObjectStreamConstants.java
index 59179a6e..23f72b43 100644
--- a/jdk/src/share/classes/java/io/ObjectStreamConstants.java
+++ b/jdk/src/share/classes/java/io/ObjectStreamConstants.java
@@ -38,11 +38,6 @@ public interface ObjectStreamConstants {
*/
final static short STREAM_MAGIC = (short)0xaced;
- /**
- * Magic number that is written to the stream header when using fastserilizer.
- */
- static final short STREAM_MAGIC_FAST = (short)0xdeca;
-
/**
* Version number that is written to the stream header.
*/
diff --git a/jdk/src/share/classes/sun/awt/FontConfiguration.java b/jdk/src/share/classes/sun/awt/FontConfiguration.java
index 93e38e06..0657b07b 100644
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java
@@ -266,6 +266,15 @@ public abstract class FontConfiguration {
private File findFontConfigFile(String javaLib) {
String baseName = javaLib + File.separator + "fontconfig";
File configFile;
+ String useFontConfig = System.getProperty("useFontConfig");
+ if (FontUtilities.isLinux && (useFontConfig == null || !useFontConfig.equals("true"))) {
+ foundOsSpecificFile = false;
+ configFile = findImpl(baseName);
+ if (configFile != null) {
+ return configFile;
+ }
+ return null;
+ }
String osMajorVersion = null;
if (osVersion != null && osName != null) {
configFile = findImpl(baseName + "." + osName + "." + osVersion);
diff --git a/jdk/src/share/classes/sun/font/FontScaler.java b/jdk/src/share/classes/sun/font/FontScaler.java
index fa3e2754..8271b9fe 100644
--- a/jdk/src/share/classes/sun/font/FontScaler.java
+++ b/jdk/src/share/classes/sun/font/FontScaler.java
@@ -94,11 +94,7 @@ public abstract class FontScaler implements DisposerRecord {
boolean.class, int.class};
try {
- if (FontUtilities.isOpenJDK) {
scalerClass = Class.forName("sun.font.FreetypeFontScaler");
- } else {
- scalerClass = Class.forName("sun.font.T2KFontScaler");
- }
} catch (ClassNotFoundException e) {
scalerClass = NullFontScaler.class;
}
diff --git a/jdk/src/share/classes/sun/font/FontUtilities.java b/jdk/src/share/classes/sun/font/FontUtilities.java
index 04a4f9f5..525874bd 100644
--- a/jdk/src/share/classes/sun/font/FontUtilities.java
+++ b/jdk/src/share/classes/sun/font/FontUtilities.java
@@ -124,7 +124,7 @@ public final class FontUtilities {
jreLibDirName + File.separator + "fonts";
File lucidaFile = new File(jreFontDirName + File.separator
+ LUCIDA_FILE_NAME);
- isOpenJDK = !lucidaFile.exists();
+ isOpenJDK = true;
String debugLevel =
System.getProperty("sun.java2d.debugfonts");
diff --git a/jdk/src/share/classes/sun/font/SunFontManager.java b/jdk/src/share/classes/sun/font/SunFontManager.java
index 2f34b8ca..9e2de3cf 100644
--- a/jdk/src/share/classes/sun/font/SunFontManager.java
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java
@@ -438,11 +438,17 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
/* Create the font configuration and get any font path
* that might be specified.
*/
- fontConfig = createFontConfiguration();
- if (isOpenJDK()) {
- String[] fontInfo = getDefaultPlatformFont();
- defaultFontName = fontInfo[0];
- defaultFontFileName = fontInfo[1];
+ try {
+ fontConfig = createFontConfiguration();
+ if (isOpenJDK()) {
+ String[] fontInfo = getDefaultPlatformFont();
+ defaultFontName = fontInfo[0];
+ defaultFontFileName = fontInfo[1];
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("initialize default Font fail,start use HuaweiJDK font");
+ FontUtilities.isOpenJDK = false;
}
String extraFontPath = fontConfig.getExtraFontPath();
diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
index 7647daaa..1f75e7cb 100644
--- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
+++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2020 Huawei Group Holding Limited. 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
diff --git a/jdk/src/share/native/java/lang/System.c b/jdk/src/share/native/java/lang/System.c
index 758cfabb..ff80b0ab 100644
--- a/jdk/src/share/native/java/lang/System.c
+++ b/jdk/src/share/native/java/lang/System.c
@@ -110,13 +110,13 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x)
/* Third party may overwrite these values. */
#ifndef VENDOR
-#define VENDOR "Huawei Technologies Co., Ltd"
+#define VENDOR "Oracle Corporation"
#endif
#ifndef VENDOR_URL
-#define VENDOR_URL "http://jdk.rnd.huawei.com/"
+#define VENDOR_URL "http://java.oracle.com/"
#endif
#ifndef VENDOR_URL_BUG
-#define VENDOR_URL_BUG "http://jdk.rnd.huawei.com/"
+#define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/"
#endif
#define JAVA_MAX_SUPPORTED_VERSION 52
diff --git a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native/sun/font/freetypeScaler.c
index a6915dbd..0b6c9eff 100644
--- a/jdk/src/share/native/sun/font/freetypeScaler.c
+++ b/jdk/src/share/native/sun/font/freetypeScaler.c
@@ -43,6 +43,7 @@
#include FT_SYNTHESIS_H
#include FT_LCD_FILTER_H
#include FT_MODULE_H
+#include FT_LCD_FILTER_H
#include "fontscaler.h"
diff --git a/jdk/src/solaris/classes/sun/awt/FcFontManager.java b/jdk/src/solaris/classes/sun/awt/FcFontManager.java
index 0b3ef6a8..5707f53c 100644
--- a/jdk/src/solaris/classes/sun/awt/FcFontManager.java
+++ b/jdk/src/solaris/classes/sun/awt/FcFontManager.java
@@ -73,12 +73,14 @@ public class FcFontManager extends SunFontManager {
getFontConfigManager().initFontConfigFonts(false);
FontConfigManager.FcCompFont[] fontConfigFonts =
getFontConfigManager().getFontConfigFonts();
- for (int i=0; i<fontConfigFonts.length; i++) {
- if ("sans".equals(fontConfigFonts[i].fcFamily) &&
- 0 == fontConfigFonts[i].style) {
- info[0] = fontConfigFonts[i].firstFont.familyName;
- info[1] = fontConfigFonts[i].firstFont.fontFile;
- break;
+ if (fontConfigFonts != null) {
+ for (int i = 0; i < fontConfigFonts.length; i++) {
+ if ("sans".equals(fontConfigFonts[i].fcFamily) &&
+ 0 == fontConfigFonts[i].style) {
+ info[0] = fontConfigFonts[i].firstFont.familyName;
+ info[1] = fontConfigFonts[i].firstFont.fontFile;
+ break;
+ }
}
}
/* Absolute last ditch attempt in the face of fontconfig problems.
@@ -86,7 +88,7 @@ public class FcFontManager extends SunFontManager {
* up so we don't NPE.
*/
if (info[0] == null) {
- if (fontConfigFonts.length > 0 &&
+ if (fontConfigFonts != null && fontConfigFonts.length > 0 &&
fontConfigFonts[0].firstFont.fontFile != null) {
info[0] = fontConfigFonts[0].firstFont.familyName;
info[1] = fontConfigFonts[0].firstFont.fontFile;
diff --git a/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties
new file mode 100644
index 00000000..ff14dfd0
--- /dev/null
+++ b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties
@@ -0,0 +1,70 @@
+##
+version=1
+#
+## Component Font Mappings
+
+# Chinese mapping
+serif.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+serif.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+serif.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+serif.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+sansserif.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+sansserif.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+sansserif.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+sansserif.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+monospaced.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+monospaced.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+monospaced.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+monospaced.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+dialog.plain.chinese-arphic1=-misc-wenquanyi micro hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialog.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialog.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialog.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+dialoginput.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialoginput.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialoginput.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+dialoginput.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+# English mapping
+serif.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+serif.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+serif.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+serif.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+
+sansserif.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+sansserif.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+sansserif.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+sansserif.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+
+monospaced.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+monospaced.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+monospaced.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+monospaced.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+
+dialog.plain.latin-1=-misc-roboto-medium-r-normal--*-%d-*-*-p-*-iso8859-1
+dialog.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+dialog.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+dialog.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+
+
+dialoginput.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+dialoginput.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+dialoginput.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+dialoginput.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
+#
+## Search Sequences
+#
+
+sequence.allfonts=latin-1
+sequence.fallback=chinese-arphic1
+## Exclusion Ranges
+#
+## Font File Names
+filename.-misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-iso8859-1=/usr/share/fonts/dejavu/DejaVuSans.ttf
+filename.-misc-roboto-medium-r-normal--*-%d-*-*-p-*-iso8859-1=$JRE_LIB_FONTS/Roboto-Regular.ttf
+filename.-misc-wenquanyi_zen_hei-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc
+filename.-misc-wenquanyi_micro_hei-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/wqy-microhei/wqy-microhei.ttc
diff --git a/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties
new file mode 100644
index 00000000..298a6de8
--- /dev/null
+++ b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties
@@ -0,0 +1,45 @@
+version=1
+
+# Component Font Mappings
+
+
+serif.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+serif.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+serif.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+serif.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+
+
+sansserif.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+sansserif.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+sansserif.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+sansserif.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+
+
+monospaced.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+monospaced.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+monospaced.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+monospaced.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+
+
+dialog.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialog.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialog.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialog.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+
+
+dialoginput.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialoginput.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialoginput.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+dialoginput.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1
+
+# Search Sequences
+# Search Sequences
+
+sequence.allfonts=latin-1
+sequence.allfonts=latin-1
+
+# Exclusion Ranges
+# Exclusion Ranges
+
+# Font File Names
+# Font File Names
diff --git a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
index 6c28d201..a64dcda4 100644
--- a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
+++ b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
@@ -159,7 +159,10 @@ public class MFontConfiguration extends FontConfiguration {
} else if (osName.equals("Linux")) {
try {
File f;
- if ((f = new File("/etc/fedora-release")).canRead()) {
+ if ((f = new File("/etc/euleros-release")).canRead()) {
+ osName = "Euler";
+ osVersion = getVersionString(f);
+ } else if ((f = new File("/etc/fedora-release")).canRead()) {
osName = "Fedora";
osVersion = getVersionString(f);
} else if ((f = new File("/etc/redhat-release")).canRead()) {
diff --git a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
index 9b3ff819..bb9be2cc 100644
--- a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
+++ b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
@@ -63,6 +63,11 @@
#include "sun_nio_ch_FileDispatcherImpl.h"
#include "java_lang_Long.h"
+#if defined(aarch64)
+ __asm__(".symver fcntl64,fcntl@GLIBC_2.17");
+#elif defined(amd64)
+ __asm__(".symver fcntl64,fcntl@GLIBC_2.2.5");
+#endif
static int preCloseFD = -1; /* File descriptor to which we dup other fd's
before closing them for real */
diff --git a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties
index 5c8883f3..8a9417d7 100644
--- a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties
+++ b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties
@@ -194,6 +194,12 @@ sequence.monospaced.GBK=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-e
sequence.dialog.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.dialoginput.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
+sequence.serif.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
+sequence.sansserif.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
+sequence.monospaced.UTF-8=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-extb
+sequence.dialog.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
+sequence.dialoginput.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
+
sequence.serif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.sansserif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.monospaced.GB18030=chinese-gb18030,alphabetic,dingbats,symbol,chinese-gb18030-extb
@@ -238,12 +244,12 @@ sequence.dialoginput.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol
sequence.fallback=lucida,symbols,\
- chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
+ chinese-ms936,chinese-hkscs,chinese-ms950,chinese-gb18030,\
japanese,korean,chinese-ms950-extb,chinese-ms936-extb,georgian
# Exclusion Ranges
-exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-f8ff
+exclusion.alphabetic=0700-1e9f,1f00-20ab,20ad-f8ff
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index 9980e8ab..c1747608 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -281,6 +281,13 @@ define SetupNativeCompilation
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
endif
+ ifeq ($(OPENJDK_TARGET_OS), linux) # only on linux
+ ifneq ($(OPENJDK_TARGET_CPU_ARCH), aarch64) # not need on the arm arch
+ ifneq (,$$(strip $$($1_EXTRA_FILES)))
+ $1_SRCS += $$($1_EXTRA_FILES)
+ endif
+ endif
+ endif
ifeq (,$$($1_SRCS))
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
@@ -487,7 +494,7 @@ define SetupNativeCompilation
$$($1_DEBUGINFO_FILES): $$($1_TARGET)
$(RM) $$@
$(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ $(CD) $$(@D)
$(TOUCH) $$@
endif
endif # No MacOS X support