I5JGAF: fix coding style and describe error
This commit is contained in:
parent
d17b61fc20
commit
0aa49de140
149
Improve_AlgorithmConstraints_checkAlgorithm_performance.patch
Normal file
149
Improve_AlgorithmConstraints_checkAlgorithm_performance.patch
Normal file
@ -0,0 +1,149 @@
|
||||
From 4e520a51acbb192a0df844fcca247998d7fb8854 Mon Sep 17 00:00:00 2001
|
||||
From: wangkun <wangkun49@huawei.com>
|
||||
Date: Thu, 28 Jul 2022 17:19:32 +0800
|
||||
Subject: [PATCH 2/3] add
|
||||
Improve-AlgorithmConstraints-checkAlgorithm-performa.patch
|
||||
|
||||
---
|
||||
.../util/AbstractAlgorithmConstraints.java | 30 +++++++------------
|
||||
.../util/DisabledAlgorithmConstraints.java | 20 +++++++++----
|
||||
.../util/LegacyAlgorithmConstraints.java | 12 ++++++--
|
||||
3 files changed, 35 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/jdk/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java b/jdk/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java
|
||||
index 944958de..5c760292 100644
|
||||
--- a/jdk/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java
|
||||
+++ b/jdk/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java
|
||||
@@ -77,34 +77,26 @@ public abstract class AbstractAlgorithmConstraints
|
||||
return new ArrayList<>(Arrays.asList(algorithmsInProperty));
|
||||
}
|
||||
|
||||
- static boolean checkAlgorithm(List<String> algorithms, String algorithm,
|
||||
+ static boolean checkAlgorithm(Set<String> algorithms, String algorithm,
|
||||
AlgorithmDecomposer decomposer) {
|
||||
if (algorithm == null || algorithm.length() == 0) {
|
||||
throw new IllegalArgumentException("No algorithm name specified");
|
||||
}
|
||||
|
||||
Set<String> elements = null;
|
||||
- for (String item : algorithms) {
|
||||
- if (item == null || item.isEmpty()) {
|
||||
- continue;
|
||||
- }
|
||||
+ if (algorithms.contains(algorithm.toLowerCase())) {
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
- // check the full name
|
||||
- if (item.equalsIgnoreCase(algorithm)) {
|
||||
+ // decompose the algorithm into sub-elements
|
||||
+ if (elements == null) {
|
||||
+ elements = decomposer.decompose(algorithm);
|
||||
+ }
|
||||
+ // check the element of the elements
|
||||
+ for (String element : elements) {
|
||||
+ if (algorithms.contains(element.toLowerCase())) {
|
||||
return false;
|
||||
}
|
||||
-
|
||||
- // decompose the algorithm into sub-elements
|
||||
- if (elements == null) {
|
||||
- elements = decomposer.decompose(algorithm);
|
||||
- }
|
||||
-
|
||||
- // check the items of the algorithm
|
||||
- for (String element : elements) {
|
||||
- if (item.equalsIgnoreCase(element)) {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
return true;
|
||||
diff --git a/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java b/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
|
||||
index 51e62563..6ff26bf2 100644
|
||||
--- a/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
|
||||
+++ b/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
|
||||
@@ -96,7 +96,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints {
|
||||
new DisabledAlgorithmConstraints(PROPERTY_JAR_DISABLED_ALGS);
|
||||
}
|
||||
|
||||
- private final List<String> disabledAlgorithms;
|
||||
+ private final Set<String> disabledAlgorithms;
|
||||
private final Constraints algorithmConstraints;
|
||||
|
||||
public static DisabledAlgorithmConstraints certPathConstraints() {
|
||||
@@ -128,11 +128,11 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints {
|
||||
public DisabledAlgorithmConstraints(String propertyName,
|
||||
AlgorithmDecomposer decomposer) {
|
||||
super(decomposer);
|
||||
- disabledAlgorithms = getAlgorithms(propertyName);
|
||||
+ List<String> disabledAlgorithmsList = getAlgorithms(propertyName);
|
||||
|
||||
// Check for alias
|
||||
int ecindex = -1, i = 0;
|
||||
- for (String s : disabledAlgorithms) {
|
||||
+ for (String s : disabledAlgorithmsList) {
|
||||
if (s.regionMatches(true, 0,"include ", 0, 8)) {
|
||||
if (s.regionMatches(true, 8, PROPERTY_DISABLED_EC_CURVES, 0,
|
||||
PROPERTY_DISABLED_EC_CURVES.length())) {
|
||||
@@ -143,11 +143,19 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints {
|
||||
i++;
|
||||
}
|
||||
if (ecindex > -1) {
|
||||
- disabledAlgorithms.remove(ecindex);
|
||||
- disabledAlgorithms.addAll(ecindex,
|
||||
+ disabledAlgorithmsList.remove(ecindex);
|
||||
+ disabledAlgorithmsList.addAll(ecindex,
|
||||
getAlgorithms(PROPERTY_DISABLED_EC_CURVES));
|
||||
}
|
||||
- algorithmConstraints = new Constraints(propertyName, disabledAlgorithms);
|
||||
+ algorithmConstraints = new Constraints(propertyName, disabledAlgorithmsList);
|
||||
+
|
||||
+ disabledAlgorithms = new HashSet<String>();
|
||||
+ for (String algorithm : disabledAlgorithmsList) {
|
||||
+ if (algorithm == null || algorithm.isEmpty()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ disabledAlgorithms.add(algorithm.toLowerCase());
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/jdk/src/share/classes/sun/security/util/LegacyAlgorithmConstraints.java b/jdk/src/share/classes/sun/security/util/LegacyAlgorithmConstraints.java
|
||||
index 4e7502fb..01d0447a 100644
|
||||
--- a/jdk/src/share/classes/sun/security/util/LegacyAlgorithmConstraints.java
|
||||
+++ b/jdk/src/share/classes/sun/security/util/LegacyAlgorithmConstraints.java
|
||||
@@ -28,6 +28,7 @@ package sun.security.util;
|
||||
import java.security.AlgorithmParameters;
|
||||
import java.security.CryptoPrimitive;
|
||||
import java.security.Key;
|
||||
+import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -40,12 +41,19 @@ public class LegacyAlgorithmConstraints extends AbstractAlgorithmConstraints {
|
||||
public final static String PROPERTY_TLS_LEGACY_ALGS =
|
||||
"jdk.tls.legacyAlgorithms";
|
||||
|
||||
- private final List<String> legacyAlgorithms;
|
||||
+ private final Set<String> legacyAlgorithms;
|
||||
|
||||
public LegacyAlgorithmConstraints(String propertyName,
|
||||
AlgorithmDecomposer decomposer) {
|
||||
super(decomposer);
|
||||
- legacyAlgorithms = getAlgorithms(propertyName);
|
||||
+ List<String> legacyAlgorithmsList = getAlgorithms(propertyName);
|
||||
+ legacyAlgorithms = new HashSet<String>();
|
||||
+ for (String algorithm : legacyAlgorithmsList) {
|
||||
+ if (algorithm == null || algorithm.isEmpty()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ legacyAlgorithms.add(algorithm.toLowerCase());
|
||||
+ }
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
|
||||
291
fix_wrap_memcpy_undefined_gcc10_3.patch
Normal file
291
fix_wrap_memcpy_undefined_gcc10_3.patch
Normal file
@ -0,0 +1,291 @@
|
||||
diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk
|
||||
index 763c968e..6c5eb432 100644
|
||||
--- a/jdk/make/CompileDemos.gmk
|
||||
+++ b/jdk/make/CompileDemos.gmk
|
||||
@@ -250,7 +250,6 @@ 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 29211f83..2ac718fc 100644
|
||||
--- a/jdk/make/CompileLaunchers.gmk
|
||||
+++ b/jdk/make/CompileLaunchers.gmk
|
||||
@@ -512,7 +512,6 @@ $(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, \
|
||||
diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
|
||||
index 71d87c37..9368a9d5 100644
|
||||
--- a/jdk/make/lib/Awt2dLibraries.gmk
|
||||
+++ b/jdk/make/lib/Awt2dLibraries.gmk
|
||||
@@ -52,7 +52,6 @@ $(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), \
|
||||
@@ -471,7 +470,6 @@ $(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), \
|
||||
@@ -633,7 +631,6 @@ 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, \
|
||||
@@ -675,7 +672,6 @@ $(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) \
|
||||
@@ -743,7 +739,6 @@ $(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, \
|
||||
@@ -919,7 +914,6 @@ $(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), \
|
||||
@@ -1211,7 +1205,6 @@ 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 b444abf9..e43fc2ed 100644
|
||||
--- a/jdk/make/lib/CoreLibraries.gmk
|
||||
+++ b/jdk/make/lib/CoreLibraries.gmk
|
||||
@@ -113,7 +113,6 @@ $(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) \
|
||||
@@ -225,7 +224,6 @@ $(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), \
|
||||
@@ -287,7 +285,6 @@ $(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,7 +326,6 @@ $(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, \
|
||||
@@ -442,7 +438,6 @@ $(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) \
|
||||
@@ -544,7 +539,6 @@ $(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 f826c66d..347c3237 100644
|
||||
--- a/jdk/make/lib/NetworkingLibraries.gmk
|
||||
+++ b/jdk/make/lib/NetworkingLibraries.gmk
|
||||
@@ -65,7 +65,6 @@ $(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 54c9c29e..6c9c46a3 100644
|
||||
--- a/jdk/make/lib/NioLibraries.gmk
|
||||
+++ b/jdk/make/lib/NioLibraries.gmk
|
||||
@@ -181,7 +181,6 @@ 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 10ab8043..5b9ec17f 100644
|
||||
--- a/jdk/make/lib/SecurityLibraries.gmk
|
||||
+++ b/jdk/make/lib/SecurityLibraries.gmk
|
||||
@@ -196,7 +196,6 @@ $(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 \
|
||||
@@ -242,7 +241,6 @@ 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, \
|
||||
@@ -300,7 +298,6 @@ ifeq ($(ENABLE_KAE), true)
|
||||
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/org/openeuler/security/openssl, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
- EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/org/openeuler/security/openssl, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2kae/mapfile-vers, \
|
||||
diff --git a/jdk/make/lib/ServiceabilityLibraries.gmk b/jdk/make/lib/ServiceabilityLibraries.gmk
|
||||
index 2c80ffc0..19c8601d 100644
|
||||
--- a/jdk/make/lib/ServiceabilityLibraries.gmk
|
||||
+++ b/jdk/make/lib/ServiceabilityLibraries.gmk
|
||||
@@ -83,7 +83,6 @@ $(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) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
|
||||
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
|
||||
-I$(JDK_TOPDIR)/src/share/transport/socket \
|
||||
@@ -149,7 +148,6 @@ $(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) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
|
||||
-I$(JDK_TOPDIR)/src/share/transport/export \
|
||||
-I$(JDK_TOPDIR)/src/share/back/export \
|
||||
@@ -255,7 +253,6 @@ $(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_WARNINGS_ARE_ERRORS), \
|
||||
CFLAGS_debug := -DJPLIS_LOGGING, \
|
||||
CFLAGS_release := -DNO_JPLIS_LOGGING, \
|
||||
@@ -379,7 +376,6 @@ $(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) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
$(BUILD_LIBHPROF_CFLAGS), \
|
||||
CFLAGS_debug := -DHPROF_LOGGING, \
|
||||
@@ -408,7 +404,6 @@ $(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) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
-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 0ea9ba84..b59a9462 100644
|
||||
--- a/jdk/make/lib/SoundLibraries.gmk
|
||||
+++ b/jdk/make/lib/SoundLibraries.gmk
|
||||
@@ -201,7 +201,6 @@ 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/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
|
||||
index 2d9bdbee..9586d20e 100644
|
||||
--- a/make/common/NativeCompilation.gmk
|
||||
+++ b/make/common/NativeCompilation.gmk
|
||||
@@ -271,6 +271,7 @@ define SetupNativeCompilation
|
||||
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
|
||||
+
|
||||
# Extract the C/C++ files.
|
||||
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
@@ -281,13 +282,20 @@ define SetupNativeCompilation
|
||||
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
|
||||
endif
|
||||
+
|
||||
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
|
||||
+ # for LDFLAGS and LDFLAGS_SUFFIX
|
||||
+ $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
+ $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
|
||||
+
|
||||
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)
|
||||
+ ifneq ($$(findstring wrap=memcpy, $$($1_LDFLAGS)$$($1_EXTRA_LDFLAGS))$$($1_EXTRA_LDFLAGS_SUFFIX),)
|
||||
+ ifeq ($$(findstring memcpy.cpp, $$($1_SRCS)),)
|
||||
+ $1_SRCS += $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
+
|
||||
ifeq (,$$($1_SRCS))
|
||||
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
|
||||
endif
|
||||
@@ -432,10 +440,6 @@ define SetupNativeCompilation
|
||||
endif
|
||||
endif
|
||||
|
||||
- # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
|
||||
- # for LDFLAGS and LDFLAGS_SUFFIX
|
||||
- $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
- $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
|
||||
ifneq (,$$($1_REAL_MAPFILE))
|
||||
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
|
||||
endif
|
||||
@ -289,8 +289,8 @@ index c5ec637a1..125983179 100644
|
||||
+ // Search path: <home>/jre/lib/<arch>/<vm>/libopenblas.so
|
||||
+ if (jvm_offset >= 0) {
|
||||
+ if (jvm_offset + strlen(library_name) + strlen(os::dll_file_extension()) < JVM_MAXPATHLEN) {
|
||||
+ strncpy(&path[jvm_offset], library_name, strlen(library_name));
|
||||
+ strncat(&path[jvm_offset], os::dll_file_extension(), strlen(os::dll_file_extension()));
|
||||
+ strncpy(&path[jvm_offset], library_name, JVM_MAXPATHLEN - jvm_offset);
|
||||
+ strncat(path, os::dll_file_extension(), strlen(os::dll_file_extension()));
|
||||
+ library = (address)os::dll_load(path, err_buf, sizeof(err_buf));
|
||||
+ }
|
||||
+ }
|
||||
|
||||
56
modify_coding_style_and_describe_error.patch
Normal file
56
modify_coding_style_and_describe_error.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 9d32c786ff6886bcd4b76e0a80eb19ce602dbe42 Mon Sep 17 00:00:00 2001
|
||||
From: wangkun <wangkun49@huawei.com>
|
||||
Date: Thu, 28 Jul 2022 17:24:52 +0800
|
||||
Subject: [PATCH 3/3] fix xx
|
||||
|
||||
---
|
||||
.../classes/org/openeuler/security/openssl/KAEDigest.java | 6 +++---
|
||||
.../classes/org/openeuler/security/openssl/KAEProvider.java | 2 --
|
||||
jdk/src/solaris/native/java/io/path_util.c | 1 -
|
||||
3 files changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDigest.java b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDigest.java
|
||||
index bb5c8681..6ff03241 100644
|
||||
--- a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDigest.java
|
||||
+++ b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDigest.java
|
||||
@@ -88,9 +88,9 @@ abstract class KAEDigest extends MessageDigestSpi implements Cloneable {
|
||||
private static class DigestContextRef extends PhantomReference<KAEDigest>
|
||||
implements Comparable<DigestContextRef> {
|
||||
|
||||
- private static ReferenceQueue<KAEDigest> referenceQueue = new ReferenceQueue<>();
|
||||
- private static Set<DigestContextRef> referenceList = new ConcurrentSkipListSet<>();
|
||||
- private static boolean disableKaeDispose = Boolean.getBoolean("kae.disableKaeDispose");
|
||||
+ private static final ReferenceQueue<KAEDigest> referenceQueue = new ReferenceQueue<>();
|
||||
+ private static final Set<DigestContextRef> referenceList = new ConcurrentSkipListSet<>();
|
||||
+ private static final boolean disableKaeDispose = Boolean.getBoolean("kae.disableKaeDispose");
|
||||
|
||||
private final long ctxAddress;
|
||||
|
||||
diff --git a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEProvider.java b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEProvider.java
|
||||
index 8ba70200..83ed8649 100644
|
||||
--- a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEProvider.java
|
||||
+++ b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEProvider.java
|
||||
@@ -104,8 +104,6 @@ public class KAEProvider extends Provider {
|
||||
if (needLog && "true".equalsIgnoreCase(props.getProperty("kae.log"))) {
|
||||
logStart(excp);
|
||||
needLog = false; // Log only once
|
||||
- } else {
|
||||
- KAEProvider.excp = null; // Ignore exception.
|
||||
}
|
||||
if (!"false".equalsIgnoreCase(props.getProperty("kae.md5"))) {
|
||||
putMD5();
|
||||
diff --git a/jdk/src/solaris/native/java/io/path_util.c b/jdk/src/solaris/native/java/io/path_util.c
|
||||
index 8a533f81..4b978206 100644
|
||||
--- a/jdk/src/solaris/native/java/io/path_util.c
|
||||
+++ b/jdk/src/solaris/native/java/io/path_util.c
|
||||
@@ -116,7 +116,6 @@ collapse(char *path)
|
||||
int nc;
|
||||
char **ix;
|
||||
int i, j;
|
||||
- char *p, *q;
|
||||
|
||||
nc = collapsible(names);
|
||||
if (nc < 2) return; /* Nothing to do */
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
|
||||
|
||||
Name: java-%{javaver}-%{origin}
|
||||
Version: %{javaver}.%{updatever}.%{buildver}
|
||||
Release: 1
|
||||
Release: 2
|
||||
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
||||
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
||||
# also included the epoch in their virtual provides. This created a
|
||||
@ -1135,6 +1135,9 @@ Patch247: 8173339-AArch64-Fix-minimum-stack-size-computations.patch
|
||||
Patch248: 8067941-TESTBUG-Fix-tests-for-OS-with-64K-page-size.patch
|
||||
|
||||
# 8u342
|
||||
Patch249: Improve_AlgorithmConstraints_checkAlgorithm_performance.patch
|
||||
Patch250: modify_coding_style_and_describe_error.patch
|
||||
Patch251: fix_wrap_memcpy_undefined_gcc10_3.patch
|
||||
|
||||
#############################################
|
||||
#
|
||||
@ -1610,6 +1613,9 @@ pushd %{top_level_dir_name}
|
||||
%patch246 -p1
|
||||
%patch247 -p1
|
||||
%patch248 -p1
|
||||
%patch249 -p1
|
||||
%patch250 -p1
|
||||
%patch251 -p1
|
||||
popd
|
||||
|
||||
# System library fixes
|
||||
@ -2234,6 +2240,12 @@ cjc.mainProgram(arg)
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jul 28 2022 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.342-b07.2
|
||||
- add modify_coding_style_and_describe_error.patch
|
||||
- add Improve_AlgorithmConstraints_checkAlgorithm_performance.patch
|
||||
- add fix_wrap_memcpy_undefined_gcc10_3.patch
|
||||
- modified implementation_of_Blas_hotspot_function_in_Intrinsics.patch
|
||||
|
||||
* Thu Jul 28 2022 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.342-b07.1
|
||||
- del hg git files
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user