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 08:19:04 2019 +0200
Changeset: a99e70cbd5654be805544f88ef8742f4f5668663
Modified Files:
self-git/Makefile
self-git/distinfo
self-git/patches/patch-vm_src_unix_os_os__includes__unix.hh
self-git/patches/patch-vm_src_unix_os_os__unix.cpp
Log Message:
self-git: Porting to NetBSD
Add local kludges that with some manual interventions (beyond buildling
mechanism) link with i386 X11 on amd64.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a99e70cbd5654be805544f88ef8742f4f5668663
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
self-git/Makefile | 13 ++++++++++++-
self-git/distinfo | 4 ++--
.../patch-vm_src_unix_os_os__includes__unix.hh | 20 +++++++++++++-------
self-git/patches/patch-vm_src_unix_os_os__unix.cpp | 20 +++++++++++++++-----
4 files changed, 42 insertions(+), 15 deletions(-)
diffs:
diff --git a/self-git/Makefile b/self-git/Makefile
index ba340d9871..ea967cb4bc 100644
--- a/self-git/Makefile
+++ b/self-git/Makefile
@@ -15,7 +15,18 @@ USE_CMAKE= yes
BUILDLINK_TRANSFORM+= rm:-O2
+CFLAGS+= -I/usr/X11R7/include
+CXXFLAGS+= -I/usr/X11R7/include
+
.include "../../wip/mk/git-package.mk"
-.include "../../x11/libX11/buildlink3.mk"
+USE_X11=yes
+
+X11_LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/emul/netbsd32/lib
+X11_LDFLAGS+= -L${PREFIX}/emul/netbsd32/lib
+
+BUILTIN_INCLUDE_DIRS+= -I/usr/X11/include/
+
+.include "../../wip/compat80-x11/buildlink3.mk"
+#.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/self-git/distinfo b/self-git/distinfo
index 061bcc1122..2565e3a762 100644
--- a/self-git/distinfo
+++ b/self-git/distinfo
@@ -15,8 +15,8 @@ SHA1 (patch-vm_src_i386_runtime_interruptedCtx__i386.cpp) = 9119d6c869c4b3424e12
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) = 0644c041ec9e3eb028b56d00f52c7494995640f2
-SHA1 (patch-vm_src_unix_os_os__unix.cpp) = 016c0c42da6d81afa77ebfb779ac1561a491eef6
+SHA1 (patch-vm_src_unix_os_os__includes__unix.hh) = 8d258e572d1b82e0e26043f75beea7f953d2297b
+SHA1 (patch-vm_src_unix_os_os__unix.cpp) = 348f12580c5b3d88e5d1bfbf5aedf3b99d096603
SHA1 (patch-vm_src_unix_os_os__unix.hh) = 8e25a24b116e681d08c91267d4abe524606d488d
SHA1 (patch-vm_src_unix_os_sig__unix.cpp) = a62733df62c355be7b1b210298cdee6bddedf23e
SHA1 (patch-vm_src_unix_os_sig__unix.hh) = 0179a4af82a0c15219d68033ec1ce0735b8d9001
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 ef612e1108..97ae404a36 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
@@ -2,7 +2,13 @@ $NetBSD$
--- 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" {
+@@ -37,11 +37,13 @@
+ extern "C" {
+ extern void free(void *);
+ extern void *malloc(size_t);
++#if !defined(__NetBSD__)
+ extern void *memalign(size_t, size_t);
++#endif
}
# include <stdlib.h>
@@ -11,7 +17,7 @@ $NetBSD$
# include <alloca.h>
#endif
-@@ -78,6 +78,12 @@ extern "C" {
+@@ -78,6 +80,12 @@ extern "C" {
# include <termios.h>
# include <sys/ioctl.h>
# include <pthread.h>
@@ -24,7 +30,7 @@ $NetBSD$
# else
# include <termio.h>
# endif
-@@ -103,7 +109,8 @@ extern "C" {
+@@ -103,7 +111,8 @@ extern "C" {
typedef sigcontext self_sig_context_t;
typedef struct sigstack self_stack_t;
# elif TARGET_OS_VERSION == MACOSX_VERSION \
@@ -34,7 +40,7 @@ $NetBSD$
typedef siginfo_t self_code_info_t;
typedef ucontext_t self_sig_context_t;
typedef stack_t self_stack_t;
-@@ -164,7 +171,8 @@ extern "C" {
+@@ -164,7 +173,8 @@ extern "C" {
# if TARGET_OS_VERSION != SOLARIS_VERSION \
@@ -44,7 +50,7 @@ $NetBSD$
# include <sys/vadvise.h>
extern "C" {
int vadvise(int);
-@@ -205,6 +213,8 @@ extern "C" {
+@@ -205,6 +215,8 @@ extern "C" {
# define FORK vfork
# elif TARGET_OS_VERSION == LINUX_VERSION
# define FORK vfork
@@ -53,7 +59,7 @@ $NetBSD$
# else
error which?
#endif
-@@ -228,7 +238,8 @@ const int Last_OS_Signal = SIGUSR2+1+20;
+@@ -228,7 +240,8 @@ const int Last_OS_Signal = SIGUSR2+1+20;
# if TARGET_OS_VERSION == SOLARIS_VERSION \
|| TARGET_OS_VERSION == MACOSX_VERSION \
@@ -63,7 +69,7 @@ $NetBSD$
typedef void (*Signal_Handler_t)(int sig, self_code_info_t *info, self_sig_context_t *con);
-@@ -247,4 +258,4 @@ extern "C" { int malloc_verify(); }
+@@ -247,4 +260,4 @@ extern "C" { int malloc_verify(); }
# if TARGET_OS_VERSION == MACOSX_VERSION
typedef size_t nbytes_t;
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 f9718c37fe..d6f326812c 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
@@ -2,7 +2,17 @@ $NetBSD$
--- 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() {
+@@ -44,6 +44,9 @@
+ zero_fd, 0))
+ return desiredAddress;
+
++#ifdef __NetBSD__
++#define memalign aligned_alloc
++#endif
+ char* b = (char*)memalign(align, size);
+ if (b == NULL && mustAllocate) allocate_failed(name);
+ return b;
+@@ -195,6 +198,17 @@ void OS::init() {
len = sizeof(mem_size);
sysctl(mib, 2, &mem_size, &len, NULL, 0);
real_mem_size = mem_size;
@@ -20,7 +30,7 @@ $NetBSD$
# elif TARGET_OS_VERSION == LINUX_VERSION
real_mem_size = 0x40000000; // punt for now
# else
-@@ -348,7 +359,8 @@ bool OS::setup_snapshot_to_run(const cha
+@@ -348,7 +362,8 @@ bool OS::setup_snapshot_to_run(const cha
void OS::set_log_buf(FILE* f, char* buf, int bs) {
# if TARGET_OS_VERSION == SOLARIS_VERSION \
|| TARGET_OS_VERSION == MACOSX_VERSION \
@@ -30,7 +40,7 @@ $NetBSD$
setvbuf(f, buf, _IOFBF, bs);
# elif TARGET_OS_VERSION == SUNOS_VERSION
-@@ -403,7 +415,8 @@ bool OS::get_swap_space_info(int &totalK
+@@ -403,7 +418,8 @@ bool OS::get_swap_space_info(int &totalK
# elif TARGET_OS_VERSION == SUNOS_VERSION \
|| TARGET_OS_VERSION == MACOSX_VERSION \
@@ -40,7 +50,7 @@ $NetBSD$
bool OS::get_swap_space_info(int &, int &) {
return false;
-@@ -559,7 +572,7 @@ int OS::min_core(caddr_t addr, size_t le
+@@ -559,7 +575,7 @@ int OS::min_core(caddr_t addr, size_t le
normal_access((char*)0, (char*)~0);
}
@@ -49,7 +59,7 @@ $NetBSD$
void OS::setPageAdvisory(char *start, char *end, int code) {
if (end - start < OS::dont_bother) return;
char *ps= real_page_start(start);
-@@ -843,7 +856,8 @@ void OS::check_events() {
+@@ -843,7 +859,8 @@ void OS::check_events() {
# if TARGET_OS_VERSION == SOLARIS_VERSION \
|| TARGET_OS_VERSION == MACOSX_VERSION \
Home |
Main Index |
Thread Index |
Old Index