mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-09-15 15:14:51 -04:00
Separate universal and main non universal patches
This commit is contained in:
parent
4a07e97efe
commit
90d461f705
11
buildjdk.sh
11
buildjdk.sh
@ -61,8 +61,15 @@ ln -s -f $CUPS_DIR/cups $ANDROID_INCLUDE/
|
||||
cd openjdk
|
||||
|
||||
# Apply patches
|
||||
git reset --hard
|
||||
git apply --reject --whitespace=fix ../patches/jdk8u_android.diff || echo "git apply failed"
|
||||
if [ "$BUILD_IOS" != "1" ]; then
|
||||
git reset --hard
|
||||
git apply --reject --whitespace=fix ../patches/jdk8u_android.diff || echo "git apply failed (universal patch set)"
|
||||
if [ "$TARGET_JDK" == "arm" ] then
|
||||
#TODO: make separate aarch32 patch set
|
||||
else
|
||||
git apply --reject --whitespace=fix ../patches/jdk8u_android_main.diff || echo "git apply failed (main non-universal patch set)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# --with-extra-cxxflags="$CXXFLAGS -Dchar16_t=uint16_t -Dchar32_t=uint32_t" \
|
||||
# --with-extra-cflags="$CPPFLAGS" \
|
||||
|
@ -2174,25 +2174,6 @@ index 2d3880b363..77eb2ac3fd 100644
|
||||
// no precompiled headers
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
@@ -93,11 +95,17 @@
|
||||
# include <semaphore.h>
|
||||
# include <fcntl.h>
|
||||
# include <string.h>
|
||||
-# include <syscall.h>
|
||||
# include <sys/sysinfo.h>
|
||||
+#ifndef __ANDROID__
|
||||
# include <gnu/libc-version.h>
|
||||
+#endif
|
||||
# include <sys/ipc.h>
|
||||
+#if !defined(__ANDROID__)
|
||||
+# include <syscall.h>
|
||||
# include <sys/shm.h>
|
||||
+#else
|
||||
+# include <sys/syscall.h>
|
||||
+#endif
|
||||
# include <link.h>
|
||||
# include <stdint.h>
|
||||
# include <inttypes.h>
|
||||
@@ -105,6 +113,10 @@
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
@ -2359,18 +2340,6 @@ index 2d3880b363..77eb2ac3fd 100644
|
||||
strncpy(saved_jvm_path, buf, MAXPATHLEN);
|
||||
}
|
||||
|
||||
@@ -2977,7 +3048,11 @@ extern "C" JNIEXPORT int fork1() { return fork(); }
|
||||
// Handle request to load libnuma symbol version 1.1 (API v1). If it fails
|
||||
// load symbol from base version instead.
|
||||
void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
|
||||
+#ifndef __ANDROID__
|
||||
void *f = dlvsym(handle, name, "libnuma_1.1");
|
||||
+#else
|
||||
+ void *f = NULL;
|
||||
+#endif
|
||||
if (f == NULL) {
|
||||
f = dlsym(handle, name);
|
||||
}
|
||||
@@ -2987,7 +3062,11 @@ void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
|
||||
// Handle request to load libnuma symbol version 1.2 (API v2) only.
|
||||
// Return NULL if the symbol is not defined in this particular version.
|
||||
@ -2477,18 +2446,6 @@ index 2d3880b363..77eb2ac3fd 100644
|
||||
// create binary file, rewriting existing file if required
|
||||
int os::create_binary_file(const char* path, bool rewrite_existing) {
|
||||
int oflags = O_WRONLY | O_CREAT;
|
||||
@@ -5867,7 +5978,11 @@ bool os::is_thread_cpu_time_supported() {
|
||||
// Linux 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) {
|
||||
+#ifdef __ANDROID__
|
||||
+ return -1;
|
||||
+#else
|
||||
return ::getloadavg(loadavg, nelem);
|
||||
+#endif // !__ANDROID__
|
||||
}
|
||||
|
||||
void os::pause() {
|
||||
diff --git a/hotspot/src/os/linux/vm/os_perf_linux.cpp b/hotspot/src/os/linux/vm/os_perf_linux.cpp
|
||||
index 0d1f75810a..087166c545 100644
|
||||
--- a/hotspot/src/os/linux/vm/os_perf_linux.cpp
|
||||
|
47
patches/jdk8u_android_main.diff
Normal file
47
patches/jdk8u_android_main.diff
Normal file
@ -0,0 +1,47 @@
|
||||
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
index 2d3880b363..77eb2ac3fd 100644
|
||||
--- a/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
@@ -93,11 +95,17 @@
|
||||
# include <semaphore.h>
|
||||
# include <fcntl.h>
|
||||
# include <string.h>
|
||||
-# include <syscall.h>
|
||||
# include <sys/sysinfo.h>
|
||||
+#ifndef __ANDROID__
|
||||
# include <gnu/libc-version.h>
|
||||
+#endif
|
||||
# include <sys/ipc.h>
|
||||
+#if !defined(__ANDROID__)
|
||||
+# include <syscall.h>
|
||||
# include <sys/shm.h>
|
||||
+#else
|
||||
+# include <sys/syscall.h>
|
||||
+#endif
|
||||
# include <link.h>
|
||||
# include <stdint.h>
|
||||
# include <inttypes.h>
|
||||
@@ -2977,7 +3048,11 @@ extern "C" JNIEXPORT int fork1() { return fork(); }
|
||||
// Handle request to load libnuma symbol version 1.1 (API v1). If it fails
|
||||
// load symbol from base version instead.
|
||||
void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
|
||||
+#ifndef __ANDROID__
|
||||
void *f = dlvsym(handle, name, "libnuma_1.1");
|
||||
+#else
|
||||
+ void *f = NULL;
|
||||
+#endif
|
||||
if (f == NULL) {
|
||||
f = dlsym(handle, name);
|
||||
}
|
||||
@@ -5867,7 +5978,11 @@ bool os::is_thread_cpu_time_supported() {
|
||||
// Linux 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) {
|
||||
+#ifdef __ANDROID__
|
||||
+ return -1;
|
||||
+#else
|
||||
return ::getloadavg(loadavg, nelem);
|
||||
+#endif // !__ANDROID__
|
||||
}
|
||||
|
||||
void os::pause() {
|
Loading…
x
Reference in New Issue
Block a user