mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
OpenJDK17: add recipe for 17.0.7+3 version
This commit is contained in:
267
dev-lang/openjdk/openjdk17-17.0.7.3.recipe
Normal file
267
dev-lang/openjdk/openjdk17-17.0.7.3.recipe
Normal file
@@ -0,0 +1,267 @@
|
||||
SUMMARY="An open-source implementation of the Java Platform, SE"
|
||||
DESCRIPTION="OpenJDK (Open Java Development Kit) is a free and open source \
|
||||
implementation of the Java Platform, Standard Edition (Java SE). It is the \
|
||||
result of an effort Sun Microsystems began in 2006.
|
||||
|
||||
The implementation is licensed under the GNU General Public License (GNU GPL) \
|
||||
with a linking exception. Were it not for the GPL linking exception, components \
|
||||
that linked to the Java class library would be subject to the terms of the GPL \
|
||||
license. OpenJDK is the official Java SE 8 reference implementation."
|
||||
HOMEPAGE="https://openjdk.java.net/"
|
||||
COPYRIGHT="2007-2022 Oracle and/or its affiliates."
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
jdkBuild="jdk-${portVersion%.*}+${portVersion##*.}"
|
||||
srcGitRev="7d96ea2c4f4b1cb9a256731f2332eb4f1e8d1c41"
|
||||
SOURCE_URI="https://github.com/zelenoviy/jdk17u/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="0ae2a041d0e5bf5591c4057d6201dddb3de3eb563913d3be734de8f98b6ac9cc"
|
||||
SOURCE_DIR="jdk17u-$srcGitRev"
|
||||
SOURCE_FILENAME="jdk17u-$jdkBuild-$srcGitRev.tar.gz"
|
||||
SOURCE_URI_2="https://ftp.osuosl.org/pub/blfs/conglomeration/openjdk/jtreg-4.2-b13-433.tar.gz"
|
||||
CHECKSUM_SHA256_2="ddf76660d4f519302b9c6310febcde3ff45313c435fff4e157854d1ff50785b1"
|
||||
SOURCE_DIR_2="jtreg"
|
||||
PATCHES="openjdk17-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
elf.h
|
||||
"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
DISABLE_SOURCE_PACKAGE="yes"
|
||||
# at least as long as Ant and a complete SDK image are part of the "sources" package
|
||||
|
||||
PROVIDES="
|
||||
openjdk17$secondaryArchSuffix = $portVersion compat >= 17
|
||||
java:environment = 17
|
||||
"
|
||||
REQUIRES="
|
||||
openjdk17${secondaryArchSuffix}_jre == $portVersion
|
||||
"
|
||||
|
||||
PROVIDES_default="
|
||||
openjdk17${secondaryArchSuffix}_default = $portVersion
|
||||
cmd:jar = $portVersion compat >= 17
|
||||
cmd:jarsigner = $portVersion compat >= 17
|
||||
cmd:java = $portVersion compat >= 17
|
||||
cmd:javac = $portVersion compat >= 17
|
||||
cmd:javadoc = $portVersion compat >= 17
|
||||
cmd:javah = $portVersion compat >= 17
|
||||
cmd:javap = $portVersion compat >= 17
|
||||
cmd:jcmd = $portVersion compat >= 17
|
||||
cmd:jconsole = $portVersion compat >= 17
|
||||
cmd:jdb = $portVersion compat >= 17
|
||||
cmd:jinfo = $portVersion compat >= 17
|
||||
cmd:jmap = $portVersion compat >= 17
|
||||
cmd:jps = $portVersion compat >= 17
|
||||
cmd:jstack = $portVersion compat >= 17
|
||||
cmd:jstat = $portVersion compat >= 17
|
||||
cmd:jstatd = $portVersion compat >= 17
|
||||
cmd:keytool = $portVersion compat >= 17
|
||||
cmd:rmiregistry = $portVersion compat >= 17
|
||||
cmd:serialver = $portVersion compat >= 17
|
||||
"
|
||||
REQUIRES_default="
|
||||
openjdk17$secondaryArchSuffix == $portVersion
|
||||
"
|
||||
CONFLICTS_default="
|
||||
openjdk8${secondaryArchSuffix}_default
|
||||
openjdk9${secondaryArchSuffix}_default
|
||||
openjdk10${secondaryArchSuffix}_default
|
||||
openjdk11${secondaryArchSuffix}_default
|
||||
openjdk12${secondaryArchSuffix}_default
|
||||
openjdk13${secondaryArchSuffix}_default
|
||||
openjdk14${secondaryArchSuffix}_default
|
||||
openjdk15${secondaryArchSuffix}_default
|
||||
openjdk16${secondaryArchSuffix}_default
|
||||
"
|
||||
|
||||
PROVIDES_jre="
|
||||
openjdk17${secondaryArchSuffix}_jre = $portVersion compat >= 17
|
||||
java:runtime = 17
|
||||
"
|
||||
REQUIRES_jre="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
ca_root_certificates_java
|
||||
dejavu
|
||||
"
|
||||
|
||||
SUMMARY_sources="JDK source files, demos and examples"
|
||||
PROVIDES_sources="
|
||||
openjdk17${secondaryArchSuffix}_sources = $portVersion compat >= 17
|
||||
"
|
||||
REQUIRES_sources="
|
||||
openjdk17$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
gcc${secondaryArchSuffix}_syslibs
|
||||
gcc${secondaryArchSuffix}_syslibs_devel
|
||||
java:environment == 16
|
||||
ca_root_certificates
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libLLVM_12$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cpio
|
||||
cmd:clang >= 12
|
||||
cmd:clang++ >= 12
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:zip
|
||||
cmd:gawk
|
||||
cmd:hostname
|
||||
cmd:find
|
||||
cmd:unzip
|
||||
cmd:unzipsfx
|
||||
cmd:head
|
||||
cmd:file
|
||||
cmd:which
|
||||
cmd:autoconf
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:true
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
source /system/data/profile.d/openjdk16.sh
|
||||
export PATH=$JDK16_HOME/bin:$PATH
|
||||
export COMPANY=HaikuPorts
|
||||
|
||||
ln -sfn $sourceDir2 jtreg
|
||||
|
||||
cp $portDir/additional-files/elf.h src/hotspot/share/utilities
|
||||
|
||||
# If ASLR is enabled, the JVM can fail to find a large enough area for
|
||||
# the heap.
|
||||
export DISABLE_ASLR=1
|
||||
|
||||
# Verify that we can allocate a large enough heap before starting.
|
||||
java -XX:ThreadStackSize=1536 -Xmx1024M -version
|
||||
|
||||
freeTypeHeaders=$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/freetype2
|
||||
freeTypeLib=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir
|
||||
|
||||
export CC="/bin/clang"
|
||||
export CXX="/bin/clang++"
|
||||
|
||||
bash ./configure \
|
||||
--with-freetype-include="${freeTypeHeaders}" \
|
||||
--with-freetype-lib="${freeTypeLib}" \
|
||||
--with-jtreg=./jtreg \
|
||||
--with-version-build="${portVersion//*.}" \
|
||||
--with-version-pre="" \
|
||||
--with-version-opt="" \
|
||||
--with-num-cores=1 \
|
||||
--with-memory-size=3072 \
|
||||
--with-toolchain-type=clang \
|
||||
--enable-javac-server \
|
||||
--disable-warnings-as-errors \
|
||||
--with-extra-cflags="-w" \
|
||||
--with-extra-cxxflags="-w"
|
||||
|
||||
make images LOG=info
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# install the generated SDK image dir
|
||||
jdkDir=$libDir/openjdk17
|
||||
|
||||
mkdir -p $jdkDir
|
||||
cp -a build/haiku-*/images/jdk/* $jdkDir
|
||||
|
||||
# set up the cacerts link
|
||||
ln -sf $dataDir/ssl/java/cacerts $jdkDir/conf/security/
|
||||
|
||||
# symlink the executables to binDir
|
||||
mkdir -p $prefix/bin
|
||||
bins="jar jarsigner javac javadoc javah javap jcmd jconsole jdb jinfo \
|
||||
jmap jps jstack jstat jstatd serialver"
|
||||
bins_runtime="java keytool rmiregistry"
|
||||
man_runtime=""
|
||||
for b in $bins $bins_runtime; do
|
||||
symlinkRelative -s $jdkDir/bin/$b $prefix/bin
|
||||
done
|
||||
for b in $bins_runtime; do
|
||||
man_runtime+=" $jdkDir/man/man1/$b.1"
|
||||
done
|
||||
|
||||
mkdir -p $dataDir/profile.d
|
||||
|
||||
# create a profile.d file that sets up JAVA_HOME
|
||||
jdkProfile=$dataDir/profile.d/openjdk.sh
|
||||
echo "JAVA_HOME=$jdkDir" > $jdkProfile
|
||||
echo "export JAVA_HOME" >> $jdkProfile
|
||||
|
||||
# create a profile.d file that sets up JDK17_HOME
|
||||
jdkProfile=$dataDir/profile.d/openjdk17.sh
|
||||
echo "JDK17_HOME=$jdkDir" > $jdkProfile
|
||||
echo "export JDK17_HOME" >> $jdkProfile
|
||||
|
||||
# create a profile.d file that sets up JRE17_HOME
|
||||
jreProfile=$dataDir/profile.d/openjre17.sh
|
||||
echo "JRE17_HOME=$(getPackagePrefix jre)/$relativeLibDir/openjdk17" > $jreProfile
|
||||
echo "export JRE17_HOME" >> $jreProfile
|
||||
|
||||
find $jdkDir -name '*.diz' -o -name '*.debuginfo' -delete
|
||||
# not for jre
|
||||
mv $jdkDir/lib/libattach.so $jdkDir/lib/ct.sym $prefix
|
||||
|
||||
packageEntries sources \
|
||||
$jdkDir/lib/src.zip \
|
||||
$jdkDir/demo
|
||||
|
||||
packageEntries jre \
|
||||
$jdkDir/bin/java \
|
||||
$jdkDir/bin/jrunscript \
|
||||
$jdkDir/bin/keytool \
|
||||
$jdkDir/bin/rmiregistry \
|
||||
$jdkDir/conf \
|
||||
$jdkDir/legal \
|
||||
$jdkDir/lib \
|
||||
$jdkDir/release \
|
||||
$dataDir/profile.d/openjre17.sh \
|
||||
$man_runtime
|
||||
|
||||
mkdir -p $jdkDir/lib
|
||||
mv $prefix/libattach.so $prefix/ct.sym $jdkDir/lib/
|
||||
|
||||
packageEntries default \
|
||||
$prefix/bin \
|
||||
$dataDir/profile.d/openjdk.sh
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
export DISABLE_ASLR=1
|
||||
make test JOBS=1 TEST=jdk_lang
|
||||
make test-only JOBS=1 TEST=jdk_util
|
||||
make test-only JOBS=1 TEST=jdk_math
|
||||
make test-only JOBS=1 TEST=jdk_io
|
||||
make test-only JOBS=1 TEST=jdk_nio
|
||||
make test-only JOBS=1 TEST=jdk_net
|
||||
make test-only JOBS=1 TEST=jdk_time
|
||||
make test-only JOBS=1 TEST=jdk_rmi
|
||||
make test-only JOBS=1 TEST=jdk_security
|
||||
make test-only JOBS=1 TEST=jdk_text
|
||||
make test-only JOBS=1 TEST=jdk_management
|
||||
make test-only JOBS=1 TEST=jdk_instrument
|
||||
make test-only JOBS=1 TEST=jdk_jmx
|
||||
make test-only JOBS=1 TEST=jdk_jdi
|
||||
}
|
||||
200
dev-lang/openjdk/patches/openjdk17-17.0.7.3.patchset
Normal file
200
dev-lang/openjdk/patches/openjdk17-17.0.7.3.patchset
Normal file
@@ -0,0 +1,200 @@
|
||||
From 509673bb73a3e2ba063d95973c82cda8306b73bf Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 27 Mar 2023 11:16:13 +1000
|
||||
Subject: Fix build for x86 arch
|
||||
|
||||
|
||||
diff --git a/src/hotspot/cpu/x86/interp_masm_x86.cpp b/src/hotspot/cpu/x86/interp_masm_x86.cpp
|
||||
index d92885d..eacc83a 100644
|
||||
--- a/src/hotspot/cpu/x86/interp_masm_x86.cpp
|
||||
+++ b/src/hotspot/cpu/x86/interp_masm_x86.cpp
|
||||
@@ -1339,7 +1339,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
movptr(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()));
|
||||
|
||||
// Free entry
|
||||
- movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), (int32_t)NULL_WORD);
|
||||
+ movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), NULL_WORD);
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
biased_locking_exit(obj_reg, header_reg, done);
|
||||
diff --git a/src/hotspot/cpu/x86/interp_masm_x86.hpp b/src/hotspot/cpu/x86/interp_masm_x86.hpp
|
||||
index 0aecb6b..779aea3 100644
|
||||
--- a/src/hotspot/cpu/x86/interp_masm_x86.hpp
|
||||
+++ b/src/hotspot/cpu/x86/interp_masm_x86.hpp
|
||||
@@ -183,7 +183,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void empty_expression_stack() {
|
||||
movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
|
||||
// NULL last_sp until next java call
|
||||
- movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
|
||||
+ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
|
||||
NOT_LP64(empty_FPU_stack());
|
||||
}
|
||||
|
||||
diff --git a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
|
||||
index 492ec59..1f9e7d7 100644
|
||||
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
|
||||
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
|
||||
@@ -2054,13 +2054,13 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
|
||||
if (CheckJNICalls) {
|
||||
// clear_pending_jni_exception_check
|
||||
- __ movptr(Address(thread, JavaThread::pending_jni_exception_check_fn_offset()), NULL_WORD);
|
||||
+ __ movptr(Address(thread, JavaThread::pending_jni_exception_check_fn_offset()), (intptr_t)NULL_WORD);
|
||||
}
|
||||
|
||||
if (!is_critical_native) {
|
||||
// reset handle block
|
||||
__ movptr(rcx, Address(thread, JavaThread::active_handles_offset()));
|
||||
- __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD);
|
||||
+ __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD);
|
||||
|
||||
// Any exception pending?
|
||||
__ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
|
||||
diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
|
||||
index 654066a..848790d 100644
|
||||
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
|
||||
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
|
||||
@@ -2781,7 +2781,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ jcc(Assembler::equal, L_key256_top);
|
||||
|
||||
//key128 begins here
|
||||
- __ movptr(pos, 0); // init pos before L_multiBlock_loopTop
|
||||
+ __ movptr(pos, (intptr_t)0); // init pos before L_multiBlock_loopTop
|
||||
|
||||
#define CTR_DoFour(opc, src_reg) \
|
||||
__ opc(xmm_result0, src_reg); \
|
||||
@@ -2947,11 +2947,11 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ ret(0);
|
||||
|
||||
__ BIND (L_key192_top);
|
||||
- __ movptr(pos, 0); // init pos before L_multiBlock_loopTop
|
||||
+ __ movptr(pos, (intptr_t)0); // init pos before L_multiBlock_loopTop
|
||||
__ jmp(L_multiBlock_loopTop[1]); //key192
|
||||
|
||||
__ BIND (L_key256_top);
|
||||
- __ movptr(pos, 0); // init pos before L_multiBlock_loopTop
|
||||
+ __ movptr(pos, (intptr_t)0); // init pos before L_multiBlock_loopTop
|
||||
__ jmp(L_multiBlock_loopTop[2]); //key192
|
||||
|
||||
return start;
|
||||
diff --git a/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp b/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
|
||||
index dcbb373..f024a6c 100644
|
||||
--- a/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
|
||||
+++ b/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
|
||||
@@ -205,7 +205,7 @@ address TemplateInterpreterGenerator::generate_return_entry_for(TosState state,
|
||||
// Restore stack bottom in case i2c adjusted stack
|
||||
__ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
|
||||
// and NULL it as marker that esp is now tos until next java call
|
||||
- __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
|
||||
+ __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (intptr_t)NULL_WORD);
|
||||
|
||||
__ restore_bcp();
|
||||
__ restore_locals();
|
||||
@@ -253,7 +253,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||
#endif // _LP64
|
||||
|
||||
// NULL last_sp until next java call
|
||||
- __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
|
||||
+ __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (intptr_t)NULL_WORD);
|
||||
__ restore_bcp();
|
||||
__ restore_locals();
|
||||
const Register thread = NOT_LP64(rcx) LP64_ONLY(r15_thread);
|
||||
@@ -1434,7 +1434,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
|
||||
Interpreter::_rethrow_exception_entry = __ pc();
|
||||
// Restore sp to interpreter_frame_last_sp even though we are going
|
||||
// to empty the expression stack for the exception processing.
|
||||
- __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
|
||||
+ __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (intptr_t)NULL_WORD);
|
||||
// rax: exception
|
||||
// rdx: return address/pc that threw exception
|
||||
__ restore_bcp(); // r13/rsi points to call/send
|
||||
@@ -1580,7 +1580,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
|
||||
|
||||
// Restore the last_sp and null it out
|
||||
__ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
|
||||
- __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
|
||||
+ __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (intptr_t)NULL_WORD);
|
||||
|
||||
__ restore_bcp();
|
||||
__ restore_locals();
|
||||
diff --git a/src/hotspot/os_cpu/haiku_x86/haiku_x86_32.S b/src/hotspot/os_cpu/haiku_x86/haiku_x86_32.S
|
||||
index e803056..9cbf35d 100644
|
||||
--- a/src/hotspot/os_cpu/haiku_x86/haiku_x86_32.S
|
||||
+++ b/src/hotspot/os_cpu/haiku_x86/haiku_x86_32.S
|
||||
@@ -475,20 +475,6 @@ ci_CopyLeft:
|
||||
# Support for void Copy::conjoint_jlongs_atomic(jlong* from,
|
||||
# jlong* to,
|
||||
# size_t count)
|
||||
- #
|
||||
- # 32-bit
|
||||
- #
|
||||
- # count treated as signed
|
||||
- #
|
||||
- # if (from > to) {
|
||||
- # while (--count >= 0) {
|
||||
- # *to++ = *from++;
|
||||
- # }
|
||||
- # } else {
|
||||
- # while (--count >= 0) {
|
||||
- # to[count] = from[count];
|
||||
- # }
|
||||
- # }
|
||||
.p2align 4,,15
|
||||
.type _Copy_conjoint_jlongs_atomic,@function
|
||||
_Copy_conjoint_jlongs_atomic:
|
||||
diff --git a/src/hotspot/os_cpu/haiku_x86/os_haiku_x86.cpp b/src/hotspot/os_cpu/haiku_x86/os_haiku_x86.cpp
|
||||
index 5c9c4f9..878630d 100644
|
||||
--- a/src/hotspot/os_cpu/haiku_x86/os_haiku_x86.cpp
|
||||
+++ b/src/hotspot/os_cpu/haiku_x86/os_haiku_x86.cpp
|
||||
@@ -214,16 +214,6 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
|
||||
return true;
|
||||
}
|
||||
|
||||
-#ifndef AMD64
|
||||
- // Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs
|
||||
- // This can happen in any running code (currently more frequently in
|
||||
- // interpreter code but has been seen in compiled code)
|
||||
- if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) {
|
||||
- fatal("An irrecoverable SI_KERNEL SIGSEGV has occurred due "
|
||||
- "to unstable signal handling in this distribution.");
|
||||
- }
|
||||
-#endif // AMD64
|
||||
-
|
||||
// Handle ALL stack overflow variations here
|
||||
if (sig == SIGSEGV) {
|
||||
address addr = (address) info->si_addr;
|
||||
@@ -570,7 +560,7 @@ void os::print_register_info(outputStream *st, const void *context) {
|
||||
|
||||
void os::setup_fpu() {
|
||||
#ifndef AMD64
|
||||
- address fpu_cntrl = StubRoutines::addr_fpu_cntrl_wrd_std();
|
||||
+ address fpu_cntrl = StubRoutines::x86::addr_fpu_cntrl_wrd_std();
|
||||
__asm__ volatile ( "fldcw (%0)" :
|
||||
: "r" (fpu_cntrl) : "memory");
|
||||
#endif // !AMD64
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From da915b3046e86de050144fc2101afcbfe8fc5ca3 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 1 Apr 2023 20:04:08 +1000
|
||||
Subject: Fix build with clang
|
||||
|
||||
|
||||
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
|
||||
index 4999123..c7e176f 100644
|
||||
--- a/make/autoconf/flags-cflags.m4
|
||||
+++ b/make/autoconf/flags-cflags.m4
|
||||
@@ -543,7 +543,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# are sure to conform to the same standard. Unfortunately neither our sources nor
|
||||
# our toolchains are in a condition to support that. But what we loosely aim for is
|
||||
# C99 level.
|
||||
- if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user