pkgsrc-WIP-changes archive

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

self: porting part 2



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Jul 22 05:45:47 2019 +0200
Changeset:	20ed05fed51f009970d6e59df7495b74d5e607c2

Modified Files:
	self-git/distinfo
	self-git/patches/patch-vm_cmake_netbsd.cmake
	self-git/patches/patch-vm_cmake_platform.cmake
	self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
	self-git/patches/patch-vm_src_unix_os_os__unix.cpp
	self-git/patches/patch-vm_src_unix_os_os__unix.hh
	self-git/patches/patch-vm_src_unix_os_sig__unix.hh
Added Files:
	self-git/patches/patch-vm_src_any_asm_asm.cpp
	self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
	self-git/patches/patch-vm_src_any_runtime_allocation.cpp
	self-git/patches/patch-vm_src_any_runtime_config.hh
	self-git/patches/patch-vm_src_any_runtime_uncommonBranch.cpp
	self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
	self-git/patches/patch-vm_src_i386_runtime_runtime__i386.hh
	self-git/patches/patch-vm_src_unix_os_errorCodes__unix.cpp
	self-git/patches/patch-vm_src_unix_os_itimer__unix.cpp
	self-git/patches/patch-vm_src_unix_os_sig__unix.cpp
	self-git/patches/patch-vm_src_unix_prims_unixPrims.cpp
	self-git/patches/patch-vm_src_unix_runtime_machineCache__unix.cpp
	self-git/patches/patch-vm_src_unix_runtime_monitorPieces__unix.cpp

Log Message:
self: porting part 2

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=20ed05fed51f009970d6e59df7495b74d5e607c2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 self-git/distinfo                                  |  25 +++-
 self-git/patches/patch-vm_cmake_netbsd.cmake       |   4 +-
 self-git/patches/patch-vm_cmake_platform.cmake     |   2 +-
 self-git/patches/patch-vm_src_any_asm_asm.cpp      |  27 +++++
 .../patch-vm_src_any_fast__compiler_fcompiler.hh   |  27 +++++
 .../patch-vm_src_any_runtime_allocation.cpp        |  13 ++
 .../patches/patch-vm_src_any_runtime_config.hh     |  21 ++++
 .../patch-vm_src_any_runtime_uncommonBranch.cpp    |  14 +++
 ...ch-vm_src_i386_runtime_interruptedCtx__i386.cpp |  53 +++++++++
 .../patch-vm_src_i386_runtime_runtime__i386.hh     |  14 +++
 .../patch-vm_src_unix_os_errorCodes__unix.cpp      | 131 +++++++++++++++++++++
 .../patches/patch-vm_src_unix_os_itimer__unix.cpp  |  28 +++++
 .../patch-vm_src_unix_os_os__includes__unix.hh     |   2 +-
 self-git/patches/patch-vm_src_unix_os_os__unix.cpp |   2 +-
 self-git/patches/patch-vm_src_unix_os_os__unix.hh  |   2 +-
 .../patches/patch-vm_src_unix_os_sig__unix.cpp     |  34 ++++++
 self-git/patches/patch-vm_src_unix_os_sig__unix.hh |   2 +-
 .../patches/patch-vm_src_unix_prims_unixPrims.cpp  |  70 +++++++++++
 ...atch-vm_src_unix_runtime_machineCache__unix.cpp |  17 +++
 ...tch-vm_src_unix_runtime_monitorPieces__unix.cpp |  19 +++
 20 files changed, 494 insertions(+), 13 deletions(-)

diffs:
diff --git a/self-git/distinfo b/self-git/distinfo
index ab20254a37..3feea3e2bc 100644
--- a/self-git/distinfo
+++ b/self-git/distinfo
@@ -1,8 +1,21 @@
 $NetBSD$
 
-SHA1 (patch-vm_cmake_netbsd.cmake) = b124b0d960c1ae73927e262176d52c9a50ef23da
-SHA1 (patch-vm_cmake_platform.cmake) = 390b55a1fecd0263c1c9eb7c2fa9aec8edd7dc9b
-SHA1 (patch-vm_src_unix_os_os__includes__unix.hh) = be0a5cd0a1328c84a7a4fc5415553aa2b680699a
-SHA1 (patch-vm_src_unix_os_os__unix.cpp) = f41ce3619a5b4fe89887a435a80c2ad740b4c926
-SHA1 (patch-vm_src_unix_os_os__unix.hh) = afc4d067f5737af892ef72b75342d2bb62dc3b4f
-SHA1 (patch-vm_src_unix_os_sig__unix.hh) = 2d0beed746b8568582a91277e2891d949e7f6395
+SHA1 (patch-vm_cmake_netbsd.cmake) = 5d6ccfb3d81a02090273cf5eae32771232f75325
+SHA1 (patch-vm_cmake_platform.cmake) = d286abe3036d6a91ecc4ce8784bcca8625066da5
+SHA1 (patch-vm_src_any_asm_asm.cpp) = 2e2c871392bad61f2d628457952431f9419e37b9
+SHA1 (patch-vm_src_any_fast__compiler_fcompiler.hh) = a335f367fd06e86b1c8ae3e4bc6ef0d8b8f99375
+SHA1 (patch-vm_src_any_runtime_allocation.cpp) = 2c3b7e31681f86e0f8ed3c9983cba476673564b5
+SHA1 (patch-vm_src_any_runtime_config.hh) = c0f472dfd418633ffc0cee8e8dba9feed354a7c8
+SHA1 (patch-vm_src_any_runtime_uncommonBranch.cpp) = abe1da1784b33b15b3e01798bf593796a0d17e76
+SHA1 (patch-vm_src_i386_runtime_interruptedCtx__i386.cpp) = 052d1ae22dfd3e08a34e23b3463afc9ae4e32a2f
+SHA1 (patch-vm_src_i386_runtime_runtime__i386.hh) = 1506e59e2e0fc4369317fdd74bb77f91c64aaec5
+SHA1 (patch-vm_src_unix_os_errorCodes__unix.cpp) = c5cb8f7ca2da40aca5dc56440f1d917d3c2faa95
+SHA1 (patch-vm_src_unix_os_itimer__unix.cpp) = e3f5e5abf9b62e69cf2b99b8846436af4309886f
+SHA1 (patch-vm_src_unix_os_os__includes__unix.hh) = 0d2c6898b2aee70d3425cb7ed7c75124523b03bd
+SHA1 (patch-vm_src_unix_os_os__unix.cpp) = 016c0c42da6d81afa77ebfb779ac1561a491eef6
+SHA1 (patch-vm_src_unix_os_os__unix.hh) = 0822df62ebd9c879fd96ffda669afe71343c49d8
+SHA1 (patch-vm_src_unix_os_sig__unix.cpp) = a62733df62c355be7b1b210298cdee6bddedf23e
+SHA1 (patch-vm_src_unix_os_sig__unix.hh) = 0179a4af82a0c15219d68033ec1ce0735b8d9001
+SHA1 (patch-vm_src_unix_prims_unixPrims.cpp) = ca010b6985bad6b86e6c774c0d3e161e8f97e8ed
+SHA1 (patch-vm_src_unix_runtime_machineCache__unix.cpp) = aa50bfbfd0c2829a3cf2281ffc829d2d40a4ea95
+SHA1 (patch-vm_src_unix_runtime_monitorPieces__unix.cpp) = d96b2f22b9e0034cbf3c5c312b46b443f478104d
diff --git a/self-git/patches/patch-vm_cmake_netbsd.cmake b/self-git/patches/patch-vm_cmake_netbsd.cmake
index cf2772b5c3..4f02f32e95 100644
--- a/self-git/patches/patch-vm_cmake_netbsd.cmake
+++ b/self-git/patches/patch-vm_cmake_netbsd.cmake
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/cmake/netbsd.cmake.orig	2019-07-21 23:10:42.764519867 +0000
+--- vm/cmake/netbsd.cmake.orig	2019-07-22 01:27:52.029840778 +0000
 +++ vm/cmake/netbsd.cmake
 @@ -0,0 +1,58 @@
 +#!/usr/bin/env cmake
@@ -59,5 +59,5 @@ $NetBSD$
 +#
 +macro(include_prefix_header target file)
 +  # "super"
-+  include_prefix_header_common(${target} ${file})
++#  include_prefix_header_common(${target} ${file})
 +endmacro()
diff --git a/self-git/patches/patch-vm_cmake_platform.cmake b/self-git/patches/patch-vm_cmake_platform.cmake
index 48aa0bfa23..b1353aa45a 100644
--- a/self-git/patches/patch-vm_cmake_platform.cmake
+++ b/self-git/patches/patch-vm_cmake_platform.cmake
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/cmake/platform.cmake.orig	2019-07-21 22:47:42.000000000 +0000
+--- vm/cmake/platform.cmake.orig	2019-07-22 01:11:46.000000000 +0000
 +++ vm/cmake/platform.cmake
 @@ -53,6 +53,15 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(Solar
    set(platform_name "Solaris")  
diff --git a/self-git/patches/patch-vm_src_any_asm_asm.cpp b/self-git/patches/patch-vm_src_any_asm_asm.cpp
new file mode 100644
index 0000000000..d532f39b51
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_asm_asm.cpp
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- vm/src/any/asm/asm.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/asm/asm.cpp
+@@ -181,7 +181,7 @@ void BaseAssembler::self_test() {
+ 
+ 
+ static const char *underscoreOrNot =
+-  TARGET_OS_VERSION == LINUX_VERSION  ?  ""  :  "_";
++  (TARGET_OS_VERSION == LINUX_VERSION || TARGET_OS_VERSION == NETBSD_VERSION)  ?  ""  :  "_";
+ 
+ void BaseAssembler::prepare_to_test() {
+   lprintf_file = fopen(test_file_s, "w");
+@@ -203,7 +203,7 @@ void BaseAssembler::assemble_test_file()
+   char buf[1000];
+   sprintf(buf, "cc -c %s; cc %s -c %s; cc %s %s; ./a.out>%s", 
+     test_file_c,
+-    # if TARGET_OS_VERSION == LINUX_VERSION
++    # if TARGET_OS_VERSION == LINUX_VERSION || TARGET_OS_VERSION == NETBSD_VERSION
+ 	"",
+     # else
+ 	"-arch i386",
+@@ -255,4 +255,3 @@ void BaseAssembler::generate_test_instru
+ 
+ 
+ # endif // defined(FAST_COMPILER) || defined(SIC_COMPILER)
+-
diff --git a/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh b/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
new file mode 100644
index 0000000000..4ed7aeba56
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- vm/src/any/fast_compiler/fcompiler.hh.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/fast_compiler/fcompiler.hh
+@@ -9,13 +9,13 @@
+   # pragma interface
+ # endif
+ 
++#include "aCompiler.hh"
++
+ 
+ // The FCompiler structure holds global state associated with the current
+ // NIC compilation. (NIC stands for "non-inlining compiler"; for historical
+ // reasons, the NIC's classes & files start with f for "fast".)
+ 
+-extern FCompiler* theCompiler;
+-
+ class FCompiler:  public AbstractCompiler {
+  public:
+   int32 countID;
+@@ -65,5 +65,6 @@ class FCompiler:  public AbstractCompile
+ 
+ };
+ 
++extern FCompiler* theCompiler;
+ 
+ # endif // FAST_COMPILER
diff --git a/self-git/patches/patch-vm_src_any_runtime_allocation.cpp b/self-git/patches/patch-vm_src_any_runtime_allocation.cpp
new file mode 100644
index 0000000000..061cdfeb7b
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_runtime_allocation.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- vm/src/any/runtime/allocation.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/runtime/allocation.cpp
+@@ -312,7 +312,7 @@ static int32 true_size_of_malloced_obj(i
+       -2;
+ #   elif  TARGET_ARCH == I386_ARCH   &&  COMPILER == GCC_COMPILER   &&   TARGET_OS_VERSION == MACOSX_VERSION
+       -2;
+-#   elif  TARGET_ARCH == I386_ARCH   &&  COMPILER == GCC_COMPILER   &&    (TARGET_OS_VERSION ==  LINUX_VERSION  ||  TARGET_OS_VERSION == SOLARIS_VERSION)
++#   elif  TARGET_ARCH == I386_ARCH   &&  COMPILER == GCC_COMPILER   &&    (TARGET_OS_VERSION ==  LINUX_VERSION  ||  TARGET_OS_VERSION == SOLARIS_VERSION || TARGET_OS_VERSION == NETBSD_VERSION)
+       -1;
+ #   else
+ 	# error What is it?
diff --git a/self-git/patches/patch-vm_src_any_runtime_config.hh b/self-git/patches/patch-vm_src_any_runtime_config.hh
new file mode 100644
index 0000000000..892d327735
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_runtime_config.hh
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- vm/src/any/runtime/config.hh.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/runtime/config.hh
+@@ -17,7 +17,7 @@
+    HOST_ARCH is where the compiler is running, one of SPARC_ARCH, M68K_ARCH, PPC_ARCH, I386_ARCH
+    TARGET_ARCH is the platform we are compiling for
+    TARGET_OS_FAMILY: UNIX_FAMILY, MACOS_FAMILY
+-   TARGET_OS_VERSION: SUNOS_VERSION, SOLARIS_VERSION, MACOS_SYSTEM_7_VERSION, LINUX_VERSION
++   TARGET_OS_VERSION: SUNOS_VERSION, SOLARIS_VERSION, MACOS_SYSTEM_7_VERSION, LINUX_VERSION, NETBSD_VERSION
+    COMPILER is the compiler we are using:
+      CC_COMPILER, GCC_COMPILER, MWERKS_COMPILER, SPARCWORKS_COMPILER
+ 
+@@ -53,6 +53,7 @@
+ # define   MACOS_CARBON_VERSION 4 // Carbon 9/10 version
+ # define         MACOSX_VERSION 5 // MacOSX native version
+ # define          LINUX_VERSION 6 // Ubuntu
++# define         NETBSD_VERSION 7 // 8.99.51 tested
+ 
+ # define         CC_COMPILER 1
+ # define        GCC_COMPILER 2
diff --git a/self-git/patches/patch-vm_src_any_runtime_uncommonBranch.cpp b/self-git/patches/patch-vm_src_any_runtime_uncommonBranch.cpp
new file mode 100644
index 0000000000..c4d7cb75e3
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_runtime_uncommonBranch.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- vm/src/any/runtime/uncommonBranch.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/runtime/uncommonBranch.cpp
+@@ -124,7 +124,8 @@
+ # if  TARGET_OS_VERSION == SOLARIS_VERSION \
+    || TARGET_OS_FAMILY == MACOS_FAMILY \
+    || TARGET_OS_VERSION == MACOSX_VERSION \
+-   || TARGET_OS_VERSION == LINUX_VERSION
++   || TARGET_OS_VERSION == LINUX_VERSION \
++   || TARGET_OS_VERSION == NETBSD_VERSION
+   void uncommonBranch_init() { }
+ # elif  TARGET_OS_VERSION == SUNOS_VERSION
+   extern "C" {
diff --git a/self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp b/self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
new file mode 100644
index 0000000000..3dccaf3f8f
--- /dev/null
+++ b/self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
@@ -0,0 +1,53 @@
+$NetBSD$
+
+--- vm/src/i386/runtime/interruptedCtx_i386.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/i386/runtime/interruptedCtx_i386.cpp
+@@ -101,6 +101,18 @@ int* InterruptedContext::ebp_addr() {
+   return (int*) &((ucontext_t*) scp)->uc_mcontext.gregs[REG_FP];
+ }
+ 
++# elif TARGET_OS_VERSION == NETBSD_VERSION
++
++  char** InterruptedContext::pc_addr() {
++    return  (char**) &scp->uc_mcontext.__gregs[_REG_EIP]; // see /usr/include/asm-i386/sigcontext.h
++  }
++  int* InterruptedContext::sp_addr() {
++    return  (int*) &scp->uc_mcontext.__gregs[_REG_ESP];
++  }
++  int* InterruptedContext::ebp_addr() {
++    return  (int*) &scp->uc_mcontext.__gregs[_REG_EBP];
++  }
++
+ # else
+   # error What OS version?
+ # endif
+@@ -180,6 +192,29 @@ void InterruptedContext::print_registers
+   lprintf("err       = 0x%x\n", gregs[ERR]);
+   lprintf("uesp      = 0x%x\n", gregs[UESP]);
+ 
++  # elif TARGET_OS_VERSION == NETBSD_VERSION
++
++    greg_t *gregs = ic->scp->uc_mcontext.__gregs;
++    lprintf("eax       = 0x%x\n", gregs[_REG_EAX]);
++    lprintf("ebx       = 0x%x\n", gregs[_REG_EBX]);
++    lprintf("ecx       = 0x%x\n", gregs[_REG_ECX]);
++    lprintf("edx       = 0x%x\n", gregs[_REG_EDX]);
++    lprintf("esi       = 0x%x\n", gregs[_REG_ESI]);
++    lprintf("edi       = 0x%x\n", gregs[_REG_EDI]);
++    lprintf("ebp       = 0x%x\n", gregs[_REG_EBP]);
++    lprintf("esp       = 0x%x\n", gregs[_REG_ESP]);
++    lprintf("ss        = 0x%x\n", gregs[_REG_SS]);
++    lprintf("efl       = 0x%x\n", gregs[_REG_EFL]);
++    lprintf("eip       = 0x%x\n", gregs[_REG_EIP]);
++    lprintf("cs        = 0x%x\n", gregs[_REG_CS]);
++    lprintf("ds        = 0x%x\n", gregs[_REG_DS]);
++    lprintf("es        = 0x%x\n", gregs[_REG_ES]);
++    lprintf("fs        = 0x%x\n", gregs[_REG_FS]);
++    lprintf("gs        = 0x%x\n", gregs[_REG_GS]);
++    lprintf("trapno    = 0x%x\n", gregs[_REG_TRAPNO]);
++    lprintf("err       = 0x%x\n", gregs[_REG_ERR]);
++    lprintf("uesp      = 0x%x\n", gregs[_REG_UESP]);
++
+   # else
+ 	# error What OS?
+   # endif
diff --git a/self-git/patches/patch-vm_src_i386_runtime_runtime__i386.hh b/self-git/patches/patch-vm_src_i386_runtime_runtime__i386.hh
new file mode 100644
index 0000000000..af88e2c982
--- /dev/null
+++ b/self-git/patches/patch-vm_src_i386_runtime_runtime__i386.hh
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- vm/src/i386/runtime/runtime_i386.hh.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/i386/runtime/runtime_i386.hh
+@@ -29,7 +29,8 @@ inline char*     Byte_Map_Base() { retur
+ // must really flush windows, call out to asm stub
+ // Have to add this for Unix ppc
+ # if TARGET_OS_VERSION == MACOSX_VERSION \
+-  || TARGET_OS_VERSION == LINUX_VERSION
++  || TARGET_OS_VERSION == LINUX_VERSION \
++  || TARGET_OS_VERSION == NETBSD_VERSION
+ extern "C" {
+   void FlushInstruction(void* addr);
+ }
diff --git a/self-git/patches/patch-vm_src_unix_os_errorCodes__unix.cpp b/self-git/patches/patch-vm_src_unix_os_errorCodes__unix.cpp
new file mode 100644
index 0000000000..2d008ea5ca
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_os_errorCodes__unix.cpp
@@ -0,0 +1,131 @@
+$NetBSD$
+
+--- vm/src/unix/os/errorCodes_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/os/errorCodes_unix.cpp
+@@ -168,6 +168,107 @@
+     "ENOKEY", "EKEYEXPIRED", "EKEYREVOKED", "EKEYREJECTED", "EOWNERDEAD",
+     "ENOTRECOVERABLE"
+ 
++# elif  TARGET_OS_VERSION == NETBSD_VERSION
++
++    "NOERR",
++
++    "EPERM" // 1
++    "ENOENT" // 2
++    "ESRCH" // 3
++    "EINTR" // 4
++    "EIO" // 5
++    "ENXIO" // 6
++    "E2BIG" // 7
++    "ENOEXEC" // 8
++    "EBADF" // 9
++    "ECHILD" // 10
++    "EDEADLK" // 11
++    "ENOMEM" // 12
++    "EACCES" // 13
++    "EFAULT" // 14
++    "ENOTBLK" // 15
++    "EBUSY" // 16
++    "EEXIST" // 17
++    "EXDEV" // 18
++    "ENODEV" // 19
++    "ENOTDIR" // 20
++    "EISDIR" // 21
++    "EINVAL" // 22
++    "ENFILE" // 23
++    "EMFILE" // 24
++    "ENOTTY" // 25
++    "ETXTBSY" // 26
++    "EFBIG" // 27
++    "ENOSPC" // 28
++    "ESPIPE" // 29
++    "EROFS" // 30
++    "EMLINK" // 31
++    "EPIPE" // 32
++    "EDOM" // 33
++    "ERANGE" // 34
++    "EAGAIN" // 35
++    "EINPROGRESS" // 36
++    "EALREADY" // 37
++    "ENOTSOCK" // 38
++    "EDESTADDRREQ" // 39
++    "EMSGSIZE" // 40
++    "EPROTOTYPE" // 41
++    "ENOPROTOOPT" // 42
++    "EPROTONOSUPPORT" // 43
++    "ESOCKTNOSUPPORT" // 44
++    "EOPNOTSUPP" // 45
++    "EPFNOSUPPORT" // 46
++    "EAFNOSUPPORT" // 47
++    "EADDRINUSE" // 48
++    "EADDRNOTAVAIL" // 49
++    "ENETDOWN" // 50
++    "ENETUNREACH" // 51
++    "ENETRESET" // 52
++    "ECONNABORTED" // 53
++    "ECONNRESET" // 54
++    "ENOBUFS" // 55
++    "EISCONN" // 56
++    "ENOTCONN" // 57
++    "ESHUTDOWN" // 58
++    "ETOOMANYREFS" // 59
++    "ETIMEDOUT" // 60
++    "ECONNREFUSED" // 61
++    "ELOOP" // 62
++    "ENAMETOOLONG" // 63
++    "EHOSTDOWN" // 64
++    "EHOSTUNREACH" // 65
++    "ENOTEMPTY" // 66
++    "EPROCLIM" // 67
++    "EUSERS" // 68
++    "EDQUOT" // 69
++    "ESTALE" // 70
++    "EREMOTE" // 71
++    "EBADRPC" // 72
++    "ERPCMISMATCH" // 73
++    "EPROGUNAVAIL" // 74
++    "EPROGMISMATCH" // 75
++    "EPROCUNAVAIL" // 76
++    "ENOLCK" // 77
++    "ENOSYS" // 78
++    "EFTYPE" // 79
++    "EAUTH" // 80
++    "ENEEDAUTH" // 81
++    "EIDRM" // 82
++    "ENOMSG" // 83
++    "EOVERFLOW" // 84
++    "EILSEQ" // 85
++    "ENOTSUP" // 86
++    "ECANCELED" // 87
++    "EBADMSG" // 88
++    "ENODATA" // 89
++    "ENOSR" // 90
++    "ENOSTR" // 91
++    "ETIME" // 92
++    "ENOATTR" // 93
++    "EMULTIHOP" // 94
++    "ENOLINK" // 95
++    "EPROTO" // 96
++
+ #   else
+ 	# error what?
+ 
+@@ -179,7 +280,7 @@
+ static inline int numUnixErrors() { return sizeof(unixError) / sizeof(unixError[0]); }
+ 
+ 
+-#if TARGET_OS_VERSION != MACOSX_VERSION  &&  TARGET_OS_VERSION != LINUX_VERSION
++#if TARGET_OS_VERSION != MACOSX_VERSION  &&  TARGET_OS_VERSION != LINUX_VERSION && TARGET_OS_VERSION != NETBSD_VERSION
+ extern char* sys_errlist[];             // error messages corr. to errno.
+ extern int   sys_nerr;                  // length of above table
+ #endif // !MACOSX_VERSION
+@@ -194,7 +295,8 @@ const char* ErrorCodes::os_error_name(in
+ }
+ 
+ # if TARGET_OS_VERSION ==  LINUX_VERSION \
+-  || TARGET_OS_VERSION == MACOSX_VERSION
++  || TARGET_OS_VERSION == MACOSX_VERSION \
++  || TARGET_OS_VERSION == NETBSD_VERSION
+   # define ERROR_STRING(i) strerror(i)
+ # else
+   # define ERROR_STRING(i) (i < sys_nerr ? (char*)sys_errlist[i] : (char*)-1)
diff --git a/self-git/patches/patch-vm_src_unix_os_itimer__unix.cpp b/self-git/patches/patch-vm_src_unix_os_itimer__unix.cpp
new file mode 100644
index 0000000000..34cd4bbb4f
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_os_itimer__unix.cpp
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- vm/src/unix/os/itimer_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/os/itimer_unix.cpp
+@@ -37,7 +37,7 @@ class TimerEntry: public AbstractTimerEn
+ };
+ 
+ 
+-#if TARGET_OS_VERSION != SOLARIS_VERSION && TARGET_OS_VERSION != MACOSX_VERSION && TARGET_OS_VERSION != LINUX_VERSION
++#if TARGET_OS_VERSION != SOLARIS_VERSION && TARGET_OS_VERSION != MACOSX_VERSION && TARGET_OS_VERSION != LINUX_VERSION && TARGET_OS_VERSION != NETBSD_VERSION
+ extern "C" int setitimer(int which,
+                          struct itimerval *value,
+                          struct itimerval *ovalue);
+@@ -93,7 +93,8 @@ void IntervalTimer::enable() {
+   struct sigaction action;
+ # if  TARGET_OS_VERSION == SOLARIS_VERSION \
+   ||  TARGET_OS_VERSION ==  MACOSX_VERSION \
+-  ||  TARGET_OS_VERSION ==   LINUX_VERSION
++  ||  TARGET_OS_VERSION ==   LINUX_VERSION \
++  ||  TARGET_OS_VERSION ==  NETBSD_VERSION
+   action.sa_sigaction = (void (*)(int, siginfo_t*, void*)) IntervalTimerTick;
+   
+ # elif COMPILER != GCC_COMPILER  &&  TARGET_OS_VERSION == SUNOS_VERSION
+@@ -264,4 +265,3 @@ void IntervalTimer::do_async_tasks() {
+ }
+ 
+ TimerEntry* IntervalTimer::entry_at(int i) { return &entries()[i]; }
+-
diff --git a/self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh b/self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
index e913b0ffa0..caf61d87e0 100644
--- a/self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
+++ b/self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/src/unix/os/os_includes_unix.hh.orig	2019-07-21 22:47:42.000000000 +0000
+--- vm/src/unix/os/os_includes_unix.hh.orig	2019-07-22 01:11:46.000000000 +0000
 +++ vm/src/unix/os/os_includes_unix.hh
 @@ -41,7 +41,7 @@ extern "C" { 
  }
diff --git a/self-git/patches/patch-vm_src_unix_os_os__unix.cpp b/self-git/patches/patch-vm_src_unix_os_os__unix.cpp
index 395d0c1768..f9718c37fe 100644
--- a/self-git/patches/patch-vm_src_unix_os_os__unix.cpp
+++ b/self-git/patches/patch-vm_src_unix_os_os__unix.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/src/unix/os/os_unix.cpp.orig	2019-07-21 22:47:42.000000000 +0000
+--- vm/src/unix/os/os_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
 +++ vm/src/unix/os/os_unix.cpp
 @@ -195,6 +195,17 @@ void OS::init() {
    len = sizeof(mem_size);
diff --git a/self-git/patches/patch-vm_src_unix_os_os__unix.hh b/self-git/patches/patch-vm_src_unix_os_os__unix.hh
index 68df45718c..ad053bcbed 100644
--- a/self-git/patches/patch-vm_src_unix_os_os__unix.hh
+++ b/self-git/patches/patch-vm_src_unix_os_os__unix.hh
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/src/unix/os/os_unix.hh.orig	2019-07-21 22:47:42.000000000 +0000
+--- vm/src/unix/os/os_unix.hh.orig	2019-07-22 01:11:46.000000000 +0000
 +++ vm/src/unix/os/os_unix.hh
 @@ -14,6 +14,8 @@
    || TARGET_OS_VERSION == MACOSX_VERSION \
diff --git a/self-git/patches/patch-vm_src_unix_os_sig__unix.cpp b/self-git/patches/patch-vm_src_unix_os_sig__unix.cpp
new file mode 100644
index 0000000000..e94a3616fa
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_os_sig__unix.cpp
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- vm/src/unix/os/sig_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/os/sig_unix.cpp
+@@ -13,7 +13,8 @@ int SignalInterface::currentTimerSignal 
+ 
+ # if  TARGET_OS_VERSION == SOLARIS_VERSION \
+   ||  TARGET_OS_VERSION ==  MACOSX_VERSION \
+-  ||  TARGET_OS_VERSION ==   LINUX_VERSION
++  ||  TARGET_OS_VERSION ==   LINUX_VERSION \
++  ||  TARGET_OS_VERSION ==  NETBSD_VERSION
+   static void signal_handler(int sig, self_code_info_t *info = NULL, self_sig_context_t *scp = NULL);
+ # elif TARGET_OS_VERSION == SUNOS_VERSION
+   static void signal_handler(int sig, int code = 0, self_sig_context_t *scp = NULL, char *addr = NULL);
+@@ -209,7 +210,8 @@ static int32 ctrl_z_handler(int sig) {
+ 
+ # if  TARGET_OS_VERSION == SOLARIS_VERSION \
+   ||  TARGET_OS_VERSION ==  MACOSX_VERSION \
+-  ||  TARGET_OS_VERSION ==   LINUX_VERSION
++  ||  TARGET_OS_VERSION ==   LINUX_VERSION \
++  ||  TARGET_OS_VERSION ==  NETBSD_VERSION
+ static void signal_handler(int sig, self_code_info_t *info, self_sig_context_t *scp) {
+   if (InterruptedContext::the_interrupted_context->forwarded_to_self_thread(sig))
+     return;
+@@ -255,7 +257,8 @@ static void signal_handler(int sig, self
+ 
+ # if  TARGET_OS_VERSION == SOLARIS_VERSION \
+   ||  TARGET_OS_VERSION == MACOSX_VERSION \
+-  ||  TARGET_OS_VERSION ==  LINUX_VERSION
++  ||  TARGET_OS_VERSION ==  LINUX_VERSION \
++  ||  TARGET_OS_VERSION == NETBSD_VERSION
+ 
+ void SignalInterface::init_signal_stack() {
+   // ensure generic val is enough for ppc
diff --git a/self-git/patches/patch-vm_src_unix_os_sig__unix.hh b/self-git/patches/patch-vm_src_unix_os_sig__unix.hh
index f8fcbd7fb9..182cde3538 100644
--- a/self-git/patches/patch-vm_src_unix_os_sig__unix.hh
+++ b/self-git/patches/patch-vm_src_unix_os_sig__unix.hh
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- vm/src/unix/os/sig_unix.hh.orig	2019-07-21 22:47:42.000000000 +0000
+--- vm/src/unix/os/sig_unix.hh.orig	2019-07-22 01:11:46.000000000 +0000
 +++ vm/src/unix/os/sig_unix.hh
 @@ -42,7 +42,8 @@
  // So we use common code for both platforms as much as possible. -mabdelmalek 10/02
diff --git a/self-git/patches/patch-vm_src_unix_prims_unixPrims.cpp b/self-git/patches/patch-vm_src_unix_prims_unixPrims.cpp
new file mode 100644
index 0000000000..0891bf7289
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_prims_unixPrims.cpp
@@ -0,0 +1,70 @@
+$NetBSD$
+
+--- vm/src/unix/prims/unixPrims.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/prims/unixPrims.cpp
+@@ -5,6 +5,7 @@
+ 
+ # if !( TARGET_OS_VERSION ==  MACOSX_VERSION \
+   ||    TARGET_OS_VERSION ==   LINUX_VERSION \
++  ||    TARGET_OS_VERSION ==  NETBSD_VERSION \
+   || (  TARGET_OS_VERSION == SOLARIS_VERSION  && TARGET_ARCH == I386_ARCH))
+   # define FD_SETSIZE     256             /* max. number of open files */
+ # endif
+@@ -73,7 +74,8 @@ class IOCleanup {
+   || TARGET_OS_VERSION ==   LINUX_VERSION
+     if (isatty(STDIN))
+       ioctl(STDIN, TCGETS, (caddr_t)&normalSettings);
+-# elif TARGET_OS_VERSION == MACOSX_VERSION
++# elif TARGET_OS_VERSION == MACOSX_VERSION \
++  || TARGET_OS_VERSION ==  NETBSD_VERSION
+     // not sure what to do
+     if (isatty(STDIN))
+       ioctl(STDIN, TIOCGETA, (caddr_t)&normalSettings);
+@@ -92,7 +94,8 @@ void resetTerminal() {
+   ||  TARGET_OS_VERSION ==   LINUX_VERSION
+     if (isatty(STDIN))
+       ioctl(STDIN, TCSETS, (caddr_t)&normalSettings);
+-# elif TARGET_OS_VERSION == MACOSX_VERSION
++# elif TARGET_OS_VERSION == MACOSX_VERSION \
++  ||  TARGET_OS_VERSION ==   NETBSD_VERSION
+     if (isatty(STDIN))
+       ioctl(STDIN, TIOCSETA, (caddr_t)&normalSettings);
+ # else
+@@ -162,7 +165,7 @@ void resetTerminal() {
+     }
+   # endif  
+ 
+-# elif  TARGET_OS_VERSION == LINUX_VERSION
++# elif  TARGET_OS_VERSION == LINUX_VERSION || TARGET_OS_VERSION == NETBSD_VERSION
+     static int c_lib_write(int fd, const char* buf, int nbytes) {
+       return write(fd, buf, nbytes);
+     }    
+@@ -170,7 +173,7 @@ void resetTerminal() {
+   # error what?
+ # endif
+ 
+- # if TARGET_OS_VERSION != MACOSX_VERSION  &&  TARGET_OS_VERSION != LINUX_VERSION
++ # if TARGET_OS_VERSION != MACOSX_VERSION  &&  TARGET_OS_VERSION != LINUX_VERSION && TARGET_OS_VERSION != NETBSD_VERSION
+ 
+ extern "C" int write(int fd, const void* b, nbytes_t nbytes) {
+     int32 res;
+@@ -251,7 +254,8 @@ static void set_sockaddr_in(struct socka
+   long aLong;
+ #   if  TARGET_OS_VERSION == SOLARIS_VERSION  \
+     ||  TARGET_OS_VERSION == MACOSX_VERSION   \
+-    ||  TARGET_OS_VERSION == LINUX_VERSION
++    ||  TARGET_OS_VERSION == LINUX_VERSION \
++    ||  TARGET_OS_VERSION == NETBSD_VERSION
+     memcpy((char*) &aLong, address, sizeof(long));
+     memset(a.sin_zero, 0, sizeof(a.sin_zero));
+ # elif  TARGET_OS_VERSION == SUNOS_VERSION
+@@ -588,7 +592,8 @@ void unixPrims_init() { ioC = new IOClea
+ void unixPrims_exit() { delete ioC; }
+ 
+ # if TARGET_OS_VERSION == MACOSX_VERSION \
+-  || TARGET_OS_VERSION ==  LINUX_VERSION
++  || TARGET_OS_VERSION ==  LINUX_VERSION \
++  || TARGET_OS_VERSION ==  NETBSD_VERSION
+   static struct utsname my_utsname;
+   char*  sysname_wrap(void* FH) { return uname(&my_utsname) ? (unix_failure(FH), (char*)NULL) : my_utsname. sysname; }
+   char* nodename_wrap(void* FH) { return uname(&my_utsname) ? (unix_failure(FH), (char*)NULL) : my_utsname.nodename; }
diff --git a/self-git/patches/patch-vm_src_unix_runtime_machineCache__unix.cpp b/self-git/patches/patch-vm_src_unix_runtime_machineCache__unix.cpp
new file mode 100644
index 0000000000..74bae4a64c
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_runtime_machineCache__unix.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- vm/src/unix/runtime/machineCache_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/runtime/machineCache_unix.cpp
+@@ -83,6 +83,12 @@
+ 
+   void MachineCache::flush_instruction_cache_range(void* s, void* e) {}
+ 
++# elif TARGET_OS_VERSION == NETBSD_VERSION \
++    && TARGET_ARCH       == I386_ARCH
++  void MachineCache::flush_instruction_cache_word(void* addr) { }
++
++  void MachineCache::flush_instruction_cache_range(void* s, void* e) {}
++
+ # elif TARGET_OS_VERSION == SOLARIS_VERSION \
+     && TARGET_ARCH       == I386_ARCH
+ void MachineCache::flush_instruction_cache_word(void* addr) { }
diff --git a/self-git/patches/patch-vm_src_unix_runtime_monitorPieces__unix.cpp b/self-git/patches/patch-vm_src_unix_runtime_monitorPieces__unix.cpp
new file mode 100644
index 0000000000..0cf9cd071c
--- /dev/null
+++ b/self-git/patches/patch-vm_src_unix_runtime_monitorPieces__unix.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- vm/src/unix/runtime/monitorPieces_unix.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/unix/runtime/monitorPieces_unix.cpp
+@@ -57,7 +57,8 @@ ProcessTime ProcessInfo::system_time(){
+ } 
+ 
+ # elif  TARGET_OS_VERSION == SUNOS_VERSION  \
+-  ||  TARGET_OS_VERSION ==   LINUX_VERSION
++  ||  TARGET_OS_VERSION ==   LINUX_VERSION \
++  ||  TARGET_OS_VERSION ==   NETBSD_VERSION
+ 
+ static struct rusage process_info_ru;
+ 
+@@ -189,4 +190,3 @@ void InterruptedFrameMonitor::get_frame_
+   f  = InterruptedContext::the_interrupted_context->sp();
+   pc = InterruptedContext::the_interrupted_context->pc();
+ }
+-


Home | Main Index | Thread Index | Old Index