diff options
author | Fabian Dellwing <fabian.dellwing@mbconnectline.de> | 2023-05-03 11:51:31 +0200 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-05 02:19:05 +0200 |
commit | b443c0b80ba1634dbb5199a9af05c735d0207e2c (patch) | |
tree | a5ccf5c9cc4cdbe8fb1748186aa814e4f5b25861 /Ports | |
parent | 36a26d7fa80bc9c72b19442912d8967f448368ff (diff) | |
download | serenity-b443c0b80ba1634dbb5199a9af05c735d0207e2c.zip |
Ports: Update OpenJDK
Diffstat (limited to 'Ports')
8 files changed, 60 insertions, 59 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 2fc397f5c2..4674216776 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -195,7 +195,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`ntbtls`](ntbtls/) | The Not Too Bad TLS Library | 0.2.0 | https://gnupg.org/software/ntbtls/index.html | | [`nyancat`](nyancat/) | Nyancat | | https://github.com/klange/nyancat | | [`oksh`](oksh/) | oksh | 7.1 | https://github.com/ibara/oksh | -| [`OpenJDK`](OpenJDK/) | OpenJDK | 17.0.2 | https://openjdk.java.net/ | +| [`OpenJDK`](OpenJDK/) | OpenJDK | 17.0.6 | https://openjdk.java.net/ | | [`openrct2`](openrct2/) | OpenRCT2 | 0.4.4 | https://openrct2.org/ | | [`openssh`](openssh/) | OpenSSH | 9.0-94eb685 | https://github.com/openssh/openssh-portable | | [`openssl`](openssl/) | OpenSSL | 1.1.1s | https://www.openssl.org/ | diff --git a/Ports/OpenJDK/package.sh b/Ports/OpenJDK/package.sh index adcd73b890..f5b64bc0f1 100755 --- a/Ports/OpenJDK/package.sh +++ b/Ports/OpenJDK/package.sh @@ -1,7 +1,7 @@ #!/usr/bin/env -S USE_CCACHE=false bash ../.port_include.sh port='OpenJDK' -version='17.0.2' +version='17.0.6' workdir="jdk17u-dev-jdk-${version}-ga" useconfigure='true' use_fresh_config_guess='true' @@ -9,7 +9,7 @@ config_guess_paths=("make/autoconf/build-aux/autoconf-config.guess") use_fresh_config_sub='true' config_sub_paths=("make/autoconf/build-aux/autoconf-config.sub") auth_type='sha256' -files="https://github.com/openjdk/jdk17u-dev/archive/refs/tags/jdk-${version}-ga.tar.gz jdk-${version}-ga.tar.gz cb5b2a5d0916723d340f2c5bacd4607f8b8dc3a18dc8019fcfabf5306e2a4112" +files="https://github.com/openjdk/jdk17u-dev/archive/refs/tags/jdk-${version}-ga.tar.gz jdk-${version}-ga.tar.gz 4bd3d2534d7b584c01711e64b9e5b7e79052a1759d3fded8d64107ebc9d37dc2" depends=("fontconfig" "libffi") configure() { diff --git a/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch b/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch index 31f395c98e..01ba43ed01 100644 --- a/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch +++ b/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch @@ -16,10 +16,10 @@ Co-Authored-By: Andrew Kaster <akaster@serenityos.org> 7 files changed, 39 insertions(+) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 -index 5eed1138f1f205874e21b92050634fbfcfefd0c7..62e53a1c421c600ed92eaeb6805fd61e825e3072 100644 +index ea1d62685db283c445114ca43acc6c0208ad4b5c..88679489fc09019212286e0cb75885a05103dc85 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 -@@ -382,6 +382,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], +@@ -416,6 +416,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], CFLAGS_OS_DEF_JVM="-DAIX" elif test "x$OPENJDK_TARGET_OS" = xbsd; then CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE" @@ -52,7 +52,7 @@ index 23bb33e878d17d2b8072189c1c6d4b17097598e7..e3deb0c3fb0cecfb39b4052f0e5abda3 if test "x$TOOLCHAIN_TYPE" = xgcc; then if test "x$OPENJDK_TARGET_OS" = xlinux; then diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 -index 205d64f566d93a9a9c9d0b9191372e3aabb05143..6e668edc45672128a3e70bb4e37d0100a1ef9243 100644 +index 9e9e9454f0e092a1ecf6ab309c87f882f61dbe51..0c1f6114481735ba4b11a55335107bdaacbd1e9a 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -220,6 +220,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS], @@ -85,7 +85,7 @@ index 205d64f566d93a9a9c9d0b9191372e3aabb05143..6e668edc45672128a3e70bb4e37d0100 AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR) ]) diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 -index 69540e1608e1df16ca2a3e631c061ba6ae366ca7..badd84a506a201d664f0a6902c68109017c86180 100644 +index 99c780532ee8780c530a018a9cc817d0fd0b747e..bfdc700ce82d8c2a760b12c15c08fbaa5b888b49 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -42,6 +42,7 @@ VALID_TOOLCHAINS_linux="gcc clang" @@ -97,7 +97,7 @@ index 69540e1608e1df16ca2a3e631c061ba6ae366ca7..badd84a506a201d664f0a6902c681090 # Toolchain descriptions TOOLCHAIN_DESCRIPTION_clang="clang/LLVM" diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk -index 7ad0375e2e38ff31419eb47d028a652c2dead647..8100f655e9273de3775e828d7c9dc8aa0185bf46 100644 +index 4a4ccdb230027e98401efc8bd9e0d765c9d59924..e4d08a53be18c2b8d0b44ce4dc38ddd80a744b0d 100644 --- a/make/common/modules/LauncherCommon.gmk +++ b/make/common/modules/LauncherCommon.gmk @@ -157,11 +157,14 @@ define SetupBuildLauncherBody @@ -139,10 +139,10 @@ index 5cba93178c744feb0d1c0286634a40def232eca2..752727d0d8b445ab584a09ee5e0cd3f6 # nm on macosx prints out "warning: nm: no name list" to stderr for # files without symbols. Hide this, even at the expense of hiding real errors. diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk -index 1d5fede2aa8af9e475ab2980e303b3ff22412795..0a61d009f34a4e73ace746d0cc6068fe2852e832 100644 +index e7188218df37dae9cc41fa19a84e914e0ac0932f..e29f9d5ad78d6da367579dfda7b8e9c0d09be2c9 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk -@@ -209,6 +209,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ +@@ -210,6 +210,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ LIBS_unix := $(LIBZ_LIBS), \ LIBS_linux := $(LIBDL) -lpthread, \ LIBS_aix := $(LIBDL),\ diff --git a/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch b/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch index 10fa2f0cd7..2eb447f837 100644 --- a/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch +++ b/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch @@ -12,10 +12,10 @@ Subject: [PATCH] make: Build with c++20 when targeting serenity 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 -index 62e53a1c421c600ed92eaeb6805fd61e825e3072..9239dfb435521ab276ea1ca566e6bf539f649ddb 100644 +index 88679489fc09019212286e0cb75885a05103dc85..63126c98054760f8a657d6ba7d51d5aeb3eebf18 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 -@@ -154,7 +154,8 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], +@@ -187,7 +187,8 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], WARNINGS_ENABLE_ALL_CFLAGS="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL" WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX" @@ -25,7 +25,7 @@ index 62e53a1c421c600ed92eaeb6805fd61e825e3072..9239dfb435521ab276ea1ca566e6bf53 ;; clang) -@@ -166,7 +167,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], +@@ -200,7 +201,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual" WARNINGS_ENABLE_ALL="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL" @@ -34,7 +34,7 @@ index 62e53a1c421c600ed92eaeb6805fd61e825e3072..9239dfb435521ab276ea1ca566e6bf53 ;; -@@ -529,6 +530,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], +@@ -565,6 +566,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], else AC_MSG_ERROR([Don't know how to enable C++14 for this toolchain]) fi @@ -58,7 +58,7 @@ index 1a899ee2bfb2e8ef20bb98914fe909248f1aec45..13f05cd3a85acde45124b5cda6303f51 bool is_full() const { return _top == end(); diff --git a/src/hotspot/share/utilities/events.hpp b/src/hotspot/share/utilities/events.hpp -index b5d67bd6a8ad8eae3d844e904d2d105408f22719..3cf3b399f96cf0be0e5ff15c29fcd7ce12fc2ffd 100644 +index 6f3dadde281c04910d9704de6313276cb74dcd4a..945295deab81fbf75343ea361627c435b2094247 100644 --- a/src/hotspot/share/utilities/events.hpp +++ b/src/hotspot/share/utilities/events.hpp @@ -99,7 +99,7 @@ template <class T> class EventLogBase : public EventLog { diff --git a/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch b/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch index fd375e3c2f..32d987bff7 100644 --- a/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch +++ b/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch @@ -13,12 +13,12 @@ Co-Authored-By: Timur Sultanov <sultanovts@yandex.ru> --- src/hotspot/os/bsd/attachListener_bsd.cpp | 12 +++ src/hotspot/os/bsd/osThread_bsd.cpp | 6 +- - src/hotspot/os/bsd/os_bsd.cpp | 76 ++++++++++++++++++- + src/hotspot/os/bsd/os_bsd.cpp | 77 ++++++++++++++++++- src/hotspot/os/bsd/os_perf_bsd.cpp | 4 + .../os_cpu/bsd_zero/bytes_bsd_zero.hpp | 2 + src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp | 18 ++++- src/hotspot/share/classfile/classLoader.cpp | 2 +- - 7 files changed, 113 insertions(+), 7 deletions(-) + 7 files changed, 114 insertions(+), 7 deletions(-) diff --git a/src/hotspot/os/bsd/attachListener_bsd.cpp b/src/hotspot/os/bsd/attachListener_bsd.cpp index 9daad43dc7ad567dd87c9ce44b1363d18c4f5931..092b4d94ab99eb016fe8583ae9defca4922f807f 100644 @@ -72,7 +72,7 @@ index 9eba7288fbe36fbe2149fb54c5709b5fd3f098ba..d7164e5d5f2151e71b535ccf998a5c9b _ucontext = NULL; _expanding_stack = 0; diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp -index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c70b778467 100644 +index 94649ae546d9b03217b6086ae0775a88e2a850a9..50225096a826511edacd983a5c6bf670deb8efc5 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -87,8 +87,10 @@ @@ -155,7 +155,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 } Arguments::set_java_home(buf); if (!set_boot_path('/', ':')) { -@@ -877,6 +900,10 @@ pid_t os::Bsd::gettid() { +@@ -883,6 +906,10 @@ pid_t os::Bsd::gettid() { #else #ifdef __NetBSD__ retval = (pid_t) syscall(SYS__lwp_self); @@ -166,7 +166,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 #endif #endif #endif -@@ -885,6 +912,7 @@ pid_t os::Bsd::gettid() { +@@ -891,6 +918,7 @@ pid_t os::Bsd::gettid() { if (retval == -1) { return getpid(); } @@ -174,7 +174,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 } intx os::current_thread_id() { -@@ -942,6 +970,25 @@ bool os::address_is_in_vm(address addr) { +@@ -959,6 +987,26 @@ bool os::address_is_in_vm(address addr) { return false; } @@ -197,10 +197,11 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 + return false; +} +#endif // SERENITY - - #define MACH_MAXSYMLEN 256 - -@@ -1013,7 +1060,7 @@ bool os::dll_address_to_library_name(address addr, char* buf, ++ + bool os::dll_address_to_function_name(address addr, char *buf, + int buflen, int *offset, + bool demangle) { +@@ -1041,7 +1089,7 @@ bool os::dll_address_to_library_name(address addr, char* buf, // in case of error it checks if .dll/.so was built for the // same architecture as Hotspot is running on @@ -209,16 +210,16 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { #ifdef STATIC_BUILD return os::get_default_process_handle(); -@@ -1226,7 +1273,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { +@@ -1254,7 +1302,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { return NULL; #endif // STATIC_BUILD } -#endif // !__APPLE__ +#endif // !__APPLE__ || !SERENITY - void* os::get_default_process_handle() { - #ifdef __APPLE__ -@@ -1305,6 +1352,7 @@ int os::get_loaded_modules_info(os::LoadedModulesCallbackFunc callback, void *pa + int _print_dll_info_cb(const char * name, address base_address, address top_address, void * param) { + outputStream * out = (outputStream *) param; +@@ -1317,6 +1365,7 @@ int os::get_loaded_modules_info(os::LoadedModulesCallbackFunc callback, void *pa } void os::get_summary_os_info(char* buf, size_t buflen) { @@ -226,7 +227,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 // These buffers are small because we want this to be brief // and not use a lot of stack while generating the hs_err file. char os[100]; -@@ -1342,6 +1390,10 @@ void os::get_summary_os_info(char* buf, size_t buflen) { +@@ -1354,6 +1403,10 @@ void os::get_summary_os_info(char* buf, size_t buflen) { snprintf(buf, buflen, "%s %s, macOS %s (%s)", os, release, osproductversion, build); } } else @@ -237,7 +238,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 #endif snprintf(buf, buflen, "%s %s", os, release); } -@@ -1369,6 +1421,7 @@ void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) { +@@ -1381,6 +1434,7 @@ void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) { } void os::get_summary_cpu_info(char* buf, size_t buflen) { @@ -245,10 +246,10 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 unsigned int mhz; size_t size = sizeof(mhz); int mib[] = { CTL_HW, HW_CPU_FREQ }; -@@ -1399,9 +1452,13 @@ void os::get_summary_cpu_info(char* buf, size_t buflen) { - } +@@ -1415,9 +1469,13 @@ void os::get_summary_cpu_info(char* buf, size_t buflen) { + #else + snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz); #endif - snprintf(buf, buflen, "\"%s\" %s%s %d MHz", model, machine, emulated, mhz); +#else + snprintf(buf, buflen, "%s", "FIXME: Implement CPU Info"); +#endif @@ -259,7 +260,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 xsw_usage swap_usage; size_t size = sizeof(swap_usage); -@@ -1423,6 +1480,9 @@ void os::print_memory_info(outputStream* st) { +@@ -1439,6 +1497,9 @@ void os::print_memory_info(outputStream* st) { } st->cr(); @@ -269,7 +270,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 } static char saved_jvm_path[MAXPATHLEN] = {0}; -@@ -1584,6 +1644,10 @@ bool os::pd_commit_memory(char* addr, size_t size, bool exec) { +@@ -1600,6 +1661,10 @@ bool os::pd_commit_memory(char* addr, size_t size, bool exec) { } } #else @@ -280,7 +281,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 uintptr_t res = (uintptr_t) ::mmap(addr, size, prot, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); if (res != (uintptr_t) MAP_FAILED) { -@@ -1994,6 +2058,10 @@ OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) +@@ -2003,6 +2068,10 @@ OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) extern void report_error(char* file_name, int line_no, char* title, char* format, ...); @@ -291,7 +292,7 @@ index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c7 // this is called _before_ the most of global arguments have been parsed void os::init(void) { char dummy; // used to get a guess on initial stack address -@@ -2535,7 +2603,11 @@ bool os::is_thread_cpu_time_supported() { +@@ -2503,7 +2572,11 @@ bool os::is_thread_cpu_time_supported() { // Bsd doesn't yet have a (official) notion of processor sets, // so just return the system wide load average. int os::loadavg(double loadavg[], int nelem) { @@ -339,7 +340,7 @@ index 0da7ecc7892dc74b21caf5c9ac831d6ab45aae2e..bd1ee9a6756e040733b30cef6823053f # include <sys/endian.h> #endif diff --git a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp -index a9fda1d4b75aa08462cbb9ca9853fe4199faee80..494f073ac1a040535b3791f94ccc8cab283bbdcd 100644 +index d85822bdec231eeb7d686e2a8d16f893212a5584..9f7dc05986ce999efeeb52cfea45bf98c0c0a88d 100644 --- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp +++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp @@ -23,11 +23,15 @@ diff --git a/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch b/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch index 7b29b93223..08ecaa16e2 100644 --- a/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch +++ b/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch @@ -16,10 +16,10 @@ Co-Authored-By: Andrew Kaster <akaster@serenityos.org> 8 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp -index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4abaf58cc404 100644 +index a5c023a5c36aee3919c9e2a9a520d718bdac1dee..ec7e1b8646b5f7d8a269f4059982ff37b57ec68b 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp -@@ -65,7 +65,9 @@ +@@ -66,7 +66,9 @@ #include <sys/wait.h> #include <time.h> #include <unistd.h> @@ -29,7 +29,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba #ifdef __APPLE__ #include <crt_externs.h> -@@ -418,6 +420,7 @@ void os::Posix::print_load_average(outputStream* st) { +@@ -438,6 +440,7 @@ void os::Posix::print_load_average(outputStream* st) { // unfortunately it does not work on macOS and Linux because the utx chain has no entry // for reboot at least on my test machines void os::Posix::print_uptime_info(outputStream* st) { @@ -37,7 +37,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba int bootsec = -1; int currsec = time(NULL); struct utmpx* ent; -@@ -432,6 +435,9 @@ void os::Posix::print_uptime_info(outputStream* st) { +@@ -452,6 +455,9 @@ void os::Posix::print_uptime_info(outputStream* st) { if (bootsec != -1) { os::print_dhm(st, "OS uptime:", (long) (currsec-bootsec)); } @@ -47,7 +47,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba } static void print_rlimit(outputStream* st, const char* msg, -@@ -470,7 +476,9 @@ void os::Posix::print_rlimit_info(outputStream* st) { +@@ -490,7 +496,9 @@ void os::Posix::print_rlimit_info(outputStream* st) { print_rlimit(st, ", THREADS", RLIMIT_THREADS); #else @@ -57,7 +57,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba #endif print_rlimit(st, ", NOFILE", RLIMIT_NOFILE); -@@ -638,7 +646,11 @@ void os::dll_unload(void *lib) { +@@ -692,7 +700,11 @@ void os::dll_unload(void *lib) { } jlong os::lseek(int fd, jlong offset, int whence) { @@ -69,7 +69,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba } int os::fsync(int fd) { -@@ -646,7 +658,11 @@ int os::fsync(int fd) { +@@ -700,7 +712,11 @@ int os::fsync(int fd) { } int os::ftruncate(int fd, jlong length) { @@ -83,7 +83,7 @@ index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..a50fa75f27e243ca93503f7846cf4aba const char* os::get_current_directory(char *buf, size_t buflen) { diff --git a/src/hotspot/os/posix/signals_posix.cpp b/src/hotspot/os/posix/signals_posix.cpp -index 2c020a79408049797d5c2f1fcc1e5de8d968323e..9f3316f5b9ad66a47bedf7f56a318610a4d88873 100644 +index 9a27ddc9ae7aaa6501d2e0419f801ce91ac4db18..200d26cf98ce308a30b0cbd5a987c64b292ddc5a 100644 --- a/src/hotspot/os/posix/signals_posix.cpp +++ b/src/hotspot/os/posix/signals_posix.cpp @@ -552,6 +552,8 @@ public: @@ -139,10 +139,10 @@ index 2c020a79408049797d5c2f1fcc1e5de8d968323e..9f3316f5b9ad66a47bedf7f56a318610 #ifdef SI_TKILL { SI_TKILL, "SI_TKILL", "Signal sent by tkill (pthread_kill)" }, diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp -index 9b8e667f9ec38e33ec33e9f8bbf90bfb1efa36bc..4e9a5f0e6c5748a6942af6dd637ccd45b6580796 100644 +index 621efe55f6f8a64c35ad18fc27da785c2b91bedc..1dcf22357bb786568eb971cc474ceecf8c31c82c 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp -@@ -155,7 +155,7 @@ char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t b +@@ -156,7 +156,7 @@ char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t b // No offset when dealing with UTC time_t UTC_to_local = 0; if (!utc) { @@ -151,7 +151,7 @@ index 9b8e667f9ec38e33ec33e9f8bbf90bfb1efa36bc..4e9a5f0e6c5748a6942af6dd637ccd45 UTC_to_local = -(time_struct.tm_gmtoff); #elif defined(_WINDOWS) long zone; -@@ -1502,6 +1502,7 @@ size_t os::page_size_for_region_unaligned(size_t region_size, size_t min_pages) +@@ -1530,6 +1530,7 @@ size_t os::page_size_for_region_unaligned(size_t region_size, size_t min_pages) } static const char* errno_to_string (int e, bool short_text) { @@ -159,7 +159,7 @@ index 9b8e667f9ec38e33ec33e9f8bbf90bfb1efa36bc..4e9a5f0e6c5748a6942af6dd637ccd45 #define ALL_SHARED_ENUMS(X) \ X(E2BIG, "Argument list too long") \ X(EACCES, "Permission denied") \ -@@ -1579,6 +1580,9 @@ static const char* errno_to_string (int e, bool short_text) { +@@ -1607,6 +1608,9 @@ static const char* errno_to_string (int e, bool short_text) { X(ETXTBSY, "Text file busy") \ X(EWOULDBLOCK, "Operation would block") \ X(EXDEV, "Cross-device link") diff --git a/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch b/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch index 1d4fcc48f9..d2947c9ee8 100644 --- a/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch +++ b/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch @@ -87,10 +87,10 @@ index 6e960c0347fe7cf8d2d40211a9b8f744673f1a05..cbd1d087ed50ba0a74e35e7e1c1cec0e #define O_DSYNC O_FSYNC #endif diff --git a/src/java.base/share/native/libjli/jli_util.h b/src/java.base/share/native/libjli/jli_util.h -index 3512b1e96f5820afd0d130d840e2bc591183d84f..e60f7581ff8793a26e8453cdc44e90c351c0cd50 100644 +index 6aa26a04f77a9085f7fda850c006f503d44f9005..35cff6b4005e596cc1cd3224e87b94d634fc80a9 100644 --- a/src/java.base/share/native/libjli/jli_util.h +++ b/src/java.base/share/native/libjli/jli_util.h -@@ -108,6 +108,9 @@ JLI_CmdToArgs(char *cmdline); +@@ -104,6 +104,9 @@ JLI_CmdToArgs(char *cmdline); #define _LARGFILE64_SOURCE #define JLI_Lseek lseek64 #endif @@ -236,7 +236,7 @@ index d53e88764c5892996bd7bb5a611b6cb7ebc48c2e..eddb5f169d149bb62cc9a317c691675c /* * Returns the children of the requested pid and optionally each parent and diff --git a/src/java.base/unix/native/libjava/TimeZone_md.c b/src/java.base/unix/native/libjava/TimeZone_md.c -index 94dfc207f965204d6485f3e6154b669ac951e96e..2a6c3851aef90e0a66517efc134f168d4345439d 100644 +index 660665392c12db9879a535f8d30a0262d4ba3b92..c4aebe381330ea77084b674acf2f7a25cef79be3 100644 --- a/src/java.base/unix/native/libjava/TimeZone_md.c +++ b/src/java.base/unix/native/libjava/TimeZone_md.c @@ -53,7 +53,7 @@ static char *isFileIdentical(char* buf, size_t size, char *pathname); @@ -526,7 +526,7 @@ index 42a07359dde3e2daa8b5dfb3b34e1184bae37d94..ca14018610dd531c5efdf46da76d79e4 return IOS_UNAVAILABLE; #else diff --git a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c -index 9df8be1e62c21b5d059f1354e699679c26596fa0..993e240db043f10cb41c218b3b2e909e1f78b807 100644 +index ad36e6a19b4716724b5366a9fd1b55ae4a12a5b5..f9135f951a673bcd1891d6678d658d1819c8d54b 100644 --- a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c +++ b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c @@ -57,7 +57,7 @@ diff --git a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch index ebbc31ddbe..6c0d414dd1 100644 --- a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch +++ b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch @@ -6,9 +6,9 @@ Subject: [PATCH] java.base: Enable java.lang.Process on serenity --- make/modules/java.base/Launcher.gmk | 2 +- make/modules/java.base/lib/CoreLibraries.gmk | 3 + - .../libjava/ProcessHandleImpl_serenity.cpp | 164 ++++++++++++++++++ + .../libjava/ProcessHandleImpl_serenity.cpp | 165 ++++++++++++++++++ .../unix/classes/java/lang/ProcessImpl.java | 7 +- - 4 files changed, 174 insertions(+), 2 deletions(-) + 4 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp diff --git a/make/modules/java.base/Launcher.gmk b/make/modules/java.base/Launcher.gmk @@ -25,7 +25,7 @@ index 700ddefda49e891ac1a2cfd8602fb8a9409ad1d4..78c884dae8271aea4431976823a0f185 NAME := jspawnhelper, \ SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \ diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk -index 0a61d009f34a4e73ace746d0cc6068fe2852e832..7867a3095dbe3d76c8db6d7d1948ae0f05d41c63 100644 +index e29f9d5ad78d6da367579dfda7b8e9c0d09be2c9..769c2fd8b5a7e0000c85d6d44ec30f6451e90cd5 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -90,6 +90,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ @@ -47,7 +47,7 @@ index 0a61d009f34a4e73ace746d0cc6068fe2852e832..7867a3095dbe3d76c8db6d7d1948ae0f -framework SystemConfiguration, \ diff --git a/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp b/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f83b5e719 +index 0000000000000000000000000000000000000000..d9f9663352d56fbc3ba2db75c4beebd3aea4554c --- /dev/null +++ b/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp @@ -0,0 +1,165 @@ |