pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
coreclr-git: Add draft patches for <ucontext.h>
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Jan 29 01:32:03 2016 +0100
Changeset: 0d1a9ab9d4565a99049883c17b210fc9889f9f09
Modified Files:
coreclr-git/distinfo
coreclr-git/patches/patch-src_pal_src_cruntime_file.cpp
Added Files:
coreclr-git/patches/patch-src_pal_src_config.h.in
coreclr-git/patches/patch-src_pal_src_configure.cmake
coreclr-git/patches/patch-src_pal_src_include_pal_context.h
Log Message:
coreclr-git: Add draft patches for <ucontext.h>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0d1a9ab9d4565a99049883c17b210fc9889f9f09
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
coreclr-git/distinfo | 5 +-
coreclr-git/patches/patch-src_pal_src_config.h.in | 12 ++++
.../patches/patch-src_pal_src_configure.cmake | 30 ++++++++++
.../patches/patch-src_pal_src_cruntime_file.cpp | 6 +-
.../patch-src_pal_src_include_pal_context.h | 64 ++++++++++++++++++++++
5 files changed, 113 insertions(+), 4 deletions(-)
diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index 28824ed..b1a788b 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,3 +1,6 @@
$NetBSD$
-SHA1 (patch-src_pal_src_cruntime_file.cpp) = aefeb45ffc205d9c1f8893c8699b1a948ee24dad
+SHA1 (patch-src_pal_src_config.h.in) = bbf370ef53a770051ef1b64ff57e093061563828
+SHA1 (patch-src_pal_src_configure.cmake) = fc41e4af9fe7f770ae3f53fabb7a035d26541fe2
+SHA1 (patch-src_pal_src_cruntime_file.cpp) = 315ad5db53ef2b893a77aa131ce97999214e0e11
+SHA1 (patch-src_pal_src_include_pal_context.h) = 962cf83ef0ba0a4e2e57e344809a566f12f2e01d
diff --git a/coreclr-git/patches/patch-src_pal_src_config.h.in b/coreclr-git/patches/patch-src_pal_src_config.h.in
new file mode 100644
index 0000000..a6c9059
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_config.h.in
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/pal/src/config.h.in.orig 2016-01-22 10:23:14.000000000 +0000
++++ src/pal/src/config.h.in
+@@ -57,6 +57,7 @@
+ #cmakedefine01 HAVE_BSD_REGS_T
+ #cmakedefine01 HAVE_PT_REGS
+ #cmakedefine01 HAVE_GREGSET_T
++#cmakedefine01 HAVE___GREGSET_T
+ #cmakedefine01 HAVE_SIGINFO_T
+ #cmakedefine01 HAVE_UCONTEXT_T
+ #cmakedefine01 HAVE_PTHREAD_RWLOCK_T
diff --git a/coreclr-git/patches/patch-src_pal_src_configure.cmake b/coreclr-git/patches/patch-src_pal_src_configure.cmake
new file mode 100644
index 0000000..c00dfd1
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_configure.cmake
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- src/pal/src/configure.cmake.orig 2016-01-23 16:23:38.000000000 +0000
++++ src/pal/src/configure.cmake
+@@ -12,7 +12,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL SunOS)
+ set(CMAKE_REQUIRED_INCLUDES /opt/local/include)
+ endif()
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+ set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
+ endif()
+
+@@ -75,6 +75,7 @@ check_struct_has_member ("struct stat" s
+ check_struct_has_member ("struct stat" st_atimensec "sys/types.h;sys/stat.h" HAVE_STAT_NSEC)
+ check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
+ check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T)
++check_struct_has_member ("ucontext_t" uc_mcontext.__gregs[0] ucontext.h HAVE___GREGSET_T)
+
+ set(CMAKE_EXTRA_INCLUDE_FILES machine/reg.h)
+ check_type_size("struct reg" BSD_REGS_T)
+@@ -85,7 +86,7 @@ set(CMAKE_EXTRA_INCLUDE_FILES)
+ set(CMAKE_EXTRA_INCLUDE_FILES signal.h)
+ check_type_size(siginfo_t SIGINFO_T)
+ set(CMAKE_EXTRA_INCLUDE_FILES)
+-set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h)
++set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h sys/ucontext.h)
+ check_type_size(ucontext_t UCONTEXT_T)
+ set(CMAKE_EXTRA_INCLUDE_FILES)
+ set(CMAKE_EXTRA_INCLUDE_FILES pthread.h)
diff --git a/coreclr-git/patches/patch-src_pal_src_cruntime_file.cpp b/coreclr-git/patches/patch-src_pal_src_cruntime_file.cpp
index c8dff6f..39810a5 100644
--- a/coreclr-git/patches/patch-src_pal_src_cruntime_file.cpp
+++ b/coreclr-git/patches/patch-src_pal_src_cruntime_file.cpp
@@ -1,8 +1,8 @@
$NetBSD$
---- src/pal/src/cruntime/file.cpp.orig 2016-01-18 21:51:39.000000000 +0000
+--- src/pal/src/cruntime/file.cpp.orig 2016-01-28 19:04:13.000000000 +0000
+++ src/pal/src/cruntime/file.cpp
-@@ -841,7 +841,7 @@ PAL_fgetpos (
+@@ -840,7 +840,7 @@ PAL_fgetpos (
PAL_fpos_t *pos
)
{
@@ -11,7 +11,7 @@ $NetBSD$
// TODO: implement for Linux if required
ASSERT(FALSE);
return -1;
-@@ -887,7 +887,7 @@ PAL_fsetpos (
+@@ -886,7 +886,7 @@ PAL_fsetpos (
const PAL_fpos_t *pos
)
{
diff --git a/coreclr-git/patches/patch-src_pal_src_include_pal_context.h b/coreclr-git/patches/patch-src_pal_src_include_pal_context.h
new file mode 100644
index 0000000..d418088
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_include_pal_context.h
@@ -0,0 +1,64 @@
+$NetBSD$
+
+--- src/pal/src/include/pal/context.h.orig 2016-01-28 19:04:13.000000000 +0000
++++ src/pal/src/include/pal/context.h
+@@ -44,7 +44,58 @@ typedef ucontext_t native_context_t;
+ #include <mach/mach_port.h>
+ #endif // !HAVE_MACH_EXCEPTIONS else
+
+-#if HAVE_GREGSET_T
++#if HAVE___GREGSET_T
++
++#ifdef BIT64
++#define MCREG_Rbx(mc) ((mc).__gregs[_REG_RBX])
++#define MCREG_Rcx(mc) ((mc).__gregs[_REG_RCX])
++#define MCREG_Rdx(mc) ((mc).__gregs[_REG_RDX])
++#define MCREG_Rsi(mc) ((mc).__gregs[_REG_RSI])
++#define MCREG_Rdi(mc) ((mc).__gregs[_REG_RDI])
++#define MCREG_Rbp(mc) ((mc).__gregs[_REG_RBP])
++#define MCREG_Rax(mc) ((mc).__gregs[_REG_RAX])
++#define MCREG_Rip(mc) ((mc).__gregs[_REG_RIP])
++#define MCREG_Rsp(mc) ((mc).__gregs[_REG_RSP])
++#define MCREG_SegCs(mc) ((mc).__gregs[_REG_CS])
++#define MCREG_SegSs(mc) ((mc).__gregs[_REG_SS])
++#define MCREG_R8(mc) ((mc).__gregs[_REG_R8])
++#define MCREG_R9(mc) ((mc).__gregs[_REG_R9])
++#define MCREG_R10(mc) ((mc).__gregs[_REG_R10])
++#define MCREG_R11(mc) ((mc).__gregs[_REG_R11])
++#define MCREG_R12(mc) ((mc).__gregs[_REG_R12])
++#define MCREG_R13(mc) ((mc).__gregs[_REG_R13])
++#define MCREG_R14(mc) ((mc).__gregs[_REG_R14])
++#define MCREG_R15(mc) ((mc).__gregs[_REG_R15])
++#define MCREG_EFlags(mc) ((mc).__gregs[_REG_RFLAGS])
++
++#define FPREG_Xmm(uc, index) *(M128A*)&((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_xmm[index])
++
++#define FPREG_St(uc, index) *(M128A*)&((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_87_ac[index])
++
++#define FPREG_ControlWord(uc) ((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_cw)
++#define FPREG_StatusWord(uc) ((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_sw)
++#define FPREG_TagWord(uc) ((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_tw)
++#define FPREG_MxCsr(uc) ((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_mxcsr)
++#define FPREG_MxCsr_Mask(uc) ((struct fxsave*)((uc)->uc_mcontext.__fpregs)->fx_mxcsr_mask)
++
++#else // BIT64
++
++#define MCREG_Ebx(mc) ((mc).__gregs[_REG_EBX])
++#define MCREG_Ecx(mc) ((mc).__gregs[_REG_ECX])
++#define MCREG_Edx(mc) ((mc).__gregs[_REG_EDX])
++#define MCREG_Esi(mc) ((mc).__gregs[_REG_ESI])
++#define MCREG_Edi(mc) ((mc).__gregs[_REG_EDI])
++#define MCREG_Ebp(mc) ((mc).__gregs[_REG_EBP])
++#define MCREG_Eax(mc) ((mc).__gregs[_REG_EAX])
++#define MCREG_Eip(mc) ((mc).__gregs[_REG_EIP])
++#define MCREG_Esp(mc) ((mc).__gregs[_REG_ESP])
++#define MCREG_SegCs(mc) ((mc).__gregs[_REG_CS])
++#define MCREG_SegSs(mc) ((mc).__gregs[_REG_SS])
++#define MCREG_EFlags(mc) ((mc).__gregs[_REG_RFLAGS])
++
++#endif // BIT64
++
++#elif HAVE_GREGSET_T
+
+ #ifdef BIT64
+ #define MCREG_Rbx(mc) ((mc).gregs[REG_RBX])
Home |
Main Index |
Thread Index |
Old Index