diff options
author | ryoon <ryoon@pkgsrc.org> | 2020-02-12 15:25:15 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2020-02-12 15:25:15 +0000 |
commit | b2551a04d3c0ec63f2c50612cf4b0de93da03c2c (patch) | |
tree | 54ba7438bd7a9be529f482d29e020319c239af67 /lang/mono6/patches | |
parent | aae68e90c995c5afdc323eea0e6cb8a46d7a4747 (diff) | |
download | pkgsrc-b2551a04d3c0ec63f2c50612cf4b0de93da03c2c.tar.gz |
mono6: Update to 6.8.0.105
Changelog:
Highlights
Various Bugfixes
In Depth
Runtime
WebAssembly
We continue to work on making our WebAssembly support better. Various sets of issues have been resolved in this release and general performance and feature work is happening as well.
Community improvements for AIX/PASE and Haiku
The ports for these systems received a bunch of improvements from community contributor Calvin Buckley (@NattyNarwhal).
Class Libraries
CoreFX integration
We continued to replace some of our classes with the implementation from CoreFX to improve performance and compatibility with .NET.
In this release we tightened up our networking with a few bug fixes.
Tools
Resolved Issues
7377 [Mono.Debugger.Soft] Connections are not properly closed
10641 New arm64_32 architecture (watchOS 5) [arm64_32] make “Debug Mode” work on Watch series 4 with –interpreter
12421 Task calls SynchronizationContext.Post on cancelling
12586 DataContractSerializer is not available
12917 [Blazor] IL Linker not working correctly with IQueryable extensions
14080 condition ‘ji’ not met, with ‘dynamic’ and multithreading
14725 mono 5.20 hangs when called from native thread
14772 Null Pointer Exception after debugger pauses and then continues
15261 [iOS][Tests] There are a number of System.Numeric tests that fail on iOS 32b devices
15262 [iOS][Tests] A number of linq tests fail on iOS 32b devices
15263 [iOS][Tests] A number of tests from Microsoft.CSharp fail on iOS 32b devices.
15307 [iOS][Tests] Several corelib tests crash on iOS32b devices.
15308 [netcore] Make OverlappedTests.PackNegTest Pass
15310 [netcore] Make OverlappedTests.UnPackTest Pass
15646 MERP indefinitely hangs on application quit
15687 [debugger] Update client thread frames after SetIP.
15805 Mono.Net.Security.MonoTlsStream: Crash when stream appears to have already been disposed
15931 1024 hard limit of open file descriptors
15992 Mono crashes during precompiling dll in fullaot mode
15994 Coverity: derefenrecing null in profiler (CID: 1307043) Skip degenerate qsort: num < 2, size == 0, base == 0
15999 [mini] run regression tests with fullaot+llvm
16010 typeof(object).GetMember(“”) does not return an empty array
16024 Native crash in ves_icall_System_Net_Sockets_Socket_Connect_internal
16032 IOException: Sharing violation on path …
16046 [netcore] AOT with unresolved dependencies hits asserts
16122 VS 16.2.0 regression: CopyToAsync from DeflateStream to GzipStream throws NotImplementedException
16172 Interpreter stack size is too large
16192 Embedded Mono hangs when using native threads
16308 Change netcore package to be using release builds
16310 LLVM: ““.AsSpan()[0] doesn’t throw IndexOutOfRangeException
16319 [wasm] Timers do not fire when run inside WebWorkers.
16369 Relocations in .text on arm
16380 [netcore] Regession with AOTed System.Private.CoreLib
16381 [llvm] Assertion: should not be reached at mini-llvm.c:7104
16395 [Mobile] DateTime.Now returns incorrect local time for one hour after entering DST in 39 locales.
16411 JitTests.Float fails on iOS devices in release mode on 2019-08
16415 Timezone data not handled correctly on FreeBSD
16460 System.IO.Path.GetFullPath(“\\.\pipe\pipename”): different results on Mono and .NET
16486 FileSystemEventArgs.FullPath throws ArgumentNullException
16605 make distclean fails after build w/ embedded zlib
16616 [netcore] Vector.CopyTo w/ LLVM emits wrong exception
16626 [WinForms] ControlBox property didn`t hide Close button and icon
16689 [merp] missing data in crashing reporting json native frames
16701 C# REPL Unusable on Mono 6 / Ubuntu 19
16709 Disposing the FileSystemWatcher does not close associated file descriptors
16712 SIGSEGV in mono_class_setup_vtable_general
16742 Date.Time parse issue (year 1948) Avoid creating un-representable DateTime for transition point
16759 Stream.ReadAsync continues on different thread
16803 mono_gc_finalize_notify spinning after process exit
16808 LLVM failed for String.GetHashCode
16819 [coop][interp] mono_threads_enter_gc_safe_region Cannot transition thread 0x1952b000 from STATE_BLOCKING with DO_BLOCKING
16824 Crash when debugging iOS application that throws on DispatchQueue
16864 [arm64_32] fix remaining regression tests
16876 [Wasm] Switch to PNSE FileWatcher & Exclude Tests
16879 [Wasm] Determine if System.Net.Http.UnitTests Failures are Relevant
16918 XmlSerializer Deserializing Property with same name as its enum type no longer works
16943 LLVM: recursive calls have overhead in JIT mode
16950 Starting in Mono 6.0 (2019-02), NotImplementedException prevents using StreamWriter with GZipStream for encodings that use a preamble
16974 File.GetCreationTimeUtc() returns the time last modified, not time created
17004 [merp] crash reports have Darwin kernel version in OSVersion field
17017 Out of bounds unhandled exception
17038 [wasm][xunit tests] RemoteExecutorTests.RemoteInvokeWritesToFile fails
17040 [wasm][xunit tests] System.Net.Security.Tests.SslStreamAlpnTests - MissingMethodException: Default constructor not found
17083 Regression: when debugger encounters a not-unhandled exception Marshalling managed exception contains cut off stacktraces
17133 SystemNative_CopyFile() call to fchmod() introduced in Mono 6.0 is not compatible with the external storage location on some Android OS versions and devices
17139 mono_aot_register_n_debug_info
17278 System.BadImageFormatException when reflecting on BCL shipped with Mono
17334 mono_magic_trampoline being called more than expected
17335 Investigate heavy stack from System_Threading_Interlocked_Exchange_T_REF_T_REF__T_REF
tem.Reflection.Emit + ConstructorInfo doesn’t work as expected
17687 [Regression] Profiler’s calls log SIGABRTs when using GDI+ loader
17718 Delegate does not invoke target virtually
17737 Q: is using loader lock for domain seq_points access correct? (mono runtime) [runtime] Fix locking in mono_get_seq_points ().
17790 [merp] SendMicrosoftTelemetry icall doesn’t do any MERP logging when inducing a Managed Crash
17833 threadpool hang due to unlimited hill climbing
17878 Deadlock in GC during bridge callback from native thread on Android
17924 Mtouch argument interpreter crashes EntityFrameworkCore 3.0 iOS app
17926 [Bug] Segmentation Fault receiving message on WatchOS with debugger attached
17931 Native linking fails for armv7s
18011 [embedding] Chaining Mach exceptions to Mono signals using utility threads
Diffstat (limited to 'lang/mono6/patches')
13 files changed, 144 insertions, 183 deletions
diff --git a/lang/mono6/patches/patch-configure.ac b/lang/mono6/patches/patch-configure.ac deleted file mode 100644 index 102e6701edd..00000000000 --- a/lang/mono6/patches/patch-configure.ac +++ /dev/null @@ -1,77 +0,0 @@ -$NetBSD: patch-configure.ac,v 1.3 2020/01/09 15:26:36 ryoon Exp $ - -Add netbsd support -https://github.com/mono/mono/pull/15938 - -Disable libgc in cases it has build issues (netbsd/aarch64, solaris) - ---- configure.ac.orig 2019-12-10 07:57:09.000000000 +0000 -+++ configure.ac -@@ -199,6 +199,12 @@ case "$host" in - libgc_threads=pthreads - with_sigaltstack=no - use_sigposix=yes -+ case "$host" in -+ aarch64-*) -+ support_boehm=no -+ with_gc=sgen -+ ;; -+ esac - with_sgen_default_concurrent=yes - ;; - *-*-kfreebsd*-gnu) -@@ -392,6 +398,8 @@ case "$host" in - has_dtrace=yes - use_sigposix=yes - enable_solaris_tar_check=yes -+ support_boehm=no -+ with_gc=sgen - ;; - *-*-darwin*) - parallel_mark="Disabled_Currently_Hangs_On_MacOSX" -@@ -4289,10 +4297,10 @@ INTL="libc.so.6" - SQLITE="libsqlite.so.0" - SQLITE3="libsqlite3.so.0" - ODBC="libodbc.so.2" --X11="libX11.so" --GDKX11="libgdk-x11-2.0.so.0" --GTKX11="libgtk-x11-2.0.so.0" --XINERAMA="libXinerama.so.1" -+X11="@X11BASE@/lib/libX11.so" -+GDKX11="@PREFIX@/lib/libgdk-x11-2.0.so.0" -+GTKX11="@PREFIX@/lib/libgtk-x11-2.0.so.0" -+XINERAMA="@X11BASE@/lib/libXinerama.so.1" - - sizeof_register="SIZEOF_VOID_P" - -@@ -6498,6 +6506,22 @@ elif test x$platform_android = xyes; the - MONO_NATIVE_PLATFORM=android - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_ANDROID" -+elif case $host_os in netbsd*) true;; *) false;; esac; then -+ mono_native_text="NetBSD" -+ MONO_NATIVE_CC=$CC -+ MONO_NATIVE_CXX=$CXX -+ MONO_NATIVE_CPPFLAGS=$CPPFLAGS -+ MONO_NATIVE_CXXFLAGS=$CXXFLAGS -+ MONO_NATIVE_CFLAGS=$CFLAGS -+ MONO_NATIVE_LDFLAGS=$LDFLAGS -+ -+ mono_native=yes -+ mono_native_compat=no -+ MONO_NATIVE_PLATFORM=netbsd -+ AC_MSG_CHECKING([Mono.Native support]) -+ AC_MSG_RESULT(netbsd) -+ -+ MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_NETBSD" - else - mono_native=no - mono_native_text="no" -@@ -6540,6 +6564,7 @@ AM_CONDITIONAL(MONO_NATIVE_PLATFORM_LINU - AM_CONDITIONAL(MONO_NATIVE_PLATFORM_AIX, test x$MONO_NATIVE_PLATFORM = xaix) - AM_CONDITIONAL(MONO_NATIVE_PLATFORM_ANDROID, test x$MONO_NATIVE_PLATFORM = xandroid) - AM_CONDITIONAL(MONO_NATIVE_PLATFORM_FREEBSD, test x$MONO_NATIVE_PLATFORM = xfreebsd) -+AM_CONDITIONAL(MONO_NATIVE_PLATFORM_NETBSD, test x$MONO_NATIVE_PLATFORM = xnetbsd) - AM_CONDITIONAL(MONO_NATIVE_PLATFORM_HAIKU, test x$MONO_NATIVE_PLATFORM = xhaiku) - - MONO_NATIVE_PLATFORM_TYPE_COMPAT="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_COMPAT" diff --git a/lang/mono6/patches/patch-external_corert_src_Native_gc_env_gcenv.structs.h b/lang/mono6/patches/patch-external_corert_src_Native_gc_env_gcenv.structs.h new file mode 100644 index 00000000000..5f5a61f8f37 --- /dev/null +++ b/lang/mono6/patches/patch-external_corert_src_Native_gc_env_gcenv.structs.h @@ -0,0 +1,15 @@ +$NetBSD: patch-external_corert_src_Native_gc_env_gcenv.structs.h,v 1.1 2020/02/12 15:25:16 ryoon Exp $ + +* Workaround for NetBSD's pthread_equal + +--- external/corert/src/Native/gc/env/gcenv.structs.h.orig 2020-02-04 17:00:39.000000000 +0000 ++++ external/corert/src/Native/gc/env/gcenv.structs.h +@@ -42,7 +42,7 @@ class EEThreadId + public: + bool IsCurrentThread() + { +- return m_isValid && pthread_equal(m_id, pthread_self()); ++ return m_isValid && (m_id == pthread_self()); + } + + void SetToCurrentThread() diff --git a/lang/mono6/patches/patch-libgc_pthread__stop__world.c b/lang/mono6/patches/patch-libgc_pthread__stop__world.c new file mode 100644 index 00000000000..254b886484e --- /dev/null +++ b/lang/mono6/patches/patch-libgc_pthread__stop__world.c @@ -0,0 +1,24 @@ +$NetBSD: patch-libgc_pthread__stop__world.c,v 1.1 2020/02/12 15:25:16 ryoon Exp $ + +* Workaround for NetBSD's pthread_equal + +--- libgc/pthread_stop_world.c.orig 2020-02-04 17:00:30.000000000 +0000 ++++ libgc/pthread_stop_world.c +@@ -259,7 +259,7 @@ static void pthread_push_all_stacks() + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> flags & FINISHED) continue; +- if (pthread_equal(p -> id, me)) { ++ if ((p -> id == me)) { + # ifdef SPARC + lo = (ptr_t)GC_save_regs_in_stack(); + # else +@@ -305,7 +305,7 @@ static void pthread_push_all_stacks() + (unsigned long) p -> id, + (unsigned long) bs_lo, (unsigned long) bs_hi); + # endif +- if (pthread_equal(p -> id, me)) { ++ if ((p -> id == me)) { + GC_push_all_eager(bs_lo, bs_hi); + } else { + GC_push_all_stack(bs_lo, bs_hi); diff --git a/lang/mono6/patches/patch-libgc_pthread__support.c b/lang/mono6/patches/patch-libgc_pthread__support.c new file mode 100644 index 00000000000..419ffce0da9 --- /dev/null +++ b/lang/mono6/patches/patch-libgc_pthread__support.c @@ -0,0 +1,24 @@ +$NetBSD: patch-libgc_pthread__support.c,v 1.1 2020/02/12 15:25:16 ryoon Exp $ + +* Workaround for NetBSD's pthread_equal + +--- libgc/pthread_support.c.orig 2020-02-04 17:00:30.000000000 +0000 ++++ libgc/pthread_support.c +@@ -791,7 +791,7 @@ void GC_delete_thread(pthread_t id) + nacl_gc_thread_self = NULL; + #endif + +- while (!pthread_equal(p -> id, id)) { ++ while (!(p -> id == id)) { + prev = p; + p = p -> next; + } +@@ -846,7 +846,7 @@ GC_thread GC_lookup_thread(pthread_t id) + int hv = ((unsigned long)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + +- while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next; ++ while (p != 0 && !(p -> id == id)) p = p -> next; + return(p); + } + diff --git a/lang/mono6/patches/patch-mcs_class_corlib_Test_Mono_MonoNativePlatformType.cs b/lang/mono6/patches/patch-mcs_class_corlib_Test_Mono_MonoNativePlatformType.cs deleted file mode 100644 index fcca8c29c7d..00000000000 --- a/lang/mono6/patches/patch-mcs_class_corlib_Test_Mono_MonoNativePlatformType.cs +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mcs_class_corlib_Test_Mono_MonoNativePlatformType.cs,v 1.3 2020/01/09 15:26:36 ryoon Exp $ - -Add netbsd support -https://github.com/mono/mono/pull/15938 - ---- mcs/class/corlib/Test/Mono/MonoNativePlatformType.cs.orig 2019-12-10 07:50:31.000000000 +0000 -+++ mcs/class/corlib/Test/Mono/MonoNativePlatformType.cs -@@ -39,6 +39,7 @@ namespace Mono - MONO_NATIVE_PLATFORM_TYPE_ANDROID = 5, - MONO_NATIVE_PLATFORM_TYPE_FREEBSD = 6, - MONO_NATIVE_PLATFORM_TYPE_HAIKU = 7, -+ MONO_NATIVE_PLATFORM_TYPE_NETBSD = 8, - - MONO_NATIVE_PLATFORM_TYPE_IPHONE = 0x100, - MONO_NATIVE_PLATFORM_TYPE_TV = 0x200, diff --git a/lang/mono6/patches/patch-mono_metadata_mono-config.c b/lang/mono6/patches/patch-mono_metadata_mono-config.c index e04160bd807..b33ffa3bd86 100644 --- a/lang/mono6/patches/patch-mono_metadata_mono-config.c +++ b/lang/mono6/patches/patch-mono_metadata_mono-config.c @@ -1,16 +1,16 @@ -$NetBSD: patch-mono_metadata_mono-config.c,v 1.3 2020/01/09 15:26:36 ryoon Exp $ +$NetBSD: patch-mono_metadata_mono-config.c,v 1.4 2020/02/12 15:25:16 ryoon Exp $ Look for our dllmap in /usr/pkg/etc/mono/config as opposed to /usr/pkg/etc/mono/mono/config ---- mono/metadata/mono-config.c.orig 2019-12-10 07:50:32.000000000 +0000 +--- mono/metadata/mono-config.c.orig 2020-02-04 17:00:34.000000000 +0000 +++ mono/metadata/mono-config.c @@ -676,7 +676,7 @@ mono_config_parse (const char *filename) const char *cfg_dir = mono_get_config_dir (); if (cfg_dir) { -- char *mono_cfg = g_build_filename (cfg_dir, "mono", "config", (const char *)NULL); -+ char *mono_cfg = g_build_filename (cfg_dir, "config", (const char *)NULL); +- char *mono_cfg = g_build_filename (cfg_dir, "mono", "config", (const char*)NULL); ++ char *mono_cfg = g_build_filename (cfg_dir, "config", (const char*)NULL); mono_config_parse_file (mono_cfg); g_free (mono_cfg); } diff --git a/lang/mono6/patches/patch-mono_metadata_threads.c b/lang/mono6/patches/patch-mono_metadata_threads.c deleted file mode 100644 index 267f27f073a..00000000000 --- a/lang/mono6/patches/patch-mono_metadata_threads.c +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-mono_metadata_threads.c,v 1.1 2019/08/25 16:37:01 maya Exp $ - -If sched_get_priority_{min,max} error, don't try to set a priority. -NetBSD doesn't like SCHED_OTHER + 0 priority, and will error here. - -https://github.com/mono/mono/pull/15898 - ---- mono/metadata/threads.c.orig 2019-07-18 07:46:08.000000000 +0000 -+++ mono/metadata/threads.c -@@ -743,6 +743,11 @@ mono_thread_internal_set_priority (MonoI - #endif - MONO_EXIT_GC_SAFE; - -+ /* Not tunable. Bail out */ -+ if ((min == -1) || (max == -1)) -+ return; -+ -+ - if (max > 0 && min >= 0 && max > min) { - double srange, drange, sposition, dposition; - srange = MONO_THREAD_PRIORITY_HIGHEST - MONO_THREAD_PRIORITY_LOWEST; diff --git a/lang/mono6/patches/patch-mono_metadata_w32mutex-unix.c b/lang/mono6/patches/patch-mono_metadata_w32mutex-unix.c new file mode 100644 index 00000000000..5fafe0f4e32 --- /dev/null +++ b/lang/mono6/patches/patch-mono_metadata_w32mutex-unix.c @@ -0,0 +1,51 @@ +$NetBSD: patch-mono_metadata_w32mutex-unix.c,v 1.1 2020/02/12 15:25:16 ryoon Exp $ + +* Workaround for NetBSD's pthread_equal + +--- mono/metadata/w32mutex-unix.c.orig 2020-02-04 17:00:34.000000000 +0000 ++++ mono/metadata/w32mutex-unix.c +@@ -84,7 +84,7 @@ mutex_handle_signal (MonoW32Handle *hand + if (mutex_handle->abandoned) { + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_MUTEX, "%s: %s handle %p is abandoned", + __func__, mono_w32handle_get_typename (handle_data->type), handle_data); +- } else if (!pthread_equal (mutex_handle->tid, tid)) { ++ } else if (!(mutex_handle->tid == tid)) { + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_MUTEX, "%s: we don't own %s handle %p (owned by %ld, me %ld)", + __func__, mono_w32handle_get_typename (handle_data->type), handle_data, (long)mutex_handle->tid, (long)tid); + return MONO_W32HANDLE_WAIT_RET_NOT_OWNED_BY_CALLER; +@@ -118,7 +118,7 @@ mutex_handle_own (MonoW32Handle *handle_ + __func__, mono_w32handle_get_typename (handle_data->type), handle_data, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false"); + + if (mutex_handle->recursion != 0) { +- g_assert (pthread_equal (pthread_self (), mutex_handle->tid)); ++ g_assert ((pthread_self () == mutex_handle->tid)); + mutex_handle->recursion++; + } else { + mutex_handle->tid = pthread_self (); +@@ -146,7 +146,7 @@ mutex_handle_is_owned (MonoW32Handle *ha + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_MUTEX, "%s: testing ownership %s handle %p", + __func__, mono_w32handle_get_typename (handle_data->type), handle_data); + +- if (mutex_handle->recursion > 0 && pthread_equal (mutex_handle->tid, pthread_self ())) { ++ if (mutex_handle->recursion > 0 && (mutex_handle->tid == pthread_self ())) { + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_MUTEX, "%s: %s handle %p owned by %p", + __func__, mono_w32handle_get_typename (handle_data->type), handle_data, (gpointer) pthread_self ()); + return TRUE; +@@ -404,7 +404,7 @@ ves_icall_System_Threading_Mutex_Release + if (mutex_handle->abandoned) { + // The Win32 ReleaseMutex() function returns TRUE for abandoned mutexes + ret = TRUE; +- } else if (!pthread_equal (mutex_handle->tid, tid)) { ++ } else if (!(mutex_handle->tid == tid)) { + ret = FALSE; + + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_MUTEX, "%s: we don't own %s handle %p (owned by %ld, me %ld)", +@@ -505,7 +505,7 @@ mono_w32mutex_abandon (MonoInternalThrea + + tid = MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid); + +- if (!pthread_equal (mutex_handle->tid, tid)) ++ if (!(mutex_handle->tid == tid)) + g_error ("%s: trying to release mutex %p acquired by thread %p from thread %p", + __func__, handle, (gpointer) mutex_handle->tid, (gpointer) tid); + diff --git a/lang/mono6/patches/patch-mono_native_Makefile.am b/lang/mono6/patches/patch-mono_native_Makefile.am deleted file mode 100644 index e07cd495fd5..00000000000 --- a/lang/mono6/patches/patch-mono_native_Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-mono_native_Makefile.am,v 1.3 2020/01/09 15:26:36 ryoon Exp $ - -Add netbsd support -https://github.com/mono/mono/pull/15938 - ---- mono/native/Makefile.am.orig 2019-12-10 07:50:32.000000000 +0000 -+++ mono/native/Makefile.am -@@ -75,6 +75,8 @@ freebsd_sources = $(unix_sources) - - haiku_sources = $(unix_sources) - -+netbsd_sources = $(unix_sources) -+ - android_sources = \ - pal-android.h \ - pal-android.c \ -@@ -112,7 +114,7 @@ linux_sources += $(gss_sources) - ios_sources += $(gss_sources) - endif - --EXTRA_libmono_native_la_SOURCES = $(common_sources) $(macos_sources) $(ios_sources) $(linux_sources) $(aix_sources) $(freebsd_sources) $(haiku_sources) $(unix_sources) $(gss_sources) -+EXTRA_libmono_native_la_SOURCES = $(common_sources) $(macos_sources) $(ios_sources) $(linux_sources) $(aix_sources) $(freebsd_sources) $(haiku_sources) $(netbsd_sources) $(unix_sources) $(gss_sources) - - if MONO_NATIVE_PLATFORM_MACOS - platform_sources = $(macos_sources) -@@ -134,6 +136,10 @@ platform_sources = $(freebsd_sources) - else - if MONO_NATIVE_PLATFORM_HAIKU - platform_sources = $(haiku_sources) -+else -+if MONO_NATIVE_PLATFORM_NETBSD -+platform_sources = $(netbsd_sources) -+endif - endif - endif - endif diff --git a/lang/mono6/patches/patch-mono_native_mono-native-platform.h b/lang/mono6/patches/patch-mono_native_mono-native-platform.h deleted file mode 100644 index f4481bd33a5..00000000000 --- a/lang/mono6/patches/patch-mono_native_mono-native-platform.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mono_native_mono-native-platform.h,v 1.3 2020/01/09 15:26:36 ryoon Exp $ - -Add netbsd support -https://github.com/mono/mono/pull/15938 - ---- mono/native/mono-native-platform.h.orig 2019-12-10 07:50:32.000000000 +0000 -+++ mono/native/mono-native-platform.h -@@ -13,6 +13,7 @@ typedef enum { - MONO_NATIVE_PLATFORM_TYPE_ANDROID = 5, - MONO_NATIVE_PLATFORM_TYPE_FREEBSD = 6, - MONO_NATIVE_PLATFORM_TYPE_HAIKU = 7, -+ MONO_NATIVE_PLATFORM_TYPE_NETBSD = 8, - - MONO_NATIVE_PLATFORM_TYPE_IPHONE = 0x100, - MONO_NATIVE_PLATFORM_TYPE_TV = 0x200, diff --git a/lang/mono6/patches/patch-mono_utils_mono-threads-posix.c b/lang/mono6/patches/patch-mono_utils_mono-threads-posix.c new file mode 100644 index 00000000000..9bccc8a28e8 --- /dev/null +++ b/lang/mono6/patches/patch-mono_utils_mono-threads-posix.c @@ -0,0 +1,15 @@ +$NetBSD: patch-mono_utils_mono-threads-posix.c,v 1.1 2020/02/12 15:25:16 ryoon Exp $ + +* Workaround for NetBSD's pthread_equal + +--- mono/utils/mono-threads-posix.c.orig 2020-02-04 17:00:34.000000000 +0000 ++++ mono/utils/mono-threads-posix.c +@@ -224,7 +224,7 @@ mono_native_thread_id_get (void) + gboolean + mono_native_thread_id_equals (MonoNativeThreadId id1, MonoNativeThreadId id2) + { +- return pthread_equal (id1, id2); ++ return (id1 == id2); + } + + /* diff --git a/lang/mono6/patches/patch-mono_utils_mono-utils-debug.c b/lang/mono6/patches/patch-mono_utils_mono-utils-debug.c index 8b3776d64e6..32f7bffbde6 100644 --- a/lang/mono6/patches/patch-mono_utils_mono-utils-debug.c +++ b/lang/mono6/patches/patch-mono_utils_mono-utils-debug.c @@ -1,23 +1,19 @@ -$NetBSD: patch-mono_utils_mono-utils-debug.c,v 1.1 2019/08/25 16:37:01 maya Exp $ +$NetBSD: patch-mono_utils_mono-utils-debug.c,v 1.2 2020/02/12 15:25:16 ryoon Exp $ Learn to use kinfo_proc2 on netbsd ---- mono/utils/mono-utils-debug.c.orig 2019-07-18 07:46:08.000000000 +0000 +--- mono/utils/mono-utils-debug.c.orig 2020-02-04 17:00:34.000000000 +0000 +++ mono/utils/mono-utils-debug.c -@@ -27,10 +27,11 @@ mono_is_usermode_native_debugger_present - #include <errno.h> - #include <mono/utils/mono-errno.h> - #include <fcntl.h> --#if defined (__APPLE__) -+#if defined (__APPLE__) || defined (__NetBSD__) - #include <sys/sysctl.h> +@@ -32,6 +32,8 @@ mono_is_usermode_native_debugger_present #endif #if defined (__NetBSD__) -+#include <sys/proc.h> #include <kvm.h> ++#include <sys/param.h> ++#include <sys/sysctl.h> #endif #if defined (_AIX) -@@ -78,8 +79,9 @@ mono_is_usermode_native_debugger_present + #include <procinfo.h> +@@ -78,8 +80,9 @@ mono_is_usermode_native_debugger_present if (!kd) return FALSE; int count = 0; diff --git a/lang/mono6/patches/patch-support_minizip_ioapi.c b/lang/mono6/patches/patch-support_minizip_ioapi.c index e524292dd36..635338f083f 100644 --- a/lang/mono6/patches/patch-support_minizip_ioapi.c +++ b/lang/mono6/patches/patch-support_minizip_ioapi.c @@ -1,15 +1,15 @@ -$NetBSD: patch-support_minizip_ioapi.c,v 1.1 2020/01/09 15:26:36 ryoon Exp $ +$NetBSD: patch-support_minizip_ioapi.c,v 1.2 2020/02/12 15:25:16 ryoon Exp $ * NetBSD has no 64-bit functions like macOS. ---- support/minizip/ioapi.c.orig 2019-12-10 07:50:32.000000000 +0000 +--- support/minizip/ioapi.c.orig 2020-02-04 17:00:34.000000000 +0000 +++ support/minizip/ioapi.c @@ -14,7 +14,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif --#if defined(__APPLE__) || defined(IOAPI_NO_64) -+#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__NetBSD__) +-#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) ++#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) || defined(__NetBSD__) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) |