From cb6eedeb1f7fa877497e6ff2aa893e8089fe6541 Mon Sep 17 00:00:00 2001 From: Richard Leitner Date: Mon, 30 Dec 2019 15:35:59 +0100 Subject: openjdk-8: update to latest ga version 242 As OpenJDK-8 is now tagging "ga" versions in addition to the "build" version the recipes are adapted to use those "ga" versions. All existing patches got re-applied and renamed. For better handling Hotspot patches now start at patch number 1001 and jdk patches at 2001. Furthermore architecture dependent patches are prefixed with the architecture they apply on. Following patches/hunks were completely dropped: - 0002-hotspot-fix-compilation-with-security-flags-enabled.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/c40a28e54185 - 0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch ostream.cpp:112 got fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f3108e56b502 - 0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916 - 0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32bc598624bd - 0020-Enable-HotSpot-builds-on-5.x-Linux-kernels.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/5af8ec63c21c - openjdk8-add-missing-linker-flags.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f175513c2c3a - openjdk8-fix-shark-stdc++11.patch fixed in hotspot jdk8u - openjdk8-fix-libpng-neon-build.patch fixed in jdk https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5d57817931e1 - aarch64-hotspot-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u Following patches were newly added: - 0011-autoconf-fix-CC-with-arguments-detection.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" - 0012-autoconf-NativeCompilation-remove-sysroot.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" Signed-off-by: Richard Leitner --- ...-hotspot-Turn-on-the-Wreturn-type-warning.patch | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch new file mode 100644 index 0000000..10dd0f7 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch @@ -0,0 +1,235 @@ +From 2cce90259f9de7b5fba7f3380cdc90b3a586aa75 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= +Date: Mon, 13 Aug 2018 16:48:32 +0100 +Subject: [PATCH 1008/1012] hotspot: Turn on the -Wreturn-type warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +|# HG changeset patch +|# User stefank +|# Date 1525453613 -3600 +|# Fri May 04 18:06:53 2018 +0100 +|# Node ID 07a1135a327362f157955d470fad5df07cc35164 +|# Parent de79964656fc652f2085dac4fe99bcc128b5a3b1 +8062808, PR3548: Turn on the -Wreturn-type warning +Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett + +Upstream-Status: Backport + +Signed-off-by: André Draszik +Signed-off-by: Richard Leitner +--- + make/linux/makefiles/gcc.make | 2 +- + src/cpu/x86/vm/x86_32.ad | 1 + + src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 1 + + src/share/vm/classfile/defaultMethods.cpp | 4 ++-- + src/share/vm/classfile/symbolTable.cpp | 4 ++-- + src/share/vm/classfile/systemDictionary.cpp | 6 +++--- + src/share/vm/memory/heapInspection.hpp | 2 +- + src/share/vm/memory/metaspaceShared.hpp | 2 +- + src/share/vm/oops/constantPool.hpp | 2 +- + src/share/vm/prims/jvm.cpp | 2 +- + src/share/vm/runtime/reflection.cpp | 2 +- + src/share/vm/runtime/sharedRuntime.cpp | 2 +- + src/share/vm/services/memTracker.hpp | 2 +- + 13 files changed, 17 insertions(+), 15 deletions(-) + +diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make +index 36b3c8ba9..cd9511e50 100644 +--- a/hotspot/make/linux/makefiles/gcc.make ++++ b/hotspot/make/linux/makefiles/gcc.make +@@ -211,7 +211,7 @@ ifeq ($(USE_CLANG), true) + WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body + endif + +-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value ++WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type + + ifeq ($(USE_CLANG),) + # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit +diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad +index f42d1a288..c8f4ee161 100644 +--- a/hotspot/src/cpu/x86/vm/x86_32.ad ++++ b/hotspot/src/cpu/x86/vm/x86_32.ad +@@ -1250,6 +1250,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo + + + Unimplemented(); ++ return 0; // Mute compiler + } + + #ifndef PRODUCT +diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +index 1a7375afc..fbf51b040 100644 +--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp ++++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +@@ -541,6 +541,7 @@ JVM_handle_linux_signal(int sig, + err.report_and_die(); + + ShouldNotReachHere(); ++ return true; // Mute compiler + } + + void os::Linux::init_thread_fpu_state(void) { +diff --git a/hotspot/src/share/vm/classfile/defaultMethods.cpp b/hotspot/src/share/vm/classfile/defaultMethods.cpp +index 4b4b4e250..196622aed 100644 +--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp ++++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp +@@ -506,7 +506,7 @@ Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method + ss.write((const char*)name->bytes(), name->utf8_length()); + ss.write((const char*)signature->bytes(), signature->utf8_length()); + ss.print(" is abstract"); +- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL); ++ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD); + } + + Symbol* MethodFamily::generate_conflicts_message(GrowableArray* methods, TRAPS) const { +@@ -521,7 +521,7 @@ Symbol* MethodFamily::generate_conflicts_message(GrowableArray* methods + ss.print("."); + ss.write((const char*)name->bytes(), name->utf8_length()); + } +- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL); ++ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD); + } + + +diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp +index ec97077b7..2621a7d62 100644 +--- a/hotspot/src/share/vm/classfile/symbolTable.cpp ++++ b/hotspot/src/share/vm/classfile/symbolTable.cpp +@@ -249,7 +249,7 @@ Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) { + MutexLocker ml(SymbolTable_lock, THREAD); + + // Otherwise, add to symbol to table +- return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL); ++ return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD); + } + + Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) { +@@ -288,7 +288,7 @@ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) { + // Grab SymbolTable_lock first. + MutexLocker ml(SymbolTable_lock, THREAD); + +- return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL); ++ return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD); + } + + Symbol* SymbolTable::lookup_only(const char* name, int len, +diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp +index da2717d36..5253afc22 100644 +--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp ++++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp +@@ -229,15 +229,15 @@ Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader + class_name->as_C_string(), + class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string())); + if (FieldType::is_array(class_name)) { +- return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL); ++ return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD); + } else if (FieldType::is_obj(class_name)) { + ResourceMark rm(THREAD); + // Ignore wrapping L and ;. + TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1, + class_name->utf8_length() - 2, CHECK_NULL); +- return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL); ++ return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD); + } else { +- return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL); ++ return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD); + } + } + +diff --git a/hotspot/src/share/vm/memory/heapInspection.hpp b/hotspot/src/share/vm/memory/heapInspection.hpp +index 09ee6602e..c5fec15c3 100644 +--- a/hotspot/src/share/vm/memory/heapInspection.hpp ++++ b/hotspot/src/share/vm/memory/heapInspection.hpp +@@ -367,7 +367,7 @@ class HeapInspection : public StackObj { + _csv_format(csv_format), _print_help(print_help), + _print_class_stats(print_class_stats), _columns(columns) {} + void heap_inspection(outputStream* st) NOT_SERVICES_RETURN; +- size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN; ++ size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0); + static void find_instances_at_safepoint(Klass* k, GrowableArray* result) NOT_SERVICES_RETURN; + private: + void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL); +diff --git a/hotspot/src/share/vm/memory/metaspaceShared.hpp b/hotspot/src/share/vm/memory/metaspaceShared.hpp +index 2f3abae6a..d58ebecb2 100644 +--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp ++++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp +@@ -93,7 +93,7 @@ class MetaspaceShared : AllStatic { + static void preload_and_dump(TRAPS) NOT_CDS_RETURN; + static int preload_and_dump(const char * class_list_path, + GrowableArray* class_promote_order, +- TRAPS) NOT_CDS_RETURN; ++ TRAPS) NOT_CDS_RETURN_(0); + + static ReservedSpace* shared_rs() { + CDS_ONLY(return _shared_rs); +diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp +index 0698eb40e..354293924 100644 +--- a/hotspot/src/share/vm/oops/constantPool.hpp ++++ b/hotspot/src/share/vm/oops/constantPool.hpp +@@ -350,7 +350,7 @@ class ConstantPool : public Metadata { + + Klass* klass_at(int which, TRAPS) { + constantPoolHandle h_this(THREAD, this); +- return klass_at_impl(h_this, which, CHECK_NULL); ++ return klass_at_impl(h_this, which, THREAD); + } + + Symbol* klass_name_at(int which); // Returns the name, w/o resolving. +diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp +index 8d7523c55..4034a8589 100644 +--- a/hotspot/src/share/vm/prims/jvm.cpp ++++ b/hotspot/src/share/vm/prims/jvm.cpp +@@ -4343,7 +4343,7 @@ JVM_ENTRY(jlong,JVM_DTraceActivate( + JVM_DTraceProvider* providers)) + JVMWrapper("JVM_DTraceActivate"); + return DTraceJSDT::activate( +- version, module_name, providers_count, providers, CHECK_0); ++ version, module_name, providers_count, providers, THREAD); + JVM_END + + JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method)) +diff --git a/hotspot/src/share/vm/runtime/reflection.cpp b/hotspot/src/share/vm/runtime/reflection.cpp +index 4b39d8ccb..9cd7b0dcb 100644 +--- a/hotspot/src/share/vm/runtime/reflection.cpp ++++ b/hotspot/src/share/vm/runtime/reflection.cpp +@@ -1093,7 +1093,7 @@ oop Reflection::invoke(instanceKlassHandle klass, methodHandle reflected_method, + } else { + if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT) + narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL); +- return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL); ++ return box((jvalue*) result.get_value_addr(), rtype, THREAD); + } + } + +diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp +index d5bea29c3..50578ad63 100644 +--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp +@@ -1041,7 +1041,7 @@ Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc, + // last java frame on stack (which includes native call frames) + vframeStream vfst(thread, true); // Do not skip and javaCalls + +- return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle())); ++ return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD); + } + + +diff --git a/hotspot/src/share/vm/services/memTracker.hpp b/hotspot/src/share/vm/services/memTracker.hpp +index 7ad2b71f4..182084373 100644 +--- a/hotspot/src/share/vm/services/memTracker.hpp ++++ b/hotspot/src/share/vm/services/memTracker.hpp +@@ -64,7 +64,7 @@ class MemTracker : AllStatic { + const NativeCallStack& stack, MEMFLAGS flag = mtNone) { } + static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { } + static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); } +- static inline Tracker get_virtual_memory_release_tracker() { } ++ static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); } + static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { } + static inline void record_thread_stack(void* addr, size_t size) { } + static inline void release_thread_stack(void* addr, size_t size) { } +-- +2.24.1 + -- cgit v1.2.3-54-g00ecf