Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 mono (5.18.0.240+dfsg-3) unstable; urgency=high
 .
   [ Jo Shields ]
   * [20a7dd0] Don't build docs on s390x, to work around a dumb issue
 .
   [ Neale Ferguson ]
   * [3713407] Fix s390x Outarg_VT (#10632)
     * Fix outarg_vt processing. Fixes #10549
     * Cleanup unused bits and pieces
     * Correct the handling of structures being retuned from a call
     * Restore vtcopy code etc.
     (Closes: #921232)
Author: Jo Shields <joshield@microsoft.com>
Bug-Debian: https://bugs.debian.org/921232

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-04-17

--- mono-5.18.0.240+dfsg.orig/Makefile.am
+++ mono-5.18.0.240+dfsg/Makefile.am
@@ -11,7 +11,7 @@ else
 tools_dir = tools
 endif
 
-SUBDIRS = mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests
+SUBDIRS = mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc acceptance-tests llvm
 # Keep in sync with SUBDIRS
 DIST_SUBDIRS = m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
 
--- mono-5.18.0.240+dfsg.orig/configure.ac
+++ mono-5.18.0.240+dfsg/configure.ac
@@ -5220,6 +5220,9 @@ if test "x$enable_btls" = "xyes"; then
 				BTLS_CMAKE_ARGS="-DCMAKE_AR=/usr/bin/ar -DCMAKE_C_ARCHIVE_CREATE=\"<CMAKE_AR> -X64 cr <TARGET> <LINK_FLAGS> <OBJECTS>\""
 		esac
 		;;
+	s390x)
+		btls_arch=s390x
+		;;
 	android-armv5)
 		BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
 		;;
--- mono-5.18.0.240+dfsg.orig/data/mono-cairo.pc.in
+++ mono-5.18.0.240+dfsg/data/mono-cairo.pc.in
@@ -1,5 +1,5 @@
-prefix=${pcfiledir}/../..
-exec_prefix=${pcfiledir}/../..
+prefix=@prefix@
+exec_prefix=${prefix}
 libdir=${prefix}/@reloc_libdir@
 includedir=${prefix}/include
 
--- mono-5.18.0.240+dfsg.orig/data/mono.pc.in
+++ mono-5.18.0.240+dfsg/data/mono.pc.in
@@ -1,5 +1,5 @@
-prefix=${pcfiledir}/../..
-exec_prefix=${pcfiledir}/../..
+prefix=@prefix@
+exec_prefix=${prefix}
 libdir=${prefix}/@reloc_libdir@
 includedir=${prefix}/include/mono-@API_VER@
 sysconfdir=@sysconfdir@
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/build/monodroid/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/build/monodroid/Makefile
@@ -2,7 +2,7 @@ PROFILE := monodroid
 SOURCEDIR := ../../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612,618,809
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612,618,809
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http Mono.Android
@@ -24,7 +24,7 @@ bare/System.Xml_REFS := mscorlib bare/Sy
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
 System_CSC_ARGS := ../../src/mono/System.extra.cs
 
-ECMA_KEY := ../../../../../mono/mcs/class/ecma.pub         # Public Key Token: b77a5c561934e089
+ECMA_KEY := ../../../../mcs/class/ecma.pub         # Public Key Token: b77a5c561934e089
 
 ECMA_KEY_ASSEMBLIES := System.Core System.Net.Http System.Numerics System.Xml System mscorlib \
 	bare/System bare/System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/build/monotouch/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/build/monotouch/Makefile
@@ -2,7 +2,7 @@ PROFILE := monotouch
 SOURCEDIR := ../../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612,618,809
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612,618,809
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http Xamarin.iOS Xamarin.TVOS Xamarin.WatchOS Xamarin.Mac OpenTK-1.0 OpenTK
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/mono/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/mono/Makefile
@@ -3,7 +3,7 @@ SOURCEDIR := ../src/$(PROFILE)/
 BCL_PROFILE := ../v4.6/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := cscompmgd Commons.Xml.Relaxng I18N.CJK I18N.MidEast I18N.Other I18N.Rare I18N.West I18N IBM.Data.DB2 ICSharpCode.SharpZipLib	\
@@ -27,7 +27,7 @@ I18N.Other_REFS := mscorlib
 I18N.Rare_REFS := mscorlib
 I18N.West_REFS := mscorlib
 I18N_REFS := mscorlib
-IBM.Data.DB2_REFS := mscorlib System System.Data
+IBM.Data.DB2_REFS := mscorlib System System.Data System.Xml
 ICSharpCode.SharpZipLib_REFS := mscorlib System
 Microsoft.Web.Infrastructure_REFS := mscorlib System System.Web
 Mono.C5_REFS := mscorlib
@@ -35,7 +35,7 @@ Mono.CSharp_REFS := mscorlib System Syst
 Mono.Cairo_REFS := mscorlib
 Mono.CodeContracts_REFS := mscorlib System.Core System
 Mono.CompilerServices.SymbolWriter_REFS := mscorlib System
-Mono.Data.Sqlite_REFS := mscorlib System.Data System System.Transactions
+Mono.Data.Sqlite_REFS := mscorlib System.Data System System.Transactions System.Xml
 Mono.Data.Tds_REFS := mscorlib System
 Mono.Debugger.Soft_REFS := mscorlib System.Core System
 Mono.Http_REFS := mscorlib System System.Web System.Xml
@@ -68,7 +68,7 @@ System.Reactive.Observable.Aliases_REFS
 System.Reactive.PlatformServices_REFS := mscorlib System System.Core
 System.Reactive.Providers_REFS := mscorlib System.Core System
 System.Reactive.Runtime.Remoting_REFS := mscorlib System.Core
-System.Reactive.Windows.Forms_REFS := mscorlib System.Windows.Forms
+System.Reactive.Windows.Forms_REFS := mscorlib System.Windows.Forms System
 System.Reactive.Windows.Threading_REFS := mscorlib System WindowsBase
 System.Threading.Tasks.Dataflow_REFS := mscorlib System.Core System
 System.Web.Http.SelfHost_REFS := mscorlib System System.ServiceModel System.Net.Http System.Core System.IdentityModel System.Runtime.Serialization System.Configuration System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v2.0/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v2.0/Makefile
@@ -2,7 +2,7 @@ PROFILE := v2.0
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -36,20 +36,20 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib System bare/System.Xml
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := System System.Data mscorlib System.Core
+System.Data.DataSetExtensions_REFS := System System.Data mscorlib System.Core System.Xml
 System.Data.Linq_REFS := mscorlib System.Data System System.Core System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System.Drawing System System.EnterpriseServices
+System.Data.OracleClient_REFS := mscorlib System.Data System.Drawing System System.EnterpriseServices System.Xml
 System.Data.Services.Client_REFS := mscorlib System.Core System System.Xml WindowsBase System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Core System System.ServiceModel System.ServiceModel.Web
 System.Data_REFS := mscorlib System System.Xml System.Configuration System.Transactions System.EnterpriseServices
-System.Design_REFS := mscorlib System System.Windows.Forms System.Data System.Drawing System.Xml bare/System.Web System.Configuration
+System.Design_REFS := mscorlib System System.Windows.Forms System.Data System.Drawing System.Xml bare/System.Web System.Configuration Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System System.Xml System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := System.Windows.Forms System.Drawing mscorlib System
 System.Drawing_REFS := mscorlib System
 System.EnterpriseServices_REFS := mscorlib System.Transactions
 System.IdentityModel.Selectors_REFS := System.Xml mscorlib System System.IdentityModel
-System.IdentityModel_REFS := mscorlib System System.Web System.Xml System.Runtime.Serialization System.Security
+System.IdentityModel_REFS := mscorlib System System.Web System.Xml System.Runtime.Serialization System.Security System.Configuration
 System.Management_REFS := mscorlib System System.Configuration.Install
 System.Messaging_REFS := mscorlib System System.Configuration.Install System.Xml System.Windows.Forms System.Drawing
 System.Net_REFS := mscorlib System
@@ -63,7 +63,7 @@ System.ServiceProcess_REFS := System msc
 System.Transactions_REFS := mscorlib System.Configuration
 System.Web.Abstractions_REFS := System.Web mscorlib System
 System.Web.DynamicData_REFS := mscorlib System.Core System.Data.Linq System System.Web System.Web.Extensions System.Web.Routing System.ComponentModel.DataAnnotations System.Drawing System.Web.Abstractions
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Windows.Forms
 System.Web.Extensions_REFS := mscorlib System.Core System System.Web System.Configuration System.Web.Services System.Xml System.ServiceModel System.Data.Linq System.Drawing
 System.Web.Routing_REFS := mscorlib System.Web.Abstractions System System.Core System.Web
 System.Web.Services_REFS := System.EnterpriseServices bare/System.Web System.Configuration mscorlib System System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v3.5/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v3.5/Makefile
@@ -2,7 +2,7 @@ PROFILE := v3.5
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Microsoft.Build.Engine Microsoft.Build.Framework Microsoft.Build.Tasks.v3.5 Microsoft.Build.Utilities.v3.5
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.0/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.0/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.0
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -41,13 +41,13 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib System bare/System.Xml
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := System.Data mscorlib System.Core System
+System.Data.DataSetExtensions_REFS := System.Data mscorlib System.Core System System.Xml
 System.Data.Linq_REFS := mscorlib System.Data System System.Core System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.EnterpriseServices System.Drawing
+System.Data.OracleClient_REFS := mscorlib System.Data System System.EnterpriseServices System.Drawing System.Xml
 System.Data.Services.Client_REFS := mscorlib System.Core System System.Xml System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Core System System.Data.Services.Client System.ServiceModel System.ServiceModel.Web System.ServiceModel.Activation
 System.Data_REFS := mscorlib System System.Xml System.Configuration System.Transactions System.EnterpriseServices
-System.Design_REFS := mscorlib System System.Windows.Forms System.Data System.Drawing System.Xml bare/System.Web System.Configuration
+System.Design_REFS := mscorlib System System.Windows.Forms System.Data System.Drawing System.Xml bare/System.Web System.Configuration Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System System.Xml System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := System.Windows.Forms System.Drawing mscorlib System
@@ -55,7 +55,7 @@ System.Drawing_REFS := mscorlib System
 System.Dynamic_REFS := mscorlib System.Core System
 System.EnterpriseServices_REFS := mscorlib System.Transactions
 System.IdentityModel.Selectors_REFS := System.Xml mscorlib System System.IdentityModel
-System.IdentityModel_REFS := mscorlib System System.Web.ApplicationServices System.Xml System.Runtime.Serialization System.Security
+System.IdentityModel_REFS := mscorlib System System.Web.ApplicationServices System.Xml System.Runtime.Serialization System.Security System.Configuration
 System.Management_REFS := mscorlib System System.Configuration.Install
 System.Messaging_REFS := mscorlib System System.Configuration.Install System.Xml System.Windows.Forms System.Drawing
 System.Net_REFS := mscorlib System
@@ -68,15 +68,15 @@ System.Runtime.Serialization_REFS := msc
 System.Security_REFS := mscorlib System.Xml System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System
 System.ServiceModel.Discovery_REFS := System.ServiceModel System mscorlib System.Configuration System.Runtime.Serialization System.Xml System.Xml.Linq System.Core
-System.ServiceModel.Routing_REFS := System.ServiceModel mscorlib System.Runtime.Serialization System System.Configuration System.Core
+System.ServiceModel.Routing_REFS := System.ServiceModel mscorlib System.Runtime.Serialization System System.Configuration System.Core System.Xml
 System.ServiceModel.Web_REFS := System.ServiceModel mscorlib System.Runtime.Serialization System.Configuration System System.Xml System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System System.Runtime.Serialization System.Xml System.Web System.IdentityModel System.Security System.Messaging System.Core System.Transactions System.Configuration System.Web.Services System.Web.ApplicationServices bare/System.ServiceModel.Activation System.IdentityModel.Selectors
 System.ServiceProcess_REFS := System mscorlib System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := System mscorlib System.Configuration
 System.Web.DynamicData_REFS := mscorlib System.Data.Linq System System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Drawing
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Windows.Forms
 System.Web.Extensions_REFS := mscorlib System.Core System System.Web System.Web.ApplicationServices System.Configuration System.Web.Services System.Xml System.ServiceModel System.Data.Linq System.Drawing
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := System.EnterpriseServices bare/System.Web System.Configuration mscorlib System System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.5.1/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.5.1/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.5.1
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -64,14 +64,14 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -97,20 +97,20 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Xaml_REFS := mscorlib System System.Xml System.Core
@@ -136,7 +136,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -160,13 +160,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -175,7 +175,7 @@ Facades/System.Threading.Tasks.Parallel_
 Facades/System.Threading.Tasks_REFS := mscorlib System.Core
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.5.2/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.5.2/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.5.2
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -64,14 +64,14 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -97,20 +97,20 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Xaml_REFS := mscorlib System System.Xml System.Core
@@ -136,7 +136,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -160,13 +160,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -175,7 +175,7 @@ Facades/System.Threading.Tasks.Parallel_
 Facades/System.Threading.Tasks_REFS := mscorlib System.Core
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.5/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.5/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.5
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -64,14 +64,14 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -97,20 +97,20 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Xaml_REFS := mscorlib System System.Xml System.Core
@@ -136,7 +136,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -160,13 +160,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -175,7 +175,7 @@ Facades/System.Threading.Tasks.Parallel_
 Facades/System.Threading.Tasks_REFS := mscorlib System.Core
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.6.1/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.6.1/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.6.1
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -67,15 +67,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -104,22 +104,22 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -148,7 +148,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -174,13 +174,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -190,7 +190,7 @@ Facades/System.Threading.Tasks_REFS := m
 Facades/System.Threading.Timer_REFS := mscorlib
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.6.2/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.6.2/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.6.2
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -67,15 +67,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -104,22 +104,22 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -148,7 +148,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -174,13 +174,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -190,7 +190,7 @@ Facades/System.Threading.Tasks_REFS := m
 Facades/System.Threading.Timer_REFS := mscorlib
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.6/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.6/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.6
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -67,15 +67,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -104,22 +104,22 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -148,7 +148,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -174,13 +174,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -190,7 +190,7 @@ Facades/System.Threading.Tasks_REFS := m
 Facades/System.Threading.Timer_REFS := mscorlib
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.7.1/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.7.1/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.7.1
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -81,15 +81,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.Diagnostics.Tracing_REFS := mscorlib
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
@@ -117,22 +117,22 @@ System.Runtime.Serialization_REFS := msc
 System.Security_REFS := mscorlib System System.Xml
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web System.Web.Extensions System.Windows.Forms
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Design System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -164,7 +164,7 @@ Facades/System.ComponentModel.Primitives
 Facades/System.ComponentModel.TypeConverter_REFS := mscorlib System
 Facades/System.ComponentModel_REFS := mscorlib System
 Facades/System.Console_REFS := mscorlib
-Facades/System.Data.Common_REFS := mscorlib System.Data
+Facades/System.Data.Common_REFS := mscorlib System.Data System System.Xml
 Facades/System.Diagnostics.Contracts_REFS := mscorlib
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.FileVersionInfo_REFS := mscorlib System
@@ -174,7 +174,7 @@ Facades/System.Diagnostics.TextWriterTra
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.TraceSource_REFS := mscorlib System
 Facades/System.Drawing.Primitives_REFS := mscorlib System.Drawing
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization.Calendars_REFS := mscorlib
 Facades/System.Globalization.Extensions_REFS := mscorlib System
 Facades/System.Globalization_REFS := mscorlib
@@ -223,7 +223,7 @@ Facades/System.Runtime.Numerics_REFS :=
 Facades/System.Runtime.Serialization.Formatters_REFS := mscorlib
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Claims_REFS := mscorlib
 Facades/System.Security.Cryptography.Algorithms_REFS := mscorlib System.Core
@@ -236,7 +236,7 @@ Facades/System.Security.SecureString_REF
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -250,7 +250,7 @@ Facades/System.Threading.Timer_REFS := m
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.ValueTuple_REFS := mscorlib
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XPath.XDocument_REFS := mscorlib System.Xml.Linq
 Facades/System.Xml.XPath_REFS := mscorlib System.Xml
 Facades/System.Xml.XmlDocument_REFS := mscorlib System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.7.2/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.7.2/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.7.2
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -81,15 +81,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.Diagnostics.Tracing_REFS := mscorlib
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
@@ -117,22 +117,22 @@ System.Runtime.Serialization_REFS := msc
 System.Security_REFS := mscorlib System System.Xml
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web System.Web.Extensions System.Windows.Forms
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Design System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -164,7 +164,7 @@ Facades/System.ComponentModel.Primitives
 Facades/System.ComponentModel.TypeConverter_REFS := mscorlib System
 Facades/System.ComponentModel_REFS := mscorlib System
 Facades/System.Console_REFS := mscorlib
-Facades/System.Data.Common_REFS := mscorlib System.Data
+Facades/System.Data.Common_REFS := mscorlib System.Data System System.Xml
 Facades/System.Diagnostics.Contracts_REFS := mscorlib
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.FileVersionInfo_REFS := mscorlib System
@@ -174,7 +174,7 @@ Facades/System.Diagnostics.TextWriterTra
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.TraceSource_REFS := mscorlib System
 Facades/System.Drawing.Primitives_REFS := mscorlib System.Drawing
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization.Calendars_REFS := mscorlib
 Facades/System.Globalization.Extensions_REFS := mscorlib System
 Facades/System.Globalization_REFS := mscorlib
@@ -223,7 +223,7 @@ Facades/System.Runtime.Numerics_REFS :=
 Facades/System.Runtime.Serialization.Formatters_REFS := mscorlib
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Claims_REFS := mscorlib
 Facades/System.Security.Cryptography.Algorithms_REFS := mscorlib System.Core
@@ -236,7 +236,7 @@ Facades/System.Security.SecureString_REF
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -250,7 +250,7 @@ Facades/System.Threading.Timer_REFS := m
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.ValueTuple_REFS := mscorlib
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XPath.XDocument_REFS := mscorlib System.Xml.Linq
 Facades/System.Xml.XPath_REFS := mscorlib System.Xml
 Facades/System.Xml.XmlDocument_REFS := mscorlib System.Xml
--- mono-5.18.0.240+dfsg.orig/external/binary-reference-assemblies/v4.7/Makefile
+++ mono-5.18.0.240+dfsg/external/binary-reference-assemblies/v4.7/Makefile
@@ -2,7 +2,7 @@ PROFILE := v4.7
 SOURCEDIR := ../src/$(PROFILE)/
 
 CSC ?= csc
-CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612 -nowarn:618
+CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -delaysign -debug- -target:library -nowarn:612 -nowarn:618
 Q_CSC = $(if $(V),,@echo "CSC   [$(PROFILE)] $(1)";)
 
 ASSEMBLIES := Accessibility CustomMarshalers	\
@@ -67,15 +67,15 @@ System.ComponentModel.DataAnnotations_RE
 System.Configuration.Install_REFS := mscorlib System
 System.Configuration_REFS := mscorlib bare/System.Xml System
 System.Core_REFS := mscorlib System
-System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core
+System.Data.DataSetExtensions_REFS := mscorlib System.Data System System.Core System.Xml
 System.Data.Entity_REFS := mscorlib System.Core System System.Data System.Runtime.Serialization System.ComponentModel.DataAnnotations System.Xml System.Xml.Linq System.Transactions System.Configuration
 System.Data.Linq_REFS := mscorlib System.Data System.Core System System.Xml System.Runtime.Serialization
-System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions
+System.Data.OracleClient_REFS := mscorlib System.Data System System.Drawing System.EnterpriseServices System.Transactions System.Xml
 System.Data.Services.Client_REFS := mscorlib System System.Xml System.Core System.Xml.Linq
 System.Data.Services_REFS := mscorlib System.Configuration System.ServiceModel System.ServiceModel.Web System System.ServiceModel.Activation System.Core System.Data.Services.Client
 System.Data_REFS := mscorlib System.Configuration System.Xml System System.Numerics System.Core System.Transactions System.EnterpriseServices
 System.Deployment_REFS := mscorlib
-System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml
+System.Design_REFS := mscorlib System.Drawing System.Drawing.Design System System.Windows.Forms System.Data bare/System.Web System.Configuration System.Xml Accessibility
 System.DirectoryServices.Protocols_REFS := mscorlib System.Xml System System.DirectoryServices
 System.DirectoryServices_REFS := mscorlib System
 System.Drawing.Design_REFS := mscorlib System.Drawing System.Windows.Forms System
@@ -104,22 +104,22 @@ System.Security_REFS := mscorlib System
 System.ServiceModel.Activation_REFS := mscorlib System.ServiceModel System System.Web
 System.ServiceModel.Discovery_REFS := mscorlib System.ServiceModel System System.Xml System.Xml.Linq System.Runtime.Serialization System.Configuration System.Core
 System.ServiceModel.Internals_REFS := mscorlib System System.Xml
-System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization
+System.ServiceModel.Routing_REFS := mscorlib System.ServiceModel System.Configuration System System.Runtime.Serialization System.Xml
 System.ServiceModel.Web_REFS := mscorlib System.ServiceModel System System.Runtime.Serialization System.Xml System.Xml.Linq System.Configuration System.ServiceModel.Activation System.Core System.Web.Extensions
 System.ServiceModel_REFS := mscorlib System.Xml System.Xml.Linq System.Xaml System System.EnterpriseServices System.Transactions System.IdentityModel System.Runtime.Serialization System.Runtime.DurableInstancing System.Security System.Web.ApplicationServices System.Messaging System.Net.Http System.IdentityModel.Selectors System.Web.Services System.Configuration System.Web System.Core bare/System.ServiceModel.Activation
 System.ServiceProcess_REFS := mscorlib System System.Configuration.Install System.Windows.Forms
 System.Transactions_REFS := mscorlib System.Configuration
-System.Web.Abstractions_REFS := mscorlib System.Web
+System.Web.Abstractions_REFS := mscorlib System.Web System
 System.Web.ApplicationServices_REFS := mscorlib System System.Configuration
 System.Web.DynamicData_REFS := mscorlib System System.Drawing System.Web System.Web.Extensions System.Core System.ComponentModel.DataAnnotations System.Data.Linq
-System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions
+System.Web.Extensions.Design_REFS := mscorlib System System.Design System.Drawing System.Web.Extensions System.Windows.Forms System.Web
 System.Web.Extensions_REFS := mscorlib System.Web System System.Xml System.Drawing System.Design System.Data.Linq System.Web.Services System.ServiceModel System.ServiceModel.Activation System.Runtime.Serialization System.Web.ApplicationServices System.Core System.Configuration
 System.Web.Mobile_REFS := mscorlib
 System.Web.RegularExpressions_REFS := mscorlib System
 System.Web.Routing_REFS := mscorlib System.Web
 System.Web.Services_REFS := mscorlib System System.Configuration System.EnterpriseServices System.Xml bare/System.Web System.DirectoryServices System.Design System.Data
 System.Web_REFS := mscorlib System.Configuration System.Xml System System.Data System.Drawing System.Runtime.Serialization.Formatters.Soap System.Core System.EnterpriseServices System.Web.ApplicationServices System.ComponentModel.DataAnnotations System.Web.Services
-System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core
+System.Windows.Forms.DataVisualization_REFS := mscorlib System.Drawing System.Windows.Forms System System.Xml System.Data System.Core Accessibility
 System.Windows.Forms_REFS := mscorlib System System.Xml System.Drawing System.Runtime.Serialization.Formatters.Soap Accessibility System.Configuration System.Data
 System.Windows_REFS := mscorlib System
 System.Workflow.Activities_REFS := mscorlib
@@ -148,7 +148,7 @@ Facades/System.Diagnostics.Contracts_REF
 Facades/System.Diagnostics.Debug_REFS := mscorlib System
 Facades/System.Diagnostics.Tools_REFS := mscorlib System
 Facades/System.Diagnostics.Tracing_REFS := mscorlib
-Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core
+Facades/System.Dynamic.Runtime_REFS := mscorlib System.Core System
 Facades/System.Globalization_REFS := mscorlib
 Facades/System.IO_REFS := mscorlib System
 Facades/System.Linq.Expressions_REFS := mscorlib System.Core
@@ -174,13 +174,13 @@ Facades/System.Runtime.InteropServices_R
 Facades/System.Runtime.Numerics_REFS := mscorlib System.Numerics
 Facades/System.Runtime.Serialization.Json_REFS := mscorlib System.Runtime.Serialization
 Facades/System.Runtime.Serialization.Primitives_REFS := mscorlib System.Runtime.Serialization
-Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System Facades/System.Runtime.Serialization.Primitives
+Facades/System.Runtime.Serialization.Xml_REFS := mscorlib System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
 Facades/System.Runtime_REFS := mscorlib System.Core System System.ComponentModel.Composition
 Facades/System.Security.Principal_REFS := mscorlib
 Facades/System.ServiceModel.Duplex_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.Http_REFS := mscorlib System.ServiceModel
 Facades/System.ServiceModel.NetTcp_REFS := mscorlib System.ServiceModel
-Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel
+Facades/System.ServiceModel.Primitives_REFS := mscorlib System.IdentityModel System.ServiceModel System.Xml
 Facades/System.ServiceModel.Security_REFS := mscorlib System.ServiceModel
 Facades/System.Text.Encoding.Extensions_REFS := mscorlib
 Facades/System.Text.Encoding_REFS := mscorlib
@@ -190,7 +190,7 @@ Facades/System.Threading.Tasks_REFS := m
 Facades/System.Threading.Timer_REFS := mscorlib
 Facades/System.Threading_REFS := mscorlib System System.Core
 Facades/System.Xml.ReaderWriter_REFS := mscorlib System.Xml
-Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq
+Facades/System.Xml.XDocument_REFS := mscorlib System.Xml.Linq System.Xml
 Facades/System.Xml.XmlSerializer_REFS := mscorlib System.Xml
 
 mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
--- mono-5.18.0.240+dfsg.orig/external/corefx/src/Native/Unix/System.Native/pal_errno.c
+++ mono-5.18.0.240+dfsg/external/corefx/src/Native/Unix/System.Native/pal_errno.c
@@ -9,7 +9,7 @@
 #include <errno.h>
 
 // ENODATA is not defined in FreeBSD 10.3 but is defined in 11.0
-#if defined(__FreeBSD__) & !defined(ENODATA)
+#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) & !defined(ENODATA)
 #define ENODATA ENOATTR
 #endif
 
--- mono-5.18.0.240+dfsg.orig/mcs/build/profiles/basic.make
+++ mono-5.18.0.240+dfsg/mcs/build/profiles/basic.make
@@ -122,7 +122,7 @@ $(PROFILE_EXE): $(topdir)/build/common/b
 	$(BOOTSTRAP_MCS) /noconfig /langversion:latest /r:mscorlib.dll /r:System.dll /r:System.Core.dll /out:$(GENSOURCES_EXE).tmp $(GENSOURCES_CS)
 	- rm $(GENSOURCES_EXE)
 	mv $(GENSOURCES_EXE).tmp $(GENSOURCES_EXE)
-	- rm $@
+	- rm -f $@
 	mv $@.tmp $@
 
 $(PROFILE_OUT): $(PROFILE_EXE)
--- mono-5.18.0.240+dfsg.orig/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs
+++ mono-5.18.0.240+dfsg/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs
@@ -375,7 +375,8 @@ namespace ICSharpCode.SharpZipLib.Zip
 				
 				targetName = Path.Combine(targetDirectory, entryFileName);
 				dirName = Path.GetDirectoryName(Path.GetFullPath(targetName));
-	
+				if (!Path.GetFullPath(targetName).StartsWith(targetDirectory, StringComparison.InvariantCultureIgnoreCase))
+					throw new ZipException("Parent traversal in paths is not allowed");
 				doExtraction = doExtraction && (entryFileName.Length > 0);
 			}
 			
--- mono-5.18.0.240+dfsg.orig/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+++ mono-5.18.0.240+dfsg/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
@@ -219,7 +219,7 @@ namespace Microsoft.Build.Tasks {
 
 		protected override string ToolName {
 			get {
-				return MSBuildUtils.RunningOnWindows ? "csc.bat" : "csc.exe";
+				return MSBuildUtils.RunningOnWindows ? "mcs.bat" : "mcs.exe";
 			}
 		}
 
--- /dev/null
+++ mono-5.18.0.240+dfsg/mcs/class/Mono.WebBrowser/Mono.NullBrowser/Base.cs
@@ -0,0 +1,174 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Runtime.InteropServices;
+using System.Diagnostics;
+using Mono.WebBrowser;
+
+namespace Mono.NullBrowser
+{
+	internal class Base
+	{
+		private static Hashtable boundControls;
+		private static bool initialized;
+		private static object initLock = new object ();
+		private static string monoMozDir;
+
+		private static bool isInitialized ()
+		{
+			if (!initialized)
+				return false;
+			return true;
+		}
+
+		static Base ()
+		{
+			boundControls = new Hashtable ();
+		}
+
+		public Base () { }
+
+		public static bool Init (WebBrowser control, Platform platform)
+		{
+			lock (initLock) {
+				if (!initialized) {
+				
+					initialized = true;
+				}
+			}
+			return initialized;
+		}
+
+		public static bool Bind (WebBrowser control, IntPtr handle, int width, int height)
+		{
+			if (!isInitialized ())
+				return false;
+
+			
+			return true;
+		}
+
+		public static bool Create (IWebBrowser control) {
+			if (!isInitialized ())
+				return false;
+
+			return true;
+		}
+
+		public static void Shutdown (IWebBrowser control)
+		{
+			lock (initLock) {
+				if (!initialized)
+					return;
+					
+				
+				boundControls.Remove (control);
+				if (boundControls.Count == 0) {
+					initialized = false;
+				}
+			}
+		}
+
+		// layout
+		public static void Focus (IWebBrowser control, FocusOption focus)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+
+		public static void Blur (IWebBrowser control)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+		public static void Activate (IWebBrowser control)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+		public static void Deactivate (IWebBrowser control)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+		public static void Resize (IWebBrowser control, int width, int height)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+		// navigation
+		public static void Home (IWebBrowser control)
+		{
+			if (!isInitialized ())
+				return;
+
+		}
+
+
+		public static IntPtr StringInit ()
+		{
+			return IntPtr.Zero;
+		}
+
+		public static void StringFinish (HandleRef str)
+		{
+		}
+
+		public static string StringGet (HandleRef str)
+		{
+			return String.Empty;
+		}
+
+		public static void StringSet (HandleRef str, string text)
+		{
+		}
+
+
+		public static object GetProxyForObject (IWebBrowser control, Guid iid, object obj)
+		{
+			return null;
+		}
+
+		public static string EvalScript (IWebBrowser control, string script)
+		{
+			return null;
+		}
+
+
+	}
+}
--- /dev/null
+++ mono-5.18.0.240+dfsg/mcs/class/Mono.WebBrowser/Mono.NullBrowser/DOM/Navigation.cs
@@ -0,0 +1,127 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using Mono.WebBrowser;
+using Mono.WebBrowser.DOM;
+
+namespace Mono.NullBrowser.DOM
+{
+	internal class Navigation: INavigation
+	{
+
+
+		#region INavigation Members
+
+		public bool CanGoBack {
+			get {
+				return false;
+			}
+		}
+
+		public bool CanGoForward {
+			get {
+				return false;
+			}
+		}
+
+		public bool Back ()
+		{
+			return false;
+		}
+
+		public bool Forward ()
+		{
+			return false;
+		}
+
+		public void Home ()
+		{
+		}
+
+		public void Reload ()
+		{
+		}
+
+		public void Reload (ReloadOption option)
+		{
+		}
+
+		public void Stop ()
+		{
+		}
+		
+		
+		/// <summary>
+		/// Navigate to the page in the history, by index.
+		/// </summary>
+		/// <param name="index">
+		/// A <see cref="System.Int32"/> representing an absolute index in the 
+		/// history (that is, > -1 and < history length
+		/// </param>
+		public void Go (int index)
+		{
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="index">
+		/// A <see cref="System.Int32"/> representing an index in the 
+		/// history, that can be relative or absolute depending on the relative argument
+		/// </param>
+		/// <param name="relative">
+		/// A <see cref="System.Boolean"/> indicating whether the index is relative to 
+		/// the current place in history or not (i.e., if relative = true, index can be
+		/// positive or negative, and index=-1 means load the previous page in the history.
+		/// if relative = false, index must be > -1, and index = 0 means load the first
+		/// page of the history.
+		/// </param>
+		public void Go (int index, bool relative) {
+		}
+		
+		public void Go (string url)
+		{
+		}
+
+		public void Go (string url, LoadFlags flags) 
+		{
+		}
+
+		public int HistoryCount {
+			get {
+				return 0;
+			}
+		}
+
+		#endregion
+
+		public override int GetHashCode () {
+			return 0;
+		}		
+	}
+}
--- /dev/null
+++ mono-5.18.0.240+dfsg/mcs/class/Mono.WebBrowser/Mono.NullBrowser/WebBrowser.cs
@@ -0,0 +1,414 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+// Copyright (c) 2013 Jo Shields
+//
+// Authors:
+//	Andreia Gaita (avidigal@novell.com)
+//	Jo Shields (directhex@apebox.org)
+//
+
+#undef debug
+
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Diagnostics;
+using Mono.WebBrowser;
+using Mono.WebBrowser.DOM;
+
+namespace Mono.NullBrowser
+{
+	internal class WebBrowser : IWebBrowser
+	{
+		bool loaded;
+		internal bool created = false;
+		bool creating = false;
+
+                internal DOM.Navigation navigation;
+
+		internal Platform platform;
+		internal Platform enginePlatform;
+		System.ComponentModel.EventHandlerList events;
+		System.ComponentModel.EventHandlerList domEvents;
+
+		string statusText;
+
+		bool streamingMode;
+		
+		internal Hashtable documents;
+
+		int width;
+		int height;
+		bool isDirty;
+		
+		public WebBrowser (Platform platform)
+		{
+			this.platform = platform;
+			loaded = Base.Init (this, platform);
+			documents = new Hashtable ();
+		}
+
+		public bool Load (IntPtr handle, int width, int height)
+		{
+			loaded = Base.Bind (this, handle, width, height);
+			return loaded;
+		}
+
+		bool Created {
+			get {
+				if (!creating && !created) {
+					creating = true;
+					created = Base.Create (this);
+					if (created && isDirty) {
+						isDirty = false;
+						Base.Resize (this, width, height);
+					}
+				}
+				return created;
+			}
+		}
+
+		public void Shutdown ()
+		{
+			Base.Shutdown (this);
+		}
+		
+		internal void Reset ()
+		{
+			this.DomEvents.Dispose ();
+			this.domEvents = null;
+			this.documents.Clear ();
+		}
+
+		public bool Initialized {
+			get { return this.loaded; }
+		}
+		
+		public IWindow Window {
+			get {
+				return null;
+			}
+		}
+
+		public IDocument Document {
+			get {
+				return null;
+			}
+		}
+
+		public INavigation Navigation {
+			get {
+                                if (!Created) return null;
+
+                                if (navigation == null) {
+
+                                        navigation = new DOM.Navigation ();
+                                }
+                                return navigation as INavigation;
+			}
+		}
+		
+		public string StatusText {
+			get { return statusText; }
+		}
+		
+		public bool Offline {
+			get {
+				return false;
+			}
+			set {
+			}
+		}
+		
+		internal System.ComponentModel.EventHandlerList DomEvents {
+			get {
+				if (domEvents == null)
+					domEvents = new System.ComponentModel.EventHandlerList();
+
+				return domEvents;
+			}
+		}
+
+		internal System.ComponentModel.EventHandlerList Events {
+			get {
+				if (events == null)
+					events = new System.ComponentModel.EventHandlerList();
+
+				return events;
+			}
+		}
+		
+		#region Layout
+		public void FocusIn (FocusOption focus)
+		{
+			if (!created) return;
+			Base.Focus (this, focus);
+		}
+		public void FocusOut ()
+		{
+			if (!created) return;
+			Base.Blur (this);
+		}
+		
+		public void Activate ()
+		{
+			if (!Created) return;
+			Base.Activate (this);
+		}
+		public void Deactivate ()
+		{
+			if (!created) return;
+			Base.Deactivate (this);
+		}
+
+		public void Resize (int width, int height)
+		{
+			this.width = width;
+			this.height = height;
+			isDirty = true;
+			if (!created) return;
+			Base.Resize (this, width, height);			
+		}
+
+		public void Render (byte[] data)
+		{
+			if (!Created) return;
+			if (data == null)
+				throw new ArgumentNullException ("data");
+			string html = System.Text.ASCIIEncoding.UTF8.GetString (data);
+			Render (html);
+		}
+
+		public void Render (string html)
+		{
+			if (!Created) return;
+			Render (html, "file:///", "text/html");
+		}
+
+				
+		public void Render (string html, string uri, string contentType)
+		{
+			if (!Created) return;
+			throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.Navigation);
+
+			IntPtr native_html = Marshal.StringToHGlobalAnsi (html);
+			Marshal.FreeHGlobal (native_html);
+
+
+		}
+		
+		public void ExecuteScript (string script) {
+			if (!Created) return;
+			Base.EvalScript (this, script);
+		}
+				
+		internal void AttachEvent (INode node, string eve, EventHandler handler) {
+			string key = String.Intern (node.GetHashCode() + ":" + eve);
+#if debug
+			Console.Error.WriteLine ("Event Attached: " + key);
+#endif
+			DomEvents.AddHandler (key, handler);
+		}
+
+		internal void DetachEvent (INode node, string eve, EventHandler handler) {
+			string key = String.Intern (node.GetHashCode() + ":" + eve);
+#if debug			
+			Console.Error.WriteLine ("Event Detached: " + key);
+#endif			
+			DomEvents.RemoveHandler (key, handler);
+		}
+		
+		#endregion
+
+		#region Events
+		internal static object KeyDownEvent = new object ();
+		internal static object KeyPressEvent = new object ();
+		internal static object KeyUpEvent = new object ();
+		internal static object MouseClickEvent = new object ();
+		internal static object MouseDoubleClickEvent = new object ();
+		internal static object MouseDownEvent = new object ();
+		internal static object MouseEnterEvent = new object ();
+		internal static object MouseLeaveEvent = new object ();
+		internal static object MouseMoveEvent = new object ();
+		internal static object MouseUpEvent = new object ();
+		internal static object FocusEvent = new object ();
+		internal static object BlurEvent = new object ();
+		internal static object CreateNewWindowEvent = new object ();
+		internal static object AlertEvent = new object ();
+			
+		internal static object LoadStartedEvent = new object ();
+		internal static object LoadCommitedEvent = new object ();
+		internal static object ProgressChangedEvent = new object ();
+		internal static object LoadFinishedEvent = new object ();	
+		
+		internal static object LoadEvent = new object ();
+		internal static object UnloadEvent = new object ();
+		internal static object StatusChangedEvent = new object ();
+		internal static object SecurityChangedEvent = new object ();
+		internal static object ProgressEvent = new object ();
+		internal static object ContextMenuEvent = new object ();
+		
+		internal static object NavigationRequestedEvent = new object ();
+		
+		public event NodeEventHandler KeyDown
+		{
+			add { Events.AddHandler (KeyDownEvent, value); }
+			remove { Events.RemoveHandler (KeyDownEvent, value); }
+		}
+
+		public event NodeEventHandler KeyPress
+		{
+			add { Events.AddHandler (KeyPressEvent, value); }
+			remove { Events.RemoveHandler (KeyPressEvent, value); }
+		}
+		public event NodeEventHandler KeyUp
+		{
+			add { Events.AddHandler (KeyUpEvent, value); }
+			remove { Events.RemoveHandler (KeyUpEvent, value); }
+		}
+		public event NodeEventHandler MouseClick
+		{
+			add { Events.AddHandler (MouseClickEvent, value); }
+			remove { Events.RemoveHandler (MouseClickEvent, value); }
+		}
+		public event NodeEventHandler MouseDoubleClick
+		{
+			add { Events.AddHandler (MouseDoubleClickEvent, value); }
+			remove { Events.RemoveHandler (MouseDoubleClickEvent, value); }
+		}
+		public event NodeEventHandler MouseDown
+		{
+			add { Events.AddHandler (MouseDownEvent, value); }
+			remove { Events.RemoveHandler (MouseDownEvent, value); }
+		}
+		public event NodeEventHandler MouseEnter
+		{
+			add { Events.AddHandler (MouseEnterEvent, value); }
+			remove { Events.RemoveHandler (MouseEnterEvent, value); }
+		}
+		public event NodeEventHandler MouseLeave
+		{
+			add { Events.AddHandler (MouseLeaveEvent, value); }
+			remove { Events.RemoveHandler (MouseLeaveEvent, value); }
+		}
+		public event NodeEventHandler MouseMove
+		{
+			add { Events.AddHandler (MouseMoveEvent, value); }
+			remove { Events.RemoveHandler (MouseMoveEvent, value); }
+		}
+		public event NodeEventHandler MouseUp
+		{
+			add { Events.AddHandler (MouseUpEvent, value); }
+			remove { Events.RemoveHandler (MouseUpEvent, value); }
+		}
+		public event EventHandler Focus
+		{
+			add { Events.AddHandler (FocusEvent, value); }
+			remove { Events.RemoveHandler (FocusEvent, value); }
+		}
+		public event EventHandler Blur
+		{
+			add { Events.AddHandler (BlurEvent, value); }
+			remove { Events.RemoveHandler (BlurEvent, value); }
+		}
+		public event CreateNewWindowEventHandler CreateNewWindow
+		{
+			add { Events.AddHandler (CreateNewWindowEvent, value); }
+			remove { Events.RemoveHandler (CreateNewWindowEvent, value); }
+		}
+		public event AlertEventHandler Alert
+		{
+			add { Events.AddHandler (AlertEvent, value); }
+			remove { Events.RemoveHandler (AlertEvent, value); }
+		}
+		public event EventHandler Loaded
+		{
+			add { Events.AddHandler (LoadEvent, value); }
+			remove { Events.RemoveHandler (LoadEvent, value); }
+		}
+		public event EventHandler Unloaded
+		{
+			add { Events.AddHandler (UnloadEvent, value); }
+			remove { Events.RemoveHandler (UnloadEvent, value); }
+		}
+
+ 		public event StatusChangedEventHandler StatusChanged
+		{
+			add { Events.AddHandler (StatusChangedEvent, value); }
+			remove { Events.RemoveHandler (StatusChangedEvent, value); }
+		}
+		
+ 		public event SecurityChangedEventHandler SecurityChanged
+		{
+			add { Events.AddHandler (SecurityChangedEvent, value); }
+			remove { Events.RemoveHandler (SecurityChangedEvent, value); }
+		}
+
+		public event LoadStartedEventHandler LoadStarted
+		{
+			add { Events.AddHandler (LoadStartedEvent, value); }
+			remove { Events.RemoveHandler (LoadStartedEvent, value); }
+		}
+		
+		public event LoadCommitedEventHandler LoadCommited
+		{
+			add { Events.AddHandler (LoadCommitedEvent, value); }
+			remove { Events.RemoveHandler (LoadCommitedEvent, value); }
+		}		
+		
+		public event ProgressChangedEventHandler ProgressChanged
+		{
+			add { Events.AddHandler (ProgressChangedEvent, value); }
+			remove { Events.RemoveHandler (ProgressChangedEvent, value); }
+		}
+		
+		public event LoadFinishedEventHandler LoadFinished
+		{
+			add { Events.AddHandler (LoadFinishedEvent, value); }
+			remove { Events.RemoveHandler (LoadFinishedEvent, value); }
+		}
+
+		public event ContextMenuEventHandler ContextMenuShown
+		{
+			add { Events.AddHandler (ContextMenuEvent, value); }
+			remove { Events.RemoveHandler (ContextMenuEvent, value); }
+		}
+
+		public event NavigationRequestedEventHandler NavigationRequested
+		{
+			add { }
+			remove { }
+		}
+
+		internal static object GenericEvent = new object ();
+		internal event EventHandler Generic
+		{
+			add { Events.AddHandler (GenericEvent, value); }
+			remove { Events.RemoveHandler (GenericEvent, value); }
+		}
+
+		#endregion
+
+
+	}
+}
--- mono-5.18.0.240+dfsg.orig/mcs/class/Mono.WebBrowser/Mono.WebBrowser.dll.sources
+++ mono-5.18.0.240+dfsg/mcs/class/Mono.WebBrowser/Mono.WebBrowser.dll.sources
@@ -133,6 +133,9 @@ Mono.Mozilla/interfaces/nsIWebNavigation
 Mono.Mozilla/interfaces/extras/NodeType.cs
 Mono.Mozilla/interfaces/extras/nsIWriteSegmentFun.cs
 Mono.Mozilla/interfaces/extras/Options.cs
+Mono.NullBrowser/Base.cs
+Mono.NullBrowser/WebBrowser.cs
+Mono.NullBrowser/DOM/Navigation.cs
 Mono.WebBrowser/DOM/IDocumentType.cs
 Mono.WebBrowser/DOM/IDOMImplementation.cs
 Mono.WebBrowser/DOM/IMediaList.cs
--- mono-5.18.0.240+dfsg.orig/mcs/class/Mono.WebBrowser/Mono.WebBrowser/Manager.cs
+++ mono-5.18.0.240+dfsg/mcs/class/Mono.WebBrowser/Mono.WebBrowser/Manager.cs
@@ -50,8 +50,15 @@ namespace Mono.WebBrowser
 					browserEngine = null;
 				}
 			}
-			if (browserEngine == null || browserEngine == "mozilla")
-				return new Mono.Mozilla.WebBrowser (platform);
+			if (browserEngine == "mozilla") {
+				try {
+					return new Mono.Mozilla.WebBrowser (platform);
+				} catch {
+					browserEngine = null;
+				}
+			}
+			if (browserEngine == null)
+				return new Mono.NullBrowser.WebBrowser (platform);
 			throw new Exception (Mono.WebBrowser.Exception.ErrorCodes.EngineNotSupported, browserEngine);
 		}
 
--- mono-5.18.0.240+dfsg.orig/mcs/packages/Makefile
+++ mono-5.18.0.240+dfsg/mcs/packages/Makefile
@@ -38,13 +38,8 @@ ifeq ($(PROFILE), $(DEFAULT_PROFILE))
 TARGET_DIR = $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 MSBUILD_ROSLYN_DIR = $(DESTDIR)$(mono_libdir)/mono/msbuild/15.0/bin/Roslyn
 
-install-local: install-prototypes
+install-local:
 	$(MKINSTALLDIRS) $(TARGET_DIR)
-	$(INSTALL_LIB) $(ROSLYN_FILES_FOR_MONO) $(TARGET_DIR)
-	$(MKINSTALLDIRS) $(MSBUILD_ROSLYN_DIR)
-	$(INSTALL_LIB) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) $(MSBUILD_ROSLYN_DIR)
-
-	(cd $(MSBUILD_ROSLYN_DIR); for asm in $(ROSLYN_FILES_FOR_MONO); do ln -fs ../../../../$(FRAMEWORK_VERSION)/$$(basename $$asm) . ; done)
 
 install-prototypes:
 	$(MKINSTALLDIRS) $(TARGET_DIR)/dim
--- mono-5.18.0.240+dfsg.orig/mcs/tools/cil-stringreplacer/Makefile
+++ mono-5.18.0.240+dfsg/mcs/tools/cil-stringreplacer/Makefile
@@ -8,7 +8,7 @@ NO_INSTALL = yes
 API = $(filter basic build, $(PROFILE))
 ifdef API
 # It can be run using system .net during boostrap
-TARGET_NET_REFERENCE = v4.6
+TARGET_NET_REFERENCE = v4.7.1
 # Trick to make it work during boostrap where it has to run with system
 # assemblies not the ones in lib/basic folder
 PROGRAM_USE_INTERMEDIATE_FILE = 1
--- mono-5.18.0.240+dfsg.orig/mono/arch/s390x/s390x-codegen.h
+++ mono-5.18.0.240+dfsg/mono/arch/s390x/s390x-codegen.h
@@ -1393,8 +1393,8 @@ typedef struct {
 #define s390_mlr(c, r1, r2)		S390_RRE(c, 0xb996, r1, r2)
 #define s390_mr(c, r1, r2)		S390_RR(c, 0x1c, r1, r2)
 #define s390_ms(c, r, x, b, d)		S390_RX(c, 0x71, r, x, b, d)
-#define s390_msfi(c, r, v)		S390_RIL_1(c, 0xc20, r, v)
-#define s390_msgfi(c, r, v)		S390_RIL_1(c, 0xc21, r, v)
+#define s390_msfi(c, r, v)		S390_RIL_1(c, 0xc21, r, v)
+#define s390_msgfi(c, r, v)		S390_RIL_1(c, 0xc20, r, v)
 #define s390_msgfr(c, r1, r2)		S390_RRE(c, 0xb91c, r1, r2)
 #define s390_msgr(c, r1, r2)		S390_RRE(c, 0xb90c, r1, r2)
 #define s390_msgrkc(c, r1, r2, r3)	S390_RRF_1(c, 0xb9ed, r1, r2, r3)
--- mono-5.18.0.240+dfsg.orig/mono/mini/Makefile.am
+++ mono-5.18.0.240+dfsg/mono/mini/Makefile.am
@@ -961,24 +961,7 @@ EXTRA_DIST = TestDriver.cs \
 	Makefile.am.in
 
 version.h: Makefile
-	if test -e $(top_srcdir)/.git; then \
-		(cd $(top_srcdir); \
-			LANG=C; export LANG; \
-			if test -z "$$ghprbPullId"; then \
-				branch=`git branch | grep '^\*' | sed 's/.*detached .*/explicit/' | cut -d ' ' -f 2`; \
-			else \
-				branch="pull-request-$$ghprbPullId"; \
-			fi; \
-			version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
-			echo "#define FULL_VERSION \"$$branch/$$version\""; \
-		); \
-	else \
-		if test -z "$$MONO_BRANCH" -o -z "$$MONO_BUILD_REVISION"; then \
-			echo "#define FULL_VERSION \"tarball\""; \
-		else \
-			echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \
-		fi \
-	fi > version.h
+	echo "#define FULL_VERSION \"Debian $$(dpkg-parsechangelog -l$(top_srcdir)/debian/changelog | grep ^Vers | cut -d\  -f2)\"" > version.h
 
 # Utility target for patching libtool to speed up linking
 patch-libtool:
--- mono-5.18.0.240+dfsg.orig/mono/mini/Makefile.am.in
+++ mono-5.18.0.240+dfsg/mono/mini/Makefile.am.in
@@ -961,24 +961,7 @@ EXTRA_DIST = TestDriver.cs \
 	Makefile.am.in
 
 version.h: Makefile
-	if test -e $(top_srcdir)/.git; then \
-		(cd $(top_srcdir); \
-			LANG=C; export LANG; \
-			if test -z "$$ghprbPullId"; then \
-				branch=`git branch | grep '^\*' | sed 's/.*detached .*/explicit/' | cut -d ' ' -f 2`; \
-			else \
-				branch="pull-request-$$ghprbPullId"; \
-			fi; \
-			version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
-			echo "#define FULL_VERSION \"$$branch/$$version\""; \
-		); \
-	else \
-		if test -z "$$MONO_BRANCH" -o -z "$$MONO_BUILD_REVISION"; then \
-			echo "#define FULL_VERSION \"tarball\""; \
-		else \
-			echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \
-		fi \
-	fi > version.h
+	echo "#define FULL_VERSION \"Debian $$(dpkg-parsechangelog -l$(top_srcdir)/debian/changelog | grep ^Vers | cut -d\  -f2)\"" > version.h
 
 # Utility target for patching libtool to speed up linking
 patch-libtool:
--- mono-5.18.0.240+dfsg.orig/mono/mini/local-propagation.c
+++ mono-5.18.0.240+dfsg/mono/mini/local-propagation.c
@@ -370,7 +370,7 @@ mono_strength_reduction_ins (MonoCompile
 	}
 	case OP_IDIV_UN_IMM:
 	case OP_IDIV_IMM: {
-		if (!COMPILE_LLVM (cfg))
+		if ((!COMPILE_LLVM (cfg)) && (!cfg->backend->optimized_div))
 			allocated_vregs = mono_strength_reduction_division (cfg, ins);
 		break;
 	}
@@ -383,10 +383,8 @@ mono_strength_reduction_ins (MonoCompile
 			ins->opcode = OP_ICONST;
 			MONO_INST_NULLIFY_SREGS (ins);
 			ins->inst_c0 = 0;
-#if __s390__
-		}
-#else
-		} else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && (power != -1)) {
+		} else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && 
+			   (power != -1) && (!cfg->backend->optimized_div)) {
 			gboolean is_long = ins->opcode == OP_LREM_IMM;
 			int compensator_reg = alloc_ireg (cfg);
 			int intermediate_reg;
@@ -411,7 +409,6 @@ mono_strength_reduction_ins (MonoCompile
 
 			allocated_vregs = TRUE;
 		}
-#endif
 		break;
 	}
 #if SIZEOF_REGISTER == 4
--- mono-5.18.0.240+dfsg.orig/mono/mini/mini-mips.c
+++ mono-5.18.0.240+dfsg/mono/mini/mini-mips.c
@@ -5266,7 +5266,7 @@ mono_arch_emit_epilog_sub (MonoCompile *
 {
 	guint8 *code = NULL;
 	MonoMethod *method = cfg->method;
-	int i;
+	int pos = 0, i;
 	int max_epilog_size = 16 + 20*4;
 	int alloc2_size = 0;
 	guint32 iregs_to_restore;
--- mono-5.18.0.240+dfsg.orig/mono/mini/mini-s390x.c
+++ mono-5.18.0.240+dfsg/mono/mini/mini-s390x.c
@@ -1613,7 +1613,7 @@ add_stackParm (guint *gr, size_data *sz,
 {
 	if (*gr > S390_LAST_ARG_REG) {
 		sz->stack_size  = S390_ALIGN(sz->stack_size, sizeof(long));
-		ainfo->reg	    = STK_BASE;
+		ainfo->reg	= STK_BASE;
 		ainfo->offset   = sz->stack_size;
 		ainfo->regtype  = RegTypeStructByAddrOnStack; 
 		sz->stack_size += sizeof (gpointer);
@@ -2242,7 +2242,7 @@ mono_arch_allocate_vars (MonoCompile *cf
 
 		/*--------------------------------------------------*/
 		/* inst->backend.is_pinvoke indicates native sized  */
-		/* value typs this is used by the pinvoke wrappers  */
+		/* value types this is used by the pinvoke wrappers */
 		/* when they call functions returning structure     */
 		/*--------------------------------------------------*/
 		if (inst->backend.is_pinvoke && MONO_TYPE_ISSTRUCT (inst->inst_vtype))
@@ -2417,7 +2417,6 @@ mono_arch_emit_call (MonoCompile *cfg, M
 	ArgInfo *ainfo = NULL;
 	int stackSize;    
 	MonoMethodHeader *header;
-	int frmReg;
 
 	sig = call->signature;
 	n = sig->param_count + sig->hasthis;
@@ -2441,10 +2440,6 @@ mono_arch_emit_call (MonoCompile *cfg, M
 	}
 
 	header = cfg->header;
-	if ((cfg->flags & MONO_CFG_HAS_ALLOCA) || header->num_clauses)
-		frmReg = s390_r11;
-	else
-		frmReg = STK_BASE;
 
 	for (i = 0; i < n; ++i) {
 		MonoType *t;
@@ -2515,30 +2510,6 @@ mono_arch_emit_call (MonoCompile *cfg, M
 
 			MONO_ADD_INS (cfg->cbb, ins);
 
-			if (ainfo->regtype == RegTypeStructByAddr) {
-				/* 
-				 * We use OP_OUTARG_VT to copy the valuetype to a stack location, then
-				 * use the normal OUTARG opcodes to pass the address of the location to
-				 * the callee.
-				 */
-				int treg = mono_alloc_preg (cfg);
-				MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, treg, 
-							 frmReg, ainfo->offparm);
-				mono_call_inst_add_outarg_reg (cfg, call, treg, ainfo->reg, FALSE);
-			} else if (ainfo->regtype == RegTypeStructByAddrOnStack) {
-				/* The address of the valuetype is passed on the stack */
-				int treg = mono_alloc_preg (cfg);
-				MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, treg, 
-							 frmReg, ainfo->offparm);
-				MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG,
-							     ainfo->reg, ainfo->offset, treg);
-
-				if (cfg->compute_gc_maps) {
-					MonoInst *def;
-
-					EMIT_NEW_GC_PARAM_SLOT_LIVENESS_DEF (cfg, def, ainfo->offset, t);
-				}
-			}
 			break;
 		}
 		case RegTypeBase :
@@ -2572,6 +2543,17 @@ mono_arch_emit_call (MonoCompile *cfg, M
 	    (i == sig->sentinelpos)) {
 		emit_sig_cookie (cfg, call, cinfo);
 	}
+
+	if (cinfo->struct_ret) {
+		MonoInst *vtarg;
+
+		MONO_INST_NEW (cfg, vtarg, OP_MOVE);
+		vtarg->sreg1 = call->vret_var->dreg;
+		vtarg->dreg = mono_alloc_preg (cfg);
+		MONO_ADD_INS (cfg->cbb, vtarg);
+
+		mono_call_inst_add_outarg_reg (cfg, call, vtarg->dreg, cinfo->struct_ret, FALSE);
+	}
 }
 
 /*========================= End of Function ========================*/
@@ -2619,7 +2601,21 @@ mono_arch_emit_outarg_vt (MonoCompile *c
 	} else {
 		ERROR_DECL (error);
 		MonoMethodHeader *header;
-		int srcReg;
+		MonoInst *vtcopy = mono_compile_create_var (cfg, m_class_get_byval_arg (src->klass), OP_LOCAL);
+		MonoInst *load;
+		int ovf_size = ainfo->vtsize,
+		    srcReg;
+		guint32 size;
+
+		/* FIXME: alignment? */
+		if (call->signature->pinvoke) {
+			size = mono_type_native_stack_size (m_class_get_byval_arg (src->klass), NULL);
+			vtcopy->backend.is_pinvoke = 1;
+		} else {
+			size = mini_type_stack_size (m_class_get_byval_arg (src->klass), NULL);
+		}
+		if (size > 0)
+			g_assert (ovf_size > 0);
 
 		header = mono_method_get_header_checked (cfg->method, error);
 		mono_error_assert_ok (error); /* FIXME don't swallow the error */
@@ -2628,14 +2624,19 @@ mono_arch_emit_outarg_vt (MonoCompile *c
 		else
 			srcReg = STK_BASE;
 
-		MONO_EMIT_NEW_MOVE (cfg, srcReg, ainfo->offparm,
-							 src->dreg, 0, size);
+		EMIT_NEW_VARLOADA (cfg, load, vtcopy, vtcopy->inst_vtype);
+		mini_emit_memcpy (cfg, load->dreg, 0, src->dreg, 0, size, TARGET_SIZEOF_VOID_P);
 
-		if (cfg->compute_gc_maps) {
-			MonoInst *def;
+		if (ainfo->reg == STK_BASE) {
+			MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, srcReg, ainfo->offset, load->dreg);
 
-			EMIT_NEW_GC_PARAM_SLOT_LIVENESS_DEF (cfg, def, ainfo->offset, m_class_get_byval_arg (ins->klass));
-		}
+			if (cfg->compute_gc_maps) {
+				MonoInst *def;
+
+				EMIT_NEW_GC_PARAM_SLOT_LIVENESS_DEF (cfg, def, ainfo->offset, m_class_get_byval_arg (ins->klass));
+			}
+		} else
+			mono_call_inst_add_outarg_reg (cfg, call, load->dreg, ainfo->reg, FALSE);
 	}
 }
 
@@ -4265,6 +4266,11 @@ mono_arch_output_basic_block (MonoCompil
 			s390_stg (code, ins->sreg1, s390_r13, s390_r1, 0);
 			}
 			break;
+		case OP_TAILCALL_PARAMETER :
+			// This opcode helps compute sizes, i.e.
+			// of the subsequent OP_TAILCALL, but contributes no code.
+			g_assert (ins->next);
+			break;
 		case OP_TAILCALL :
 		case OP_TAILCALL_MEMBASE : {
 			MonoCallInst *call = (MonoCallInst *) ins;
--- mono-5.18.0.240+dfsg.orig/mono/mini/mini-s390x.h
+++ mono-5.18.0.240+dfsg/mono/mini/mini-s390x.h
@@ -65,6 +65,7 @@ typedef struct
 #define MONO_ARCH_HAVE_OP_GENERIC_CLASS_INIT		1
 #define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK		1
 #define MONO_ARCH_HAVE_TRACK_FPREGS			1
+#define MONO_ARCH_HAVE_OPTIMIZED_DIV			1
 
 #define S390_STACK_ALIGNMENT		 8
 #define S390_FIRST_ARG_REG 		s390_r2
--- mono-5.18.0.240+dfsg.orig/mono/mini/mini.c
+++ mono-5.18.0.240+dfsg/mono/mini/mini.c
@@ -3056,6 +3056,9 @@ init_backend (MonoBackend *backend)
 #ifdef MONO_ARCH_EXPLICIT_NULL_CHECKS
 	backend->explicit_null_checks = 1;
 #endif
+#ifdef MONO_ARCH_HAVE_OPTIMIZED_DIV
+	backend->optimized_div = 1;
+#endif
 }
 
 /*
--- mono-5.18.0.240+dfsg.orig/mono/mini/mini.h
+++ mono-5.18.0.240+dfsg/mono/mini/mini.h
@@ -1150,6 +1150,7 @@ typedef struct {
 	guint            no_unaligned_access : 1;
 	guint            disable_div_with_mul : 1;
 	guint            explicit_null_checks : 1;
+	guint            optimized_div : 1;
 	int              monitor_enter_adjustment;
 	int              dyn_call_param_area;
 } MonoBackend;
--- mono-5.18.0.240+dfsg.orig/mono/tests/Makefile.am
+++ mono-5.18.0.240+dfsg/mono/tests/Makefile.am
@@ -207,7 +207,7 @@ MCS_NO_UNSAFE = $(TOOLS_RUNTIME) $(CSC)
 	-noconfig -nologo \
 	-nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
 	-nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
-	-nowarn:0197 -langversion:7.3 $(PROFILE_MCS_FLAGS)
+	-nowarn:0197 -langversion:7.2 $(PROFILE_MCS_FLAGS)
 MCS_NO_LIB = $(MCS_NO_UNSAFE) -unsafe
 
 MCS = $(MCS_NO_LIB)
@@ -567,9 +567,6 @@ TESTS_CS_SRC=		\
 	bug-561239.cs	\
 	bug-562150.cs	\
 	bug-599469.cs	\
-	monitor-resurrection.cs	\
-	monitor-wait-abort.cs	\
-	monitor-abort.cs	\
 	bug-666008.cs	\
 	bug-685908.cs	\
 	sgen-long-vtype.cs	\
@@ -583,7 +580,6 @@ TESTS_CS_SRC=		\
 	bug-3903.cs	\
 	async-with-cb-throws.cs	\
 	bug-6148.cs	\
-	bug-10127.cs	\
 	bug-18026.cs	\
 	allow-synchronous-major.cs	\
 	block_guard_restore_aligment_on_exit.cs	\
--- mono-5.18.0.240+dfsg.orig/mono/utils/mono-context.h
+++ mono-5.18.0.240+dfsg/mono/utils/mono-context.h
@@ -865,7 +865,13 @@ typedef struct {
 
 #define MONO_ARCH_HAS_MONO_CONTEXT 1
 
+#include <sys/ucontext.h>
+
+#if __GLIBC_PREREQ(2, 27)
+typedef ucontext_t MonoContext;
+#else
 typedef struct ucontext MonoContext;
+#endif
 
 #define MONO_CONTEXT_SET_IP(ctx,ip) 					\
 	do {								\
--- mono-5.18.0.240+dfsg.orig/mono/utils/mono-tls.c
+++ mono-5.18.0.240+dfsg/mono/utils/mono-tls.c
@@ -119,15 +119,14 @@
 #  if !defined(__PIE__)
 // This only works if libmono is linked into the application
 #   define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;  				\
-						__asm__ ("basr  %%r1,0\n\t"			\
-							 "j     0f\n\t"				\
-							 ".quad " #var "@TLSGD\n"		\
-							 "0:\n\t"				\
-							 "lg    %%r2,4(%%r1)\n\t"		\
-							 "brasl	%%r14,__tls_get_offset@PLT:tls_gdcall:"#var"\n\t" \
-							 "lgr	%0,%%r2\n\t"			\
-							: "=r" (foo) : 				\
-							: "1", "2", "14", "cc");		\
+						void *x = &var;					\
+						__asm__ ("ear   %%r1,%%a0\n"			\
+							 "sllg  %%r1,%%r1,32\n"			\
+							 "ear   %%r1,%%a1\n"			\
+							 "lgr   %0,%1\n"			\
+							 "sgr   %0,%%r1\n"			\
+							: "=r" (foo) : "r" (x)			\
+							: "1", "cc");				\
 						offset = foo; } while (0)
 #  elif __PIE__ == 1
 #   define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;  					\
