pkgsrc-WIP-changes archive

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

self-git: porting to NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Jul 22 07:06:16 2019 +0200
Changeset:	59dbaa4df132089d0f2334512ee6dfafa314410e

Modified Files:
	self-git/Makefile
	self-git/distinfo
	self-git/patches/patch-vm_cmake_netbsd.cmake
	self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
	self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
	self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
Added Files:
	self-git/patches/patch-vm_src_any_runtime_nprofiler.hh
	self-git/patches/patch-vm_src_any_zone_fprofiler.cpp
	self-git/patches/patch-vm_src_i386_prims_asmPrims__i386.S
	self-git/patches/patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh

Log Message:
self-git: porting to NetBSD

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

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

diffstat:
 self-git/Makefile                                  |  4 +++
 self-git/distinfo                                  | 12 +++++---
 self-git/patches/patch-vm_cmake_netbsd.cmake       |  2 +-
 .../patch-vm_src_any_fast__compiler_fcompiler.hh   | 17 +++-------
 .../patches/patch-vm_src_any_runtime_nprofiler.hh  | 13 ++++++++
 .../patches/patch-vm_src_any_zone_fprofiler.cpp    | 36 ++++++++++++++++++++++
 .../patch-vm_src_i386_prims_asmPrims__i386.S       | 35 +++++++++++++++++++++
 ...patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh | 31 +++++++++++++++++++
 ...ch-vm_src_i386_runtime_interruptedCtx__i386.cpp |  2 +-
 .../patch-vm_src_unix_os_os__includes__unix.hh     | 14 +++++----
 10 files changed, 141 insertions(+), 25 deletions(-)

diffs:
diff --git a/self-git/Makefile b/self-git/Makefile
index 2bca47ddfd..ba340d9871 100644
--- a/self-git/Makefile
+++ b/self-git/Makefile
@@ -13,5 +13,9 @@ USE_LANGUAGES=	c c++
 
 USE_CMAKE=	yes
 
+BUILDLINK_TRANSFORM+=	rm:-O2
+
 .include "../../wip/mk/git-package.mk"
+
+.include "../../x11/libX11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/self-git/distinfo b/self-git/distinfo
index 3feea3e2bc..22f84f364a 100644
--- a/self-git/distinfo
+++ b/self-git/distinfo
@@ -1,17 +1,21 @@
 $NetBSD$
 
-SHA1 (patch-vm_cmake_netbsd.cmake) = 5d6ccfb3d81a02090273cf5eae32771232f75325
+SHA1 (patch-vm_cmake_netbsd.cmake) = d4d328e7943566637bb2276f75f2f1e892697bc9
 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_fast__compiler_fcompiler.hh) = aeea0dd81f15f2c2444e0d75a074447627a3c717
 SHA1 (patch-vm_src_any_runtime_allocation.cpp) = 2c3b7e31681f86e0f8ed3c9983cba476673564b5
 SHA1 (patch-vm_src_any_runtime_config.hh) = c0f472dfd418633ffc0cee8e8dba9feed354a7c8
+SHA1 (patch-vm_src_any_runtime_nprofiler.hh) = 8f24a4f143b1ce40801de64f66f646b56bef6a14
 SHA1 (patch-vm_src_any_runtime_uncommonBranch.cpp) = abe1da1784b33b15b3e01798bf593796a0d17e76
-SHA1 (patch-vm_src_i386_runtime_interruptedCtx__i386.cpp) = 052d1ae22dfd3e08a34e23b3463afc9ae4e32a2f
+SHA1 (patch-vm_src_any_zone_fprofiler.cpp) = e635aba3e05752fc9a9da4a5a7c2af3233dd7abd
+SHA1 (patch-vm_src_i386_prims_asmPrims__i386.S) = 0bd221cfa8e48b4831db4f0b8b91efdf48c15846
+SHA1 (patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh) = 1c15430785d48f9189f08ffb3198d472b49cd6ee
+SHA1 (patch-vm_src_i386_runtime_interruptedCtx__i386.cpp) = 9119d6c869c4b3424e1207cb0f2e40d043074a05
 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__includes__unix.hh) = 203d7d5655a6b3870a3335364757ee3049a4e215
 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
diff --git a/self-git/patches/patch-vm_cmake_netbsd.cmake b/self-git/patches/patch-vm_cmake_netbsd.cmake
index 4f02f32e95..6167b9d08d 100644
--- a/self-git/patches/patch-vm_cmake_netbsd.cmake
+++ b/self-git/patches/patch-vm_cmake_netbsd.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_src_any_fast__compiler_fcompiler.hh b/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
index 4ed7aeba56..c55d450d0c 100644
--- a/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
+++ b/self-git/patches/patch-vm_src_any_fast__compiler_fcompiler.hh
@@ -2,26 +2,17 @@ $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
+@@ -10,6 +10,7 @@
  # 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
+@@ -65,5 +66,4 @@ class FCompiler:  public AbstractCompile
  
  };
  
-+extern FCompiler* theCompiler;
- 
+-
  # endif // FAST_COMPILER
diff --git a/self-git/patches/patch-vm_src_any_runtime_nprofiler.hh b/self-git/patches/patch-vm_src_any_runtime_nprofiler.hh
new file mode 100644
index 0000000000..43a46ccfef
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_runtime_nprofiler.hh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- vm/src/any/runtime/nprofiler.hh.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/runtime/nprofiler.hh
+@@ -102,7 +102,7 @@ class StackInfo {
+   // Variable computed at Profiler::suspend().
+   float computed_user_time;
+   float user_time() { return computed_user_time; }
+-# elif  TARGET_OS_FAMILY == MACOS_FAMILY
++# elif  TARGET_OS_FAMILY == MACOS_FAMILY || TARGET_OS_FAMILY == NETBSD_VERSION || defined(__NetBSD__)
+   float user_time() { return 0.0; } // unimp mac
+ # else
+   # error which?
diff --git a/self-git/patches/patch-vm_src_any_zone_fprofiler.cpp b/self-git/patches/patch-vm_src_any_zone_fprofiler.cpp
new file mode 100644
index 0000000000..7228547e96
--- /dev/null
+++ b/self-git/patches/patch-vm_src_any_zone_fprofiler.cpp
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- vm/src/any/zone/fprofiler.cpp.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/any/zone/fprofiler.cpp
+@@ -15,7 +15,7 @@
+ # define PROFIL_SCALE   (0x10000 >> SHIFT)   /* see profil(2) man page */
+ # define scale(offset)  ((offset >> SHIFT) / sizeof(PCounter))
+ 
+-# if  TARGET_OS_VERSION == MACOSX_VERSION   &&  OSX_RELEASE >= MOUNTAIN_LION_RELEASE 
++# if  (TARGET_OS_VERSION == MACOSX_VERSION   &&  OSX_RELEASE >= MOUNTAIN_LION_RELEASE)
+ 
+ extern "C" int profil( char* /*buf*/,
+             size_t   /*bufsiz*/,
+@@ -24,7 +24,7 @@ extern "C" int profil( char* /*buf*/,
+   fatal("unimp mac");
+   return 0;
+ }
+-# elif TARGET_OS_FAMILY == UNIX_FAMILY
++# elif TARGET_OS_FAMILY == UNIX_FAMILY && !(TARGET_OS_VERSION == NETBSD_VERSION)
+ /* Pick this up from header file:
+   extern "C" void profil(unsigned short *buf,
+                          unsigned int bufsiz,
+@@ -337,7 +337,7 @@ oop PrintFlatProfile_prim(oop r, smi lin
+ // need this entry point either way
+ 
+ void SelfFlatProfile(bool on) {
+-  # if TARGET_OS_VERSION == MACOSX_VERSION
++  # if TARGET_OS_VERSION == MACOSX_VERSION || TARGET_OS_VERSION == NETBSD_VERSION
+     typedef  char *           buf_t;
+   # else // ! MACOSX_VERSION
+     typedef unsigned short *  buf_t;
+@@ -360,4 +360,3 @@ void SelfFlatProfile(bool on) {
+       warning("_FlatProfile: only works with unprofiled VM");
+   # endif
+ }
+-
diff --git a/self-git/patches/patch-vm_src_i386_prims_asmPrims__i386.S b/self-git/patches/patch-vm_src_i386_prims_asmPrims__i386.S
new file mode 100644
index 0000000000..b98afef9aa
--- /dev/null
+++ b/self-git/patches/patch-vm_src_i386_prims_asmPrims__i386.S
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- vm/src/i386/prims/asmPrims_i386.S.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/i386/prims/asmPrims_i386.S
+@@ -17,10 +17,10 @@
+             leal   C_SYM(VMString), %eax
+         
+         # if defined(__APPLE__) \
+-         || (defined(__linux__) && defined(__clang__) && !defined(NO_INTEGRATED_AS_clang))
++         || ((defined(__linux__) || defined(__NetBSD__)) && defined(__clang__) && !defined(NO_INTEGRATED_AS_clang))
+             movl   $0(%eax), %eax
+         
+-        # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS)
++        # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS) || defined(__NetBSD__)
+             movl   \error_code(%eax), %eax
+         
+         # else
+@@ -37,7 +37,7 @@ ret_overflow: ret_prim_error overflowOff
+          
+         MACRO(setup_arith_prim, name rcreg argreg)
+         # if defined(__APPLE__) \
+-        || (defined(__linux__) && defined(__clang__) && !defined(NO_INTEGRATED_AS_clang))
++        || ((defined(__linux__) || defined(__NetBSD__)) && defined(__clang__) && !defined(NO_INTEGRATED_AS_clang))
+             start_exported_function $0
+              movl    8(%esp), $2
+              testl   $(Tag_Mask), $2
+@@ -45,7 +45,7 @@ ret_overflow: ret_prim_error overflowOff
+              movl    4(%esp), $1
+              testl   $(Tag_Mask), $1
+              jne     ret_bad_type
+-        # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS)
++        # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS) || defined(__NetBSD__)
+             start_exported_function \name
+              movl    8(%esp), \argreg
+              testl   $(Tag_Mask), \argreg
diff --git a/self-git/patches/patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh b/self-git/patches/patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh
new file mode 100644
index 0000000000..83825d398a
--- /dev/null
+++ b/self-git/patches/patch-vm_src_i386_runtime_asmDefs__gcc__i386.hh
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- vm/src/i386/runtime/asmDefs_gcc_i386.hh.orig	2019-07-22 01:11:46.000000000 +0000
++++ vm/src/i386/runtime/asmDefs_gcc_i386.hh
+@@ -20,7 +20,7 @@
+   # define MACRO(name, ...) .macro name // __VA_ARGS__
+   # define ENDMACRO .endmacro
+   # define C_SYM(name) _##name
+-# elif defined(__linux__) || (defined(SOLARIS) && SOLARIS)
++# elif defined(__linux__) || (defined(SOLARIS) && SOLARIS) || defined(__NetBSD__)
+   # if defined(__clang__) && !defined(NO_INTEGRATED_AS_clang)
+     # define MACRO(name, ...) .macro name // __VA_ARGS__
+     # define ENDMACRO .endmacro
+@@ -91,7 +91,7 @@ MACRO(start_exported_function, name)
+   .globl C_SYM($0)
+ C_SYM($0):
+ 
+-# elif defined(__linux__) || (defined(SOLARIS) && SOLARIS)
++# elif defined(__linux__) || (defined(SOLARIS) && SOLARIS) || defined(__NetBSD__)
+ 
+   .global C_SYM(\name)
+ C_SYM(\name):
+@@ -181,7 +181,7 @@ ENDMACRO
+       ENDMACRO
+ 
+ 
+-    # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS)
++    # elif defined(__linux__) || (defined(SOLARIS) && SOLARIS) || defined(__NetBSD__)
+       MACRO(jmp_reg, reg)
+         jmp *\reg
+       ENDMACRO
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
index 3dccaf3f8f..dd1b49ec75 100644
--- a/self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
+++ b/self-git/patches/patch-vm_src_i386_runtime_interruptedCtx__i386.cpp
@@ -27,7 +27,7 @@ $NetBSD$
  
 +  # elif TARGET_OS_VERSION == NETBSD_VERSION
 +
-+    greg_t *gregs = ic->scp->uc_mcontext.__gregs;
++    __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]);
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 caf61d87e0..0714a9eaf3 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
@@ -11,16 +11,18 @@ $NetBSD$
  # include <alloca.h>
  #endif
  
-@@ -78,6 +78,8 @@ extern "C" { 
+@@ -78,6 +78,10 @@ extern "C" { 
  #   include <termios.h>
  #   include <sys/ioctl.h>
  #   include <pthread.h>
 +# elif TARGET_OS_VERSION == NETBSD_VERSION
++#   include <sys/types.h>
++#   include <sys/sysctl.h>
 +#   include <termios.h>
  # else
  #   include <termio.h>
  # endif
-@@ -103,7 +105,8 @@ extern "C" { 
+@@ -103,7 +107,8 @@ extern "C" { 
    typedef sigcontext       self_sig_context_t;
    typedef struct sigstack  self_stack_t;
  # elif TARGET_OS_VERSION == MACOSX_VERSION \
@@ -30,7 +32,7 @@ $NetBSD$
    typedef siginfo_t        self_code_info_t;
    typedef ucontext_t       self_sig_context_t;
    typedef stack_t          self_stack_t;
-@@ -164,7 +167,8 @@ extern "C" {
+@@ -164,7 +169,8 @@ extern "C" {
  
  
  # if TARGET_OS_VERSION != SOLARIS_VERSION  \
@@ -40,7 +42,7 @@ $NetBSD$
    #  include <sys/vadvise.h>
     extern "C" {
       int vadvise(int);
-@@ -205,6 +209,8 @@ extern "C" {
+@@ -205,6 +211,8 @@ extern "C" {
  # define FORK vfork
  # elif  TARGET_OS_VERSION == LINUX_VERSION
  # define FORK vfork
@@ -49,7 +51,7 @@ $NetBSD$
  # else
     error which?
  #endif
-@@ -228,7 +234,8 @@ const int Last_OS_Signal = SIGUSR2+1+20;
+@@ -228,7 +236,8 @@ const int Last_OS_Signal = SIGUSR2+1+20;
  
  # if  TARGET_OS_VERSION == SOLARIS_VERSION \
    ||  TARGET_OS_VERSION ==  MACOSX_VERSION \
@@ -59,7 +61,7 @@ $NetBSD$
  
    typedef void (*Signal_Handler_t)(int sig, self_code_info_t *info, self_sig_context_t *con);
  
-@@ -247,4 +254,4 @@ extern "C" { int malloc_verify(); }
+@@ -247,4 +256,4 @@ extern "C" { int malloc_verify(); }
  
  # if TARGET_OS_VERSION == MACOSX_VERSION
    typedef size_t nbytes_t;


Home | Main Index | Thread Index | Old Index