openjdk-17: fix crash on arm devices

Closes https://github.com/termux/termux-packages/issues/7214.
This commit is contained in:
Leonid Pliushch 2021-08-25 23:00:44 +03:00
parent 473374291d
commit 08b1ffd458
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 41b658386efad9d3023a023e3b4bfaf5f814250d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BA=AF=E6=B4=84?= <1840686745@qq.com>
Date: Thu, 26 Aug 2021 03:53:25 +0800
Subject: [PATCH] Fix StackOverflowError on ARM (#2)
---
src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
index ff462ad27..f0314a729 100644
--- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
@@ -85,8 +85,14 @@
#endif
address os::current_stack_pointer() {
+#if defined(__clang__) || defined(__llvm__)
+ void *sp;
+ __asm__("mov %0, " SPELL_REG_SP : "=r"(sp));
+ return (address) sp;
+#else
register address sp __asm__ (SPELL_REG_SP);
return sp;
+#endif
}
char* os::non_memory_address_word() {
--
2.30.2

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Java development kit and runtime"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=17.0
TERMUX_PKG_REVISION=10
TERMUX_PKG_REVISION=11
TERMUX_PKG_SRCURL=https://github.com/termux/openjdk-mobile-termux/archive/1b8989d1093511649da820fd108794dd424279d9.tar.gz
TERMUX_PKG_SHA256=d72bf1d6cb29134e34af762082a0fb83ce867b4794f7d5661d6bb9784c4e19c8
TERMUX_PKG_DEPENDS="freetype, libandroid-shmem, libandroid-spawn, libiconv, zlib, xorgproto, libx11, libxcursor, libxext, cups, fontconfig, libpng, libxrender, libxtst, libxrandr, libxt, libxi"