mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
parent
be2e84dbc6
commit
a657032538
4 changed files with 126 additions and 1 deletions
73
srcpkgs/openjdk16-bootstrap/patches/FixNullPtrCast.patch
Normal file
73
srcpkgs/openjdk16-bootstrap/patches/FixNullPtrCast.patch
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
Subject: Fix cast errors with latest GCC (11.2)
|
||||||
|
Upstream: No
|
||||||
|
Author: Simon Frankenberger <simon-alpine@fraho.eu>
|
||||||
|
|
||||||
|
This patch fixes multiple casting errors reported by GCC 11.2
|
||||||
|
|
||||||
|
--- old/src/hotspot/share/oops/access.hpp
|
||||||
|
+++ new/src/hotspot/share/oops/access.hpp
|
||||||
|
@@ -294,8 +294,8 @@
|
||||||
|
static inline void arraycopy(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||||
|
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||||
|
size_t length) {
|
||||||
|
- AccessT::arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const T*>(NULL),
|
||||||
|
- dst_obj, dst_offset_in_bytes, reinterpret_cast<T*>(NULL),
|
||||||
|
+ AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast<const T*>(NULL),
|
||||||
|
+ dst_obj, dst_offset_in_bytes, static_cast<T*>(NULL),
|
||||||
|
length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -303,7 +303,7 @@
|
||||||
|
static inline void arraycopy_to_native(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||||
|
T* dst,
|
||||||
|
size_t length) {
|
||||||
|
- AccessT::arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const T*>(NULL),
|
||||||
|
+ AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast<const T*>(NULL),
|
||||||
|
NULL, 0, dst,
|
||||||
|
length);
|
||||||
|
}
|
||||||
|
@@ -313,15 +313,15 @@
|
||||||
|
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||||
|
size_t length) {
|
||||||
|
AccessT::arraycopy(NULL, 0, src,
|
||||||
|
- dst_obj, dst_offset_in_bytes, reinterpret_cast<T*>(NULL),
|
||||||
|
+ dst_obj, dst_offset_in_bytes, static_cast<T*>(NULL),
|
||||||
|
length);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||||
|
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||||
|
size_t length) {
|
||||||
|
- return AccessT::oop_arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const HeapWord*>(NULL),
|
||||||
|
- dst_obj, dst_offset_in_bytes, reinterpret_cast<HeapWord*>(NULL),
|
||||||
|
+ return AccessT::oop_arraycopy(src_obj, src_offset_in_bytes, static_cast<const HeapWord*>(NULL),
|
||||||
|
+ dst_obj, dst_offset_in_bytes, static_cast<HeapWord*>(NULL),
|
||||||
|
length);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- old/src/hotspot/cpu/x86/interp_masm_x86.cpp
|
||||||
|
+++ new/src/hotspot/cpu/x86/interp_masm_x86.cpp
|
||||||
|
@@ -1122,7 +1122,7 @@
|
||||||
|
|
||||||
|
bind(loop);
|
||||||
|
// check if current entry is used
|
||||||
|
- cmpptr(Address(rmon, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL);
|
||||||
|
+ cmpptr(Address(rmon, BasicObjectLock::obj_offset_in_bytes()), 0);
|
||||||
|
jcc(Assembler::notEqual, exception);
|
||||||
|
|
||||||
|
addptr(rmon, entry_size); // otherwise advance to next entry
|
||||||
|
--- old/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp
|
||||||
|
+++ new/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp
|
||||||
|
@@ -443,10 +443,10 @@
|
||||||
|
_from -= Interpreter::stackElementSize;
|
||||||
|
|
||||||
|
if (_num_int_args < Argument::n_int_register_parameters_c-1) {
|
||||||
|
- *_int_args++ = (*from_addr == 0) ? NULL : (intptr_t)from_addr;
|
||||||
|
+ *_int_args++ = (*from_addr == 0) ? (intptr_t) 0 : (intptr_t) from_addr;
|
||||||
|
_num_int_args++;
|
||||||
|
} else {
|
||||||
|
- *_to++ = (*from_addr == 0) ? NULL : (intptr_t) from_addr;
|
||||||
|
+ *_to++ = (*from_addr == 0) ? (intptr_t) 0 : (intptr_t) from_addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
srcpkgs/openjdk16-bootstrap/patches/fix-test-i686.patch
Normal file
17
srcpkgs/openjdk16-bootstrap/patches/fix-test-i686.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
on i686, this test is rounded slightly differently, so the string comparison asserts
|
||||||
|
fail while the actual comparison succeeds
|
||||||
|
|
||||||
|
--- a/test/hotspot/gtest/gc/shared/test_workerDataArray.cpp
|
||||||
|
+++ b/test/hotspot/gtest/gc/shared/test_workerDataArray.cpp
|
||||||
|
@@ -295,11 +295,3 @@
|
||||||
|
TEST_VM_F(UninitializedDoubleElementWorkerDataArrayTest, average_test) {
|
||||||
|
ASSERT_NEAR(6.15 / MILLIUNITS, array.average(), epsilon);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
-TEST_VM_F(UninitializedDoubleElementWorkerDataArrayTest, print_summary_on_test) {
|
||||||
|
- ASSERT_STREQ(print_expected_summary(), print_summary());
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-TEST_VM_F(UninitializedDoubleElementWorkerDataArrayTest, print_details_on_test) {
|
||||||
|
- ASSERT_STREQ(print_expected_details(), print_details());
|
||||||
|
-}
|
33
srcpkgs/openjdk16-bootstrap/patches/test-glibc2.34.patch
Normal file
33
srcpkgs/openjdk16-bootstrap/patches/test-glibc2.34.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
From f77a1a156f3da9068d012d9227c7ee0fee58f571 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Holmes <dholmes@openjdk.org>
|
||||||
|
Date: Sun, 22 Aug 2021 01:13:27 +0000
|
||||||
|
Subject: [PATCH] 8272472: StackGuardPages test doesn't build with glibc 2.34
|
||||||
|
|
||||||
|
Reviewed-by: shade, stuefe, jiefu
|
||||||
|
---
|
||||||
|
.../jtreg/runtime/StackGuardPages/exeinvoke.c | 13 +++++++++++--
|
||||||
|
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
|
||||||
|
index a46f1cef44c78..50a37001fbf33 100644
|
||||||
|
--- a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
|
||||||
|
+++ b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
|
||||||
|
@@ -68,8 +68,17 @@ static void handler(int sig, siginfo_t *si, void *unused) {
|
||||||
|
longjmp(context, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static char* altstack = NULL;
|
||||||
|
+
|
||||||
|
void set_signal_handler() {
|
||||||
|
- static char altstack[SIGSTKSZ];
|
||||||
|
+ if (altstack == NULL) {
|
||||||
|
+ // Dynamically allocated in case SIGSTKSZ is not constant
|
||||||
|
+ altstack = malloc(SIGSTKSZ);
|
||||||
|
+ if (altstack == NULL) {
|
||||||
|
+ fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n");
|
||||||
|
+ exit(7);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
stack_t ss = {
|
||||||
|
.ss_size = SIGSTKSZ,
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'openjdk16-bootstrap'
|
# Template file for 'openjdk16-bootstrap'
|
||||||
pkgname=openjdk16-bootstrap
|
pkgname=openjdk16-bootstrap
|
||||||
version=16.0.2+7
|
version=16.0.2+7
|
||||||
revision=1
|
revision=2
|
||||||
_java_ver="${version%%.*}"
|
_java_ver="${version%%.*}"
|
||||||
_jdk_update="${version#*+}"
|
_jdk_update="${version#*+}"
|
||||||
_base_version="${version%+*}"
|
_base_version="${version%+*}"
|
||||||
|
@ -48,9 +48,11 @@ checksum="b4a0e71e41a11175e8a7c1dba86ed5b0aa878413158c8d48813db1b64ac9536c
|
||||||
provides="java-environment-${version}_1 java-runtime-${version}_1"
|
provides="java-environment-${version}_1 java-runtime-${version}_1"
|
||||||
nocross=yes
|
nocross=yes
|
||||||
repository=bootstrap
|
repository=bootstrap
|
||||||
|
patch_args="-Np1 --directory=$build_wrksrc"
|
||||||
|
|
||||||
# Build is still parallel, but don't use -jN.
|
# Build is still parallel, but don't use -jN.
|
||||||
disable_parallel_build=yes
|
disable_parallel_build=yes
|
||||||
|
disable_parallel_check=yes
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
ppc64*) ;;
|
ppc64*) ;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue