pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/openjdk11 openjdk11: NetBSD/evbarm-aarch64 compil...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3a0a748160be
branches:  trunk
changeset: 345160:3a0a748160be
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed Dec 04 12:19:25 2019 +0000

description:
openjdk11: NetBSD/evbarm-aarch64 compile fixes (doesn't quite run yet)

diffstat:

 lang/openjdk11/distinfo                                                                      |   7 +-
 lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp                |  15 ++
 lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp                |  15 ++
 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp |  17 ++
 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp           |  70 ++++++++++
 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp  |  15 ++
 6 files changed, 138 insertions(+), 1 deletions(-)

diffs (173 lines):

diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/distinfo
--- a/lang/openjdk11/distinfo   Wed Dec 04 11:59:54 2019 +0000
+++ b/lang/openjdk11/distinfo   Wed Dec 04 12:19:25 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2019/11/03 00:37:28 tnn Exp $
+$NetBSD: distinfo,v 1.4 2019/12/04 12:19:25 tnn Exp $
 
 SHA1 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = d76599619b8bea879b8202b3efc38a82335d2e8c
 RMD160 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = a1b998e4e7edfb73ec35b0cc94895d9af16a8cd8
@@ -25,6 +25,11 @@
 SHA1 (patch-make_common_NativeCompilation.gmk) = fc97a952ba87efb450f59e87f19fb4c47558ae1d
 SHA1 (patch-make_data_fontconfig_bsd.fontconfig.properties) = 9fd9f6ef4af0eece0b4ca0acbb44331566f17e07
 SHA1 (patch-make_lib_Awt2dLibraries.gmk) = ab77cfd0f07425b694688ffa98c2c661d1ac017d
+SHA1 (patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp) = 70cd073fcc3e84e673228754dd0fb85ce5ae7102
+SHA1 (patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp) = 042ae280b0988c945ed96a2c20e9f1cb356d8efe
+SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp) = 4153d3a12ffc24de868b2fd97498dbdf7645e499
+SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp) = 190f56e8c725884712d850e096955d6d694e902d
+SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp) = f86bb14c9361e5c69b35c94c7920935d9a1743e9
 SHA1 (patch-src_hotspot_os_bsd_os__bsd.cpp) = ee20027e4323ebf63874cedd9e4549ebb702d335
 SHA1 (patch-src_hotspot_os_bsd_os__perf__bsd.cpp) = 7bb57f82f3a93adc1970ed4215148fc02ecbcd5a
 SHA1 (patch-src_hotspot_os_posix_os__posix.cpp) = e70e8c1e59f0be184a7a1d6e9d11ac7b934ce4b2
diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp     Wed Dec 04 12:19:25 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp,v 1.1 2019/12/04 12:19:25 tnn Exp $
+
+NetBSD/evbarm-aarch64 support
+
+--- src/hotspot/cpu/aarch64/vm_version_aarch64.cpp.orig        2019-10-16 18:31:09.000000000 +0000
++++ src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
+@@ -195,7 +195,7 @@ void VM_Version::get_processor_features(
+     }
+     fclose(f);
+   }
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+   char buf[512];
+   int cpu_lines = 0;
+   unsigned long auxv = os_get_processor_features();
diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp     Wed Dec 04 12:19:25 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp,v 1.1 2019/12/04 12:19:25 tnn Exp $
+
+NetBSD/evbarm-aarch64 support
+
+--- src/hotspot/cpu/aarch64/vm_version_aarch64.hpp.orig        2019-10-16 18:31:09.000000000 +0000
++++ src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
+@@ -47,7 +47,7 @@ protected:
+   };
+   static PsrInfo _psr_info;
+   static void get_processor_features();
+-#if defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+   static unsigned long os_get_processor_features();
+ #endif
+ 
diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp      Wed Dec 04 12:19:25 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp,v 1.1 2019/12/04 12:19:25 tnn Exp $
+
+NetBSD/evbarm-aarch64 support
+
+--- src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp.orig   2019-10-16 18:31:09.000000000 +0000
++++ src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp
+@@ -34,6 +34,10 @@
+ #  define bswap_16(x) swap16(x)
+ #  define bswap_32(x) swap32(x)
+ #  define bswap_64(x) swap64(x)
++#elif defined(__NetBSD__)
++#  define bswap_16(x) bswap16(x)
++#  define bswap_32(x) bswap32(x)
++#  define bswap_64(x) bswap64(x)
+ #endif
+ 
+ // Efficient swapping of data bytes from Java byte
diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp        Wed Dec 04 12:19:25 2019 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp,v 1.1 2019/12/04 12:19:25 tnn Exp $
+
+NetBSD/evbarm-aarch64 support
+
+--- src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp.orig     2019-10-16 18:31:09.000000000 +0000
++++ src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp
+@@ -103,6 +103,8 @@ address os::Bsd::ucontext_get_pc(const u
+   return (address)uc->uc_mcontext.mc_gpregs.gp_elr;
+ #elif defined(__OpenBSD__)
+   return (address)uc->sc_elr;
++#elif defined(__NetBSD__)
++  return (address)uc->uc_mcontext.__gregs[_REG_ELR];
+ #endif
+ }
+ 
+@@ -111,6 +113,8 @@ void os::Bsd::ucontext_set_pc(ucontext_t
+   uc->uc_mcontext.mc_gpregs.gp_elr = (intptr_t)pc;
+ #elif defined(__OpenBSD__)
+   uc->sc_elr = (unsigned long)pc;
++#elif defined(__NetBSD__)
++  uc->uc_mcontext.__gregs[_REG_ELR] = (__greg_t)pc;
+ #endif
+ }
+ 
+@@ -119,6 +123,8 @@ intptr_t* os::Bsd::ucontext_get_sp(const
+   return (intptr_t*)uc->uc_mcontext.mc_gpregs.gp_sp;
+ #elif defined(__OpenBSD__)
+   return (intptr_t*)uc->sc_sp;
++#elif defined(__NetBSD__)
++  return (intptr_t*)uc->uc_mcontext.__gregs[_REG_SP];
+ #endif
+ }
+ 
+@@ -127,6 +133,8 @@ intptr_t* os::Bsd::ucontext_get_fp(const
+   return (intptr_t*)uc->uc_mcontext.mc_gpregs.gp_x[REG_FP];
+ #elif defined(__OpenBSD__)
+   return (intptr_t*)uc->sc_x[REG_FP];
++#elif defined(__NetBSD__)
++  return (intptr_t*)uc->uc_mcontext.__gregs[_REG_FP];
+ #endif
+ }
+ 
+@@ -204,6 +212,9 @@ bool os::Bsd::get_frame_at_stack_banging
+ #elif defined(__OpenBSD__)
+       address pc = (address)(uc->sc_lr
+                          - NativeInstruction::instruction_size);
++#elif defined(__NetBSD__)
++      address pc = (address)(uc->uc_mcontext.__gregs[_REG_LR]
++                         - NativeInstruction::instruction_size);
+ #endif
+       *fr = frame(sp, fp, pc);
+       if (!fr->is_java_frame()) {
+@@ -552,6 +563,8 @@ void os::print_context(outputStream *st,
+     print_location(st, uc->uc_mcontext.mc_gpregs.gp_x[r]);
+ #elif defined(__OpenBSD__)
+     print_location(st, uc->sc_x[r]);
++#elif defined(__NetBSD__)
++    print_location(st, uc->uc_mcontext.__gregs[r]);
+ #endif
+   }
+   st->cr();
+@@ -588,6 +601,8 @@ void os::print_register_info(outputStrea
+     st->print_cr(  "R%d=" INTPTR_FORMAT, r, (uintptr_t)uc->uc_mcontext.mc_gpregs.gp_x[r]);
+ #elif defined(__OpenBSD__)
+     st->print_cr(  "R%d=" INTPTR_FORMAT, r, (uintptr_t)uc->sc_x[r]);
++#elif defined(__NetBSD__)
++    st->print_cr(  "R%d=" INTPTR_FORMAT, r, (uintptr_t)uc->uc_mcontext.__gregs[r]);
+ #endif
+   st->cr();
+ }
diff -r aad016d5e231 -r 3a0a748160be lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp       Wed Dec 04 12:19:25 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp,v 1.1 2019/12/04 12:19:25 tnn Exp $
+
+TODO processor feature detection for aarch64
+
+--- src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp.orig     2019-10-16 18:31:09.000000000 +0000
++++ src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp
+@@ -186,7 +186,7 @@ const struct cpu_implementers cpu_implem
+       CPU_IMPLEMENTER_NONE,
+ };
+ 
+-#ifdef __OpenBSD__
++#if defined(__OpenBSD__) || defined(__NetBSD__)
+ // READ_SPECIALREG is not available from userland on OpenBSD.
+ // Hardcode these values to the "lowest common denominator"
+ unsigned long VM_Version::os_get_processor_features() {



Home | Main Index | Thread Index | Old Index