java: yet another musl patch.

This commit is contained in:
Andrius Štikonas 2020-07-16 22:03:35 +01:00
parent 5632133871
commit 8d7eac7fd3
3 changed files with 79 additions and 1 deletions

View File

@ -14,6 +14,7 @@ AUX icedtea8-hotspot-stop-using-obsolete-isnanf.patch 1871 BLAKE2B b26f273922ee9
AUX icedtea8-jdk-execinfo.patch 692 BLAKE2B ca92273d0ce717176765186c9c3039d2644f3a0935d0dc5df354caf31e031fbb13a85ec8aa2b90c6f03b2e98f021d64dfc463b1e969d76c2eb90bbc4c8f30100 SHA512 75804b229d9230f5410fcd731a99448ea5d50e1fa2ce2a39cbb21c9a9f00edef6e76561fc8c19e989b738c3e97c8e7d968a70343fc1bda6736a22d04e7db105e
AUX icedtea8-jdk-fix-libjvm-load.patch 483 BLAKE2B 9d107245fe7a88a73b1ae949f54cac38bed0a763534213f940f8578dcb49b0a19001694c3aea7430cd76340eb11a45bcf3498911ec6bfe5ad5a7a29f191633ad SHA512 b135991c76b0db8fa7c363e0903624668e11eda7b54a943035c214aa4d7fc8c3e8110ed200edcec82792f3c9393150a9bd628625ddf7f3e55720ff163fbbb471
AUX icedtea8-jdk-musl.patch 5024 BLAKE2B ec3854ccbe434e71eabf81821820613c4322eb02cd42277d7fc383ba9f511e0945f2279ad13622f9e4171891845a848f697b81f4ee75ee24b9b166564eeeea2f SHA512 d2bd0a1c8637b288a0a74796e62fe3d926121270b323aff408280088296533372db87d42a690ae76743b803d30b2a2a8e9a7a3b05f457b7a65074bb39e2838e8
AUX icedtea8-os_linux-remove-glibc-dependencies.patch 2954 BLAKE2B 0983be4b18a5a28722a21bc70780559197df4553ce5deff34cfe40819c92deb48242e7792ad8e773dabe534945a1d0e067c96516393c3708c595a7d757d9caef SHA512 64fd0392235d826ded265e5b2ab5a3aecff0f45e44abf4af7815a42fd0bb7880313d585a16c15c72a365472b8429985ca7c2570bb44467e34292e35ec642a50d
AUX jamvm-1.6.0-aarch64-support.patch 23347 BLAKE2B b80462ea9d8ceb54f8039d1a2c6e161a45eceabcd5e27993dec602605397d70754bcc4c70fcc6be197f17a7d1383d6d91ae57c01063dbc55c61537f50fb71de6 SHA512 aa602103865d64dc0d53d8d46002888b99afb7b92e95f39dacd36a2d3b937006f7816826efc418d0e3b9e7b3eec5b0b01a1642e37875635577c0c5653418596c
AUX jamvm-1.6.0-opcode-guard.patch 1416 BLAKE2B 4e866f4dde142d591d3dce89f10589fd3fbd290b1429ad83ba4ba4d4dfcb91d7e9da4ea7797859337690e24a8f1ebcf39eaa5aad085d03233306db02147f18cb SHA512 396d18eaad17bc76d8316bfc8fa2553e081389deade1ce0cd72f082226a91dbd70ec983636d324243be0a502ae9e0dd91d40952f13bf77c991601e61385af728
DIST icedtea-2.6-corba-737fd3fbf139.tar.bz2 1073197 BLAKE2B af7a9a9c91511ba63835e2930e71ad442c45215f66043c6d05c636b8f3ab2803c4a0afb8ebf099b1f707ccb4850a9c4a2ecd78d7434f7c0b6ec38d1f56ba65b9 SHA512 77e81659d3314172c2b80fb1441d268edc52e0ec0bd25f9a9596e3c7a545f0694a11cc2298952d72c85965529b344493d1f2c2187cf4d38749278018fc85a6b8
@ -38,5 +39,5 @@ DIST icedtea-3.7.0.tar.xz 1487360 BLAKE2B efef75c5ac615c21310f16f50fc425c5a76076
DIST icedtea-cacao-c182f119eaad.tar.gz 4485353 BLAKE2B 5c1faa3cbbfea62f819562a01ec389f3682cf3164d06f5404d1d16359c87b37d6ae4101f7c33cde30bad4f3d52af18f0f410e36868b2c9d1280661d2340e683b SHA512 2ccb947d71b80d84b83295d473c19952e98698a1fd944fc7c12004ff1af29af2989d46fbd95b5daf95eae2fda9de7c7f88f964fa887a6345b4f57d0c490bee23
DIST icedtea-cacao-c182f119eaad.tar.xz 3056520 BLAKE2B 6b1be66ce19f491d49f1591babcd8c088e8e327f828dca3f30b8f8b04c132140f8b9f487ef6d91aed212aebab2c7c3052d79fa3f2d76d3832341d94d48e77089 SHA512 22e8a031db5f93f82b276b310c175f1e926e48d64e1e50bebe51138e0f66391cd005501491a959d31663f338f27a29ec984ac29f77078f59472856e4d08edef7
DIST icedtea-jamvm-ec18fb9e49e62dce16c5094ef1527eed619463aa.tar.gz 317187 BLAKE2B 1ca581a02be4cf5c09162687bbc90ec01b58b4910d866d11512cf17a1caff181fdc69e42f7498b2df9deb875ddc6efc6bc2888428f411da94bbc2313ddf5a2c9 SHA512 a31348481e1c02747f5bb9db333f855c45a1555aa187ee35de5ef553a10a8a47dfcc1beb1e69502046c1758438b91958a328e0a0015812c153221f67734a70a6
EBUILD icedtea-3.7.0.ebuild 14057 BLAKE2B 340edca46ea2635ef4099035583a833a2b280f3c19c4d238af3a015287dbb33a1a39b7bcf9c7fafea971df2c6e24594b6f8ac11bad894e15dc27e01e5e565bdd SHA512 7d8534c2c593ed1da2c23eeab353a46aca723d067b4b74c076ce99dd5d9e1bab9b640284b6c478a0709a410ffb3b5ba679cfd1ef81c75fa871eafc02223aad67
EBUILD icedtea-3.7.0.ebuild 14235 BLAKE2B d3e8de8211eae9cc8d6a0f50545da59d6386b777f63ff54983999a08e420a2ce0cb11c90eda1e44daa48261a8ac562127592c7b7676877ad13dc71192954b6dd SHA512 5c739d5dd29a467c88c77408c716659b0a6a3cd9c0f86c5988e2b06a0a64e775ae61eaa64f10ef7f2c8be07390b500100888776e9a0fa59e1e1f19d95fb91a6f
EBUILD icedtea-7.2.6.9.ebuild 12085 BLAKE2B c392b85759817efe9f53de6eea1051f8b3e9d3671d1b5cc558cb2449830be7e1c53c39ba8a360757dbcf3e43ada82aeb51b56e3bb9e925bbadb406ee965d02f5 SHA512 86643a8bfb678efef4feaad2a9103e64947914d80c2fa14d4fb43ce66a562e0756b64db3d72413e23aa420fa4cf8408b51e51a9928d3a5522b216f09ee4de916

View File

@ -0,0 +1,75 @@
From a02a9fbc3f1fed181504bdb5b0a16863247f92fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
Date: Fri, 2 Mar 2018 10:11:51 +0000
Subject: [PATCH 6/9] hotspot: os_linux: remove glibc dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* gnu/libc-version.h doesn't exist in musl
| hotspot/src/os/linux/vm/os_linux.cpp:97:11: fatal error: gnu/libc-version.h: No such file or directory
| # include <gnu/libc-version.h>
| ^~~~~~~~~~~~~~~~~~~~
* dlvsym() is a GNU extension and doesn't exist in musl
| hotspot/src/os/linux/vm/os_linux.cpp:2846:13: error: 'dlvsym' was not declared in this scope
| void *f = dlvsym(handle, name, "libnuma_1.1");
| ^~~~~~
| hotspot/src/os/linux/vm/os_linux.cpp:2846:13: note: suggested alternative: 'dlsym'
| void *f = dlvsym(handle, name, "libnuma_1.1");
| ^~~~~~
| dlsym
Upstream-Status: Inappropriate [musl specific]
Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
---
hotspot/src/os/linux/vm/os_linux.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 044a70a6..3137796a 100644
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
@@ -94,7 +94,6 @@
# include <string.h>
# include <syscall.h>
# include <sys/sysinfo.h>
-# include <gnu/libc-version.h>
# include <sys/ipc.h>
# include <sys/shm.h>
# include <link.h>
@@ -530,6 +529,13 @@ void os::Linux::hotspot_sigmask(Thread* thread) {
// detecting pthread library
void os::Linux::libpthread_init() {
+#if 1
+ // Hard code supported musl compatible settings (taken from alpine linux)
+ os::Linux::set_glibc_version("glibc 2.9");
+ os::Linux::set_libpthread_version("NPTL");
+ os::Linux::set_is_NPTL();
+ os::Linux::set_is_floating_stack();
+#else
// Save glibc and pthread version strings. Note that _CS_GNU_LIBC_VERSION
// and _CS_GNU_LIBPTHREAD_VERSION are supported in glibc >= 2.3.2. Use a
// generic name for earlier versions.
@@ -588,6 +594,7 @@ void os::Linux::libpthread_init() {
if (os::Linux::is_NPTL() || os::Linux::supports_variable_stack_size()) {
os::Linux::set_is_floating_stack();
}
+#endif
}
/////////////////////////////////////////////////////////////////////////////
@@ -2814,6 +2821,9 @@ int os::Linux::sched_getcpu_syscall(void) {
return (retval == -1) ? retval : cpu;
}
+// musl doesn't have dlvsym()
+#define dlvsym(h,s,v) dlsym(h,s)
+
// Something to do with the numa-aware allocator needs these symbols
extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
extern "C" JNIEXPORT void numa_error(char *where) { }
--
2.16.2

View File

@ -192,6 +192,7 @@ src_prepare() {
ln -s "${FILESDIR}/${PN}${SLOT}-autoconf-config.patch" patches || die
ln -s "${FILESDIR}/${PN}${SLOT}-gcc-triple.patch" patches || die
ln -s "${FILESDIR}/${PN}${SLOT}-hotspot-stop-using-obsolete-isnanf.patch" patches || die
ln -s "${FILESDIR}/${PN}${SLOT}-os_linux-remove-glibc-dependencies.patch" patches || die
eapply "${FILESDIR}/${PN}8-disable-systemtap.patch"
eapply_user
@ -218,6 +219,7 @@ src_configure() {
DISTRIBUTION_PATCHES+="patches/${PN}${SLOT}-autoconf-config.patch "
DISTRIBUTION_PATCHES+="patches/${PN}${SLOT}-gcc-triple.patch "
DISTRIBUTION_PATCHES+="patches/${PN}${SLOT}-hotspot-stop-using-obsolete-isnanf.patch "
DISTRIBUTION_PATCHES+="patches/${PN}${SLOT}-os_linux-remove-glibc-dependencies.patch "
export DISTRIBUTION_PATCHES