[arch-commits] Commit in mono/repos (40 files)

Daniel Isenmann daniel at archlinux.org
Mon Oct 3 08:39:21 UTC 2016


    Date: Monday, October 3, 2016 @ 08:39:20
  Author: daniel
Revision: 277568

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  mono/repos/extra-i686/Microsoft.Portable.Common.targets
    (from rev 277567, mono/trunk/Microsoft.Portable.Common.targets)
  mono/repos/extra-i686/PKGBUILD
    (from rev 277567, mono/trunk/PKGBUILD)
  mono/repos/extra-i686/bug434892.patch
    (from rev 277567, mono/trunk/bug434892.patch)
  mono/repos/extra-i686/build_fix.patch
    (from rev 277567, mono/trunk/build_fix.patch)
  mono/repos/extra-i686/fix-zlib-helper.patch
    (from rev 277567, mono/trunk/fix-zlib-helper.patch)
  mono/repos/extra-i686/mono.binfmt.d
    (from rev 277567, mono/trunk/mono.binfmt.d)
  mono/repos/extra-i686/mono.install
    (from rev 277567, mono/trunk/mono.install)
  mono/repos/extra-i686/mono_context.patch
    (from rev 277567, mono/trunk/mono_context.patch)
  mono/repos/extra-i686/sgen_fix.patch
    (from rev 277567, mono/trunk/sgen_fix.patch)
  mono/repos/extra-i686/tls_fix.patch
    (from rev 277567, mono/trunk/tls_fix.patch)
  mono/repos/extra-x86_64/Microsoft.Portable.Common.targets
    (from rev 277567, mono/trunk/Microsoft.Portable.Common.targets)
  mono/repos/extra-x86_64/PKGBUILD
    (from rev 277567, mono/trunk/PKGBUILD)
  mono/repos/extra-x86_64/bug434892.patch
    (from rev 277567, mono/trunk/bug434892.patch)
  mono/repos/extra-x86_64/build_fix.patch
    (from rev 277567, mono/trunk/build_fix.patch)
  mono/repos/extra-x86_64/fix-zlib-helper.patch
    (from rev 277567, mono/trunk/fix-zlib-helper.patch)
  mono/repos/extra-x86_64/mono.binfmt.d
    (from rev 277567, mono/trunk/mono.binfmt.d)
  mono/repos/extra-x86_64/mono.install
    (from rev 277567, mono/trunk/mono.install)
  mono/repos/extra-x86_64/mono_context.patch
    (from rev 277567, mono/trunk/mono_context.patch)
  mono/repos/extra-x86_64/sgen_fix.patch
    (from rev 277567, mono/trunk/sgen_fix.patch)
  mono/repos/extra-x86_64/tls_fix.patch
    (from rev 277567, mono/trunk/tls_fix.patch)
Deleted:
  mono/repos/extra-i686/Microsoft.Portable.Common.targets
  mono/repos/extra-i686/PKGBUILD
  mono/repos/extra-i686/bug434892.patch
  mono/repos/extra-i686/build_fix.patch
  mono/repos/extra-i686/fix-zlib-helper.patch
  mono/repos/extra-i686/mono.binfmt.d
  mono/repos/extra-i686/mono.install
  mono/repos/extra-i686/mono_context.patch
  mono/repos/extra-i686/sgen_fix.patch
  mono/repos/extra-i686/tls_fix.patch
  mono/repos/extra-x86_64/Microsoft.Portable.Common.targets
  mono/repos/extra-x86_64/PKGBUILD
  mono/repos/extra-x86_64/bug434892.patch
  mono/repos/extra-x86_64/build_fix.patch
  mono/repos/extra-x86_64/fix-zlib-helper.patch
  mono/repos/extra-x86_64/mono.binfmt.d
  mono/repos/extra-x86_64/mono.install
  mono/repos/extra-x86_64/mono_context.patch
  mono/repos/extra-x86_64/sgen_fix.patch
  mono/repos/extra-x86_64/tls_fix.patch

------------------------------------------------+
 /Microsoft.Portable.Common.targets             |    8 
 /PKGBUILD                                      |  112 +++++++++++
 /bug434892.patch                               |   22 ++
 /build_fix.patch                               |   50 +++++
 /fix-zlib-helper.patch                         |   52 +++++
 /mono.binfmt.d                                 |    2 
 /mono.install                                  |   14 +
 /mono_context.patch                            |  108 +++++++++++
 /sgen_fix.patch                                |  224 +++++++++++++++++++++++
 /tls_fix.patch                                 |  182 ++++++++++++++++++
 extra-i686/Microsoft.Portable.Common.targets   |    4 
 extra-i686/PKGBUILD                            |   60 ------
 extra-i686/bug434892.patch                     |   11 -
 extra-i686/build_fix.patch                     |   25 --
 extra-i686/fix-zlib-helper.patch               |   26 --
 extra-i686/mono.binfmt.d                       |    1 
 extra-i686/mono.install                        |    7 
 extra-i686/mono_context.patch                  |   54 -----
 extra-i686/sgen_fix.patch                      |  112 -----------
 extra-i686/tls_fix.patch                       |   91 ---------
 extra-x86_64/Microsoft.Portable.Common.targets |    4 
 extra-x86_64/PKGBUILD                          |   60 ------
 extra-x86_64/bug434892.patch                   |   11 -
 extra-x86_64/build_fix.patch                   |   25 --
 extra-x86_64/fix-zlib-helper.patch             |   26 --
 extra-x86_64/mono.binfmt.d                     |    1 
 extra-x86_64/mono.install                      |    7 
 extra-x86_64/mono_context.patch                |   54 -----
 extra-x86_64/sgen_fix.patch                    |  112 -----------
 extra-x86_64/tls_fix.patch                     |   91 ---------
 30 files changed, 774 insertions(+), 782 deletions(-)

Deleted: extra-i686/Microsoft.Portable.Common.targets
===================================================================
--- extra-i686/Microsoft.Portable.Common.targets	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/Microsoft.Portable.Common.targets	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,4 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<Import Project="..\Microsoft.Portable.Core.props" />
-	<Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>

Copied: mono/repos/extra-i686/Microsoft.Portable.Common.targets (from rev 277567, mono/trunk/Microsoft.Portable.Common.targets)
===================================================================
--- extra-i686/Microsoft.Portable.Common.targets	                        (rev 0)
+++ extra-i686/Microsoft.Portable.Common.targets	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,4 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+	<Import Project="..\Microsoft.Portable.Core.props" />
+	<Import Project="..\Microsoft.Portable.Core.targets" />
+</Project>

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/PKGBUILD	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,60 +0,0 @@
-# $Id$
-# Maintainer: Daniel Isenmann <daniel at archlinux.org>
-# Contributor: Brice Carpentier <brice at dlfp.org>
-
-pkgname=mono
-pkgver=4.4.1.0
-_pkgver=4.4.1
-pkgrel=1
-pkgdesc="Free implementation of the .NET platform including runtime and compiler"
-arch=(i686 x86_64)
-license=('GPL' 'LGPL2.1' 'MPL' 'custom:MITX11')
-url="http://www.mono-project.com/"
-depends=('zlib' 'libgdiplus>=4.2' 'sh' 'python' 'ca-certificates')
-provides=('monodoc')
-conflicts=('monodoc')
-install="${pkgname}.install"
-source=(http://download.mono-project.com/sources/mono/${pkgname}-${pkgver}.tar.bz2
-        mono.binfmt.d
-	mono_context.patch)
-md5sums=('18b7931a20b0dbb7c27322bb6a1ad5e2'
-         'b9ef8a65fea497acf176cca16c1e2402'
-         '9325e50a3fde354229c507801622b64b')
-
-build() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-	
-  # build mono
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --bindir=/usr/bin \
-    --sbindir=/usr/bin \
-    --with-mcs-docs=no 
-  make
-
-  # build jay
-  cd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
-  make
-}
-
-package() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-  make DESTDIR="${pkgdir}" install
-
-  # install jay
-  pushd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
-  make DESTDIR="${pkgdir}" prefix=/usr INSTALL=../../install-sh install
-  popd
-
-  # install binfmt conf file and pathes
-  install -D -m644 "${srcdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf
-
-  #install license
-  mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
-  install -m644 mcs/MIT.X11 "${pkgdir}"/usr/share/licenses/${pkgname}/
-
-  #fix .pc file to be able to request mono on what it depends, fixes #go-oo build
-  sed -i -e "s:#Requires:Requires:" "${pkgdir}"/usr/lib/pkgconfig/mono.pc
-  sed -i -e "s:/2.0/:/4.5/:g" "${pkgdir}"/usr/lib/pkgconfig/mono-nunit.pc
-}

Copied: mono/repos/extra-i686/PKGBUILD (from rev 277567, mono/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Daniel Isenmann <daniel at archlinux.org>
+# Contributor: Brice Carpentier <brice at dlfp.org>
+
+pkgname=mono
+pkgver=4.6.1.3
+_pkgver=4.6.1
+pkgrel=1
+pkgdesc="Free implementation of the .NET platform including runtime and compiler"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL2.1' 'MPL')
+url="http://www.mono-project.com/"
+depends=('zlib' 'libgdiplus>=4.2' 'sh' 'python' 'ca-certificates')
+provides=('monodoc')
+conflicts=('monodoc')
+install="${pkgname}.install"
+source=(http://download.mono-project.com/sources/mono/${pkgname}-${pkgver}.tar.bz2
+        mono.binfmt.d
+	mono_context.patch)
+md5sums=('a056b24e75fa2355d6d4c071e6a3ba2c'
+         'b9ef8a65fea497acf176cca16c1e2402'
+         '9325e50a3fde354229c507801622b64b')
+
+build() {
+  cd "${srcdir}"/${pkgname}-${_pkgver}
+	
+  # build mono
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --bindir=/usr/bin \
+    --sbindir=/usr/bin \
+    --with-mcs-docs=no 
+  make
+
+  # build jay
+  cd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
+  make
+}
+
+package() {
+  cd "${srcdir}"/${pkgname}-${_pkgver}
+  make DESTDIR="${pkgdir}" install
+
+  # install jay
+  pushd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
+  make DESTDIR="${pkgdir}" prefix=/usr INSTALL=../../install-sh install
+  popd
+
+  # install binfmt conf file and pathes
+  install -D -m644 "${srcdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf
+
+  #fix .pc file to be able to request mono on what it depends, fixes #go-oo build
+  sed -i -e "s:#Requires:Requires:" "${pkgdir}"/usr/lib/pkgconfig/mono.pc
+  sed -i -e "s:/2.0/:/4.5/:g" "${pkgdir}"/usr/lib/pkgconfig/mono-nunit.pc
+}

Deleted: extra-i686/bug434892.patch
===================================================================
--- extra-i686/bug434892.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/bug434892.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,11 +0,0 @@
---- trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/07/01 20:17:46	107006
-+++ trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/10/28 09:32:46	117243
-@@ -177,7 +177,7 @@
- 				foreach (OperationMessage om in op.Messages) {
- 					Message msg = ctx.Services.GetMessage (om.Message);
- 					foreach (MessagePart part in msg.Parts)
--						parts.Add (part,part);
-+						parts [part] = part; // do not use Add() - there could be the same MessagePart instance.
- 				}
- 			}
- 			

Copied: mono/repos/extra-i686/bug434892.patch (from rev 277567, mono/trunk/bug434892.patch)
===================================================================
--- extra-i686/bug434892.patch	                        (rev 0)
+++ extra-i686/bug434892.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,11 @@
+--- trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/07/01 20:17:46	107006
++++ trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/10/28 09:32:46	117243
+@@ -177,7 +177,7 @@
+ 				foreach (OperationMessage om in op.Messages) {
+ 					Message msg = ctx.Services.GetMessage (om.Message);
+ 					foreach (MessagePart part in msg.Parts)
+-						parts.Add (part,part);
++						parts [part] = part; // do not use Add() - there could be the same MessagePart instance.
+ 				}
+ 			}
+ 			

Deleted: extra-i686/build_fix.patch
===================================================================
--- extra-i686/build_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/build_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,25 +0,0 @@
-From c68c72144d7b2a0516276137855d4508a3f59a17 Mon Sep 17 00:00:00 2001
-From: Michael Hutchinson <m.j.hutchinson at gmail.com>
-Date: Tue, 1 Apr 2014 17:21:51 -0400
-Subject: [PATCH] [xbuild] Include PCL common targets in tarball
-
-BXC18690 - Microsoft.Portable.Common.targets is missing in mono 3.4.0 tarball
----
- mcs/tools/xbuild/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
-index c3a5d6a..31d5329 100644
---- a/mcs/tools/xbuild/Makefile
-+++ b/mcs/tools/xbuild/Makefile
-@@ -93,6 +93,7 @@ EXTRA_DISTFILES = \
- 	frameworks/net_4.5.xml \
- 	targets/Microsoft.Portable.CSharp_4.0.targets \
- 	targets/Microsoft.Portable.CSharp_4.5.targets \
-+	targets/Microsoft.Portable.Common.targets \
- 	targets/Microsoft.Portable.Core.targets \
- 	targets/Microsoft.Portable.Core.props \
- 	targets/Microsoft.WebApplication.targets \
--- 
-1.9.3
-

Copied: mono/repos/extra-i686/build_fix.patch (from rev 277567, mono/trunk/build_fix.patch)
===================================================================
--- extra-i686/build_fix.patch	                        (rev 0)
+++ extra-i686/build_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,25 @@
+From c68c72144d7b2a0516276137855d4508a3f59a17 Mon Sep 17 00:00:00 2001
+From: Michael Hutchinson <m.j.hutchinson at gmail.com>
+Date: Tue, 1 Apr 2014 17:21:51 -0400
+Subject: [PATCH] [xbuild] Include PCL common targets in tarball
+
+BXC18690 - Microsoft.Portable.Common.targets is missing in mono 3.4.0 tarball
+---
+ mcs/tools/xbuild/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
+index c3a5d6a..31d5329 100644
+--- a/mcs/tools/xbuild/Makefile
++++ b/mcs/tools/xbuild/Makefile
+@@ -93,6 +93,7 @@ EXTRA_DISTFILES = \
+ 	frameworks/net_4.5.xml \
+ 	targets/Microsoft.Portable.CSharp_4.0.targets \
+ 	targets/Microsoft.Portable.CSharp_4.5.targets \
++	targets/Microsoft.Portable.Common.targets \
+ 	targets/Microsoft.Portable.Core.targets \
+ 	targets/Microsoft.Portable.Core.props \
+ 	targets/Microsoft.WebApplication.targets \
+-- 
+1.9.3
+

Deleted: extra-i686/fix-zlib-helper.patch
===================================================================
--- extra-i686/fix-zlib-helper.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/fix-zlib-helper.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,26 +0,0 @@
-@@ -, +, @@ 
----
- support/zlib-helper.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
---- a/support/zlib-helper.c	
-+++ a/support/zlib-helper.c	
-@@ -90,6 +90,8 @@ CreateZStream (gint compress, guchar gzip, read_write_func func, void *gchandle)
- 	result->gchandle = gchandle;
- 	result->compress = compress;
- 	result->buffer = g_new (guchar, BUFFER_SIZE);
-+	result->stream->next_out = result->buffer;
-+	result->stream->avail_out = BUFFER_SIZE;
- 	return result;
- }
- 
-@@ -148,7 +150,7 @@ flush_internal (ZStream *stream, gboolean is_final)
- 	if (!stream->compress)
- 		return 0;
- 
--	if (!is_final) {
-+	if (!is_final && stream->stream->avail_in != 0) {
- 		status = deflate (stream->stream, Z_PARTIAL_FLUSH);
- 		if (status != Z_OK && status != Z_STREAM_END)
- 			return status;
--- 
-

Copied: mono/repos/extra-i686/fix-zlib-helper.patch (from rev 277567, mono/trunk/fix-zlib-helper.patch)
===================================================================
--- extra-i686/fix-zlib-helper.patch	                        (rev 0)
+++ extra-i686/fix-zlib-helper.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,26 @@
+@@ -, +, @@ 
+---
+ support/zlib-helper.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+--- a/support/zlib-helper.c	
++++ a/support/zlib-helper.c	
+@@ -90,6 +90,8 @@ CreateZStream (gint compress, guchar gzip, read_write_func func, void *gchandle)
+ 	result->gchandle = gchandle;
+ 	result->compress = compress;
+ 	result->buffer = g_new (guchar, BUFFER_SIZE);
++	result->stream->next_out = result->buffer;
++	result->stream->avail_out = BUFFER_SIZE;
+ 	return result;
+ }
+ 
+@@ -148,7 +150,7 @@ flush_internal (ZStream *stream, gboolean is_final)
+ 	if (!stream->compress)
+ 		return 0;
+ 
+-	if (!is_final) {
++	if (!is_final && stream->stream->avail_in != 0) {
+ 		status = deflate (stream->stream, Z_PARTIAL_FLUSH);
+ 		if (status != Z_OK && status != Z_STREAM_END)
+ 			return status;
+-- 
+

Deleted: extra-i686/mono.binfmt.d
===================================================================
--- extra-i686/mono.binfmt.d	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/mono.binfmt.d	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1 +0,0 @@
-:CLR:M::MZ::/usr/bin/mono:

Copied: mono/repos/extra-i686/mono.binfmt.d (from rev 277567, mono/trunk/mono.binfmt.d)
===================================================================
--- extra-i686/mono.binfmt.d	                        (rev 0)
+++ extra-i686/mono.binfmt.d	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1 @@
+:CLR:M::MZ::/usr/bin/mono:

Deleted: extra-i686/mono.install
===================================================================
--- extra-i686/mono.install	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/mono.install	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,7 +0,0 @@
-post_install() {
-    post_upgrade
-}
-
-post_upgrade() {
-    cert-sync /etc/ssl/certs/ca-certificates.crt
-}

Copied: mono/repos/extra-i686/mono.install (from rev 277567, mono/trunk/mono.install)
===================================================================
--- extra-i686/mono.install	                        (rev 0)
+++ extra-i686/mono.install	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,7 @@
+post_install() {
+    post_upgrade
+}
+
+post_upgrade() {
+    cert-sync /etc/ssl/certs/ca-certificates.crt
+}

Deleted: extra-i686/mono_context.patch
===================================================================
--- extra-i686/mono_context.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/mono_context.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,54 +0,0 @@
-From 23e34d77f2fd23ab5d61f6ba4aa905817f57668a Mon Sep 17 00:00:00 2001
-From: Rodrigo Kumpera <kumpera at gmail.com>
-Date: Tue, 22 Sep 2015 15:37:07 -0400
-Subject: [PATCH] [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
-
-Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.
-
-This caused crashes on linux when unified suspend was enabled.
----
- mono/utils/mono-context.h | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
-index a2a0b7e..dc53e85 100644
---- a/mono/utils/mono-context.h
-+++ b/mono/utils/mono-context.h
-@@ -183,11 +183,11 @@ extern void mono_context_get_current (void *);
- #define MONO_CONTEXT_GET_CURRENT(ctx)	\
- 	__asm__ __volatile__(	\
- 		"movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"	\
--		"movq %%rbx, %%nacl:0x08(%%r15, %0, 1)\n"	\
--		"movq %%rcx, %%nacl:0x10(%%r15, %0, 1)\n"	\
--		"movq %%rdx, %%nacl:0x18(%%r15, %0, 1)\n"	\
--		"movq %%rbp, %%nacl:0x20(%%r15, %0, 1)\n"	\
--		"movq %%rsp, %%nacl:0x28(%%r15, %0, 1)\n"	\
-+		"movq %%rcx, %%nacl:0x08(%%r15, %0, 1)\n"	\
-+		"movq %%rdx, %%nacl:0x10(%%r15, %0, 1)\n"	\
-+		"movq %%rbx, %%nacl:0x18(%%r15, %0, 1)\n"	\
-+		"movq %%rsp, %%nacl:0x20(%%r15, %0, 1)\n"	\
-+		"movq %%rbp, %%nacl:0x28(%%r15, %0, 1)\n"	\
- 		"movq %%rsi, %%nacl:0x30(%%r15, %0, 1)\n"	\
- 		"movq %%rdi, %%nacl:0x38(%%r15, %0, 1)\n"	\
- 		"movq %%r8,  %%nacl:0x40(%%r15, %0, 1)\n"	\
-@@ -204,14 +204,15 @@ extern void mono_context_get_current (void *);
- 		: "a" ((int64_t)&(ctx))	\
- 		: "rdx", "memory")
- #else
-+
- #define MONO_CONTEXT_GET_CURRENT(ctx)	\
- 	__asm__ __volatile__(	\
- 		"movq $0x0,  0x00(%0)\n"	\
--		"movq %%rbx, 0x08(%0)\n"	\
--		"movq %%rcx, 0x10(%0)\n"	\
--		"movq %%rdx, 0x18(%0)\n"	\
--		"movq %%rbp, 0x20(%0)\n"	\
--		"movq %%rsp, 0x28(%0)\n"	\
-+		"movq %%rcx, 0x08(%0)\n"	\
-+		"movq %%rdx, 0x10(%0)\n"	\
-+		"movq %%rbx, 0x18(%0)\n"	\
-+		"movq %%rsp, 0x20(%0)\n"	\
-+		"movq %%rbp, 0x28(%0)\n"	\
- 		"movq %%rsi, 0x30(%0)\n"	\
- 		"movq %%rdi, 0x38(%0)\n"	\
- 		"movq %%r8,  0x40(%0)\n"	\

Copied: mono/repos/extra-i686/mono_context.patch (from rev 277567, mono/trunk/mono_context.patch)
===================================================================
--- extra-i686/mono_context.patch	                        (rev 0)
+++ extra-i686/mono_context.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,54 @@
+From 23e34d77f2fd23ab5d61f6ba4aa905817f57668a Mon Sep 17 00:00:00 2001
+From: Rodrigo Kumpera <kumpera at gmail.com>
+Date: Tue, 22 Sep 2015 15:37:07 -0400
+Subject: [PATCH] [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
+
+Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.
+
+This caused crashes on linux when unified suspend was enabled.
+---
+ mono/utils/mono-context.h | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
+index a2a0b7e..dc53e85 100644
+--- a/mono/utils/mono-context.h
++++ b/mono/utils/mono-context.h
+@@ -183,11 +183,11 @@ extern void mono_context_get_current (void *);
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"	\
+-		"movq %%rbx, %%nacl:0x08(%%r15, %0, 1)\n"	\
+-		"movq %%rcx, %%nacl:0x10(%%r15, %0, 1)\n"	\
+-		"movq %%rdx, %%nacl:0x18(%%r15, %0, 1)\n"	\
+-		"movq %%rbp, %%nacl:0x20(%%r15, %0, 1)\n"	\
+-		"movq %%rsp, %%nacl:0x28(%%r15, %0, 1)\n"	\
++		"movq %%rcx, %%nacl:0x08(%%r15, %0, 1)\n"	\
++		"movq %%rdx, %%nacl:0x10(%%r15, %0, 1)\n"	\
++		"movq %%rbx, %%nacl:0x18(%%r15, %0, 1)\n"	\
++		"movq %%rsp, %%nacl:0x20(%%r15, %0, 1)\n"	\
++		"movq %%rbp, %%nacl:0x28(%%r15, %0, 1)\n"	\
+ 		"movq %%rsi, %%nacl:0x30(%%r15, %0, 1)\n"	\
+ 		"movq %%rdi, %%nacl:0x38(%%r15, %0, 1)\n"	\
+ 		"movq %%r8,  %%nacl:0x40(%%r15, %0, 1)\n"	\
+@@ -204,14 +204,15 @@ extern void mono_context_get_current (void *);
+ 		: "a" ((int64_t)&(ctx))	\
+ 		: "rdx", "memory")
+ #else
++
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  0x00(%0)\n"	\
+-		"movq %%rbx, 0x08(%0)\n"	\
+-		"movq %%rcx, 0x10(%0)\n"	\
+-		"movq %%rdx, 0x18(%0)\n"	\
+-		"movq %%rbp, 0x20(%0)\n"	\
+-		"movq %%rsp, 0x28(%0)\n"	\
++		"movq %%rcx, 0x08(%0)\n"	\
++		"movq %%rdx, 0x10(%0)\n"	\
++		"movq %%rbx, 0x18(%0)\n"	\
++		"movq %%rsp, 0x20(%0)\n"	\
++		"movq %%rbp, 0x28(%0)\n"	\
+ 		"movq %%rsi, 0x30(%0)\n"	\
+ 		"movq %%rdi, 0x38(%0)\n"	\
+ 		"movq %%r8,  0x40(%0)\n"	\

Deleted: extra-i686/sgen_fix.patch
===================================================================
--- extra-i686/sgen_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/sgen_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,112 +0,0 @@
-From d2cc22580898df5d4a15e0f99ab513e1570a6082 Mon Sep 17 00:00:00 2001
-From: Zoltan Varga <vargaz at gmail.com>
-Date: Fri, 20 Sep 2013 19:06:34 +0200
-Subject: [PATCH] [sgen] Use __builtin_ctzl () in OBJ_BITMAP_FOREACH_PTR () on
- 64 bit platforms. Fixes #14834.
-
----
- mono/metadata/sgen-descriptor.h | 28 +++++++++++++++++++++++++---
- mono/tests/sgen-descriptors.cs  | 15 +++++++++++++--
- 2 files changed, 38 insertions(+), 5 deletions(-)
-
-diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h
-index cd53a86..3a00589 100644
---- a/mono/metadata/sgen-descriptor.h
-+++ b/mono/metadata/sgen-descriptor.h
-@@ -170,21 +170,43 @@ enum {
- 		}	\
- 	} while (0)
- 
--#ifdef __GNUC__
-+#if defined(__GNUC__) && SIZEOF_VOID_P==4
-+#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
-+		/* there are pointers */        \
-+		void **_objptr = (void**)(obj); \
-+		gsize _bmap = (desc) >> 16;     \
-+		_objptr += OBJECT_HEADER_WORDS; \
-+		{ \
-+			int _index = __builtin_ctz (_bmap);		\
-+			_objptr += _index; \
-+			_bmap >>= (_index + 1);				\
-+			HANDLE_PTR (_objptr, (obj));		\
-+			_objptr ++;							\
-+			} \
-+		while (_bmap) { \
-+			int _index = __builtin_ctz (_bmap);		\
-+			_objptr += _index; \
-+			_bmap >>= (_index + 1);				\
-+			HANDLE_PTR (_objptr, (obj));		\
-+			_objptr ++;							\
-+		}										\
-+	} while (0)
-+#elif defined(__GNUC__) && SIZEOF_VOID_P==8
-+/* Same as above, but use _builtin_ctzl () */
- #define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
- 		/* there are pointers */        \
- 		void **_objptr = (void**)(obj); \
- 		gsize _bmap = (desc) >> 16;     \
- 		_objptr += OBJECT_HEADER_WORDS; \
- 		{ \
--			int _index = __builtin_ctz (_bmap); \
-+			int _index = __builtin_ctzl (_bmap);		\
- 			_objptr += _index; \
- 			_bmap >>= (_index + 1);				\
- 			HANDLE_PTR (_objptr, (obj));		\
- 			_objptr ++;							\
- 			} \
- 		while (_bmap) { \
--			int _index = __builtin_ctz (_bmap); \
-+			int _index = __builtin_ctzl (_bmap);		\
- 			_objptr += _index; \
- 			_bmap >>= (_index + 1);				\
- 			HANDLE_PTR (_objptr, (obj));		\
-diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs
-index ae00084..246e5aa 100644
---- a/mono/tests/sgen-descriptors.cs
-+++ b/mono/tests/sgen-descriptors.cs
-@@ -1,4 +1,5 @@
- using System;
-+using System.Runtime.InteropServices;
- 
- public struct SmallMixed
- {
-@@ -47,6 +48,13 @@ public class HugePtrFree {
- 	public LargeStruct2 c;
- }
- 
-+[StructLayout (LayoutKind.Sequential)]
-+public class Non32bitBitmap {
-+	public object o;
-+	public long i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35;
-+	public object o2;
-+}
-+
- /*
- This is a stress test for descriptors.
- */
-@@ -54,10 +62,10 @@ class Driver {
- 	static char[] FOO = new char[] { 'f', 'o', 'b' };
- 
- 	static void Fill (int cycles) {
--		object[] root = new object [12];
-+		object[] root = new object [13];
- 		object[] current = root;
- 		for (int i = 0; i < cycles; ++i) {
--			current [0] = new object [12];
-+			current [0] = new object [13];
- 			current [1] = new int [6];
- 			current [2] = new int [2,3];
- 			current [3] = new string (FOO);
-@@ -72,6 +80,9 @@ class Driver {
- 				current [10] = new HugePtrFree ();
- 			if ((i %  10000) == 0)
- 				current [11] = new LargeStruct2 [1];
-+
-+			/* Test for 64 bit bitmap descriptors (#14834) */
-+			current [12] = new Non32bitBitmap () { o = new object (), i32 = 1, i33 = 1, i34 = 1, i35 = 1, o2 = new object () };
- 	
- 			current = (object[])current [0];
- 		}
--- 
-1.8.4
-

Copied: mono/repos/extra-i686/sgen_fix.patch (from rev 277567, mono/trunk/sgen_fix.patch)
===================================================================
--- extra-i686/sgen_fix.patch	                        (rev 0)
+++ extra-i686/sgen_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,112 @@
+From d2cc22580898df5d4a15e0f99ab513e1570a6082 Mon Sep 17 00:00:00 2001
+From: Zoltan Varga <vargaz at gmail.com>
+Date: Fri, 20 Sep 2013 19:06:34 +0200
+Subject: [PATCH] [sgen] Use __builtin_ctzl () in OBJ_BITMAP_FOREACH_PTR () on
+ 64 bit platforms. Fixes #14834.
+
+---
+ mono/metadata/sgen-descriptor.h | 28 +++++++++++++++++++++++++---
+ mono/tests/sgen-descriptors.cs  | 15 +++++++++++++--
+ 2 files changed, 38 insertions(+), 5 deletions(-)
+
+diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h
+index cd53a86..3a00589 100644
+--- a/mono/metadata/sgen-descriptor.h
++++ b/mono/metadata/sgen-descriptor.h
+@@ -170,21 +170,43 @@ enum {
+ 		}	\
+ 	} while (0)
+ 
+-#ifdef __GNUC__
++#if defined(__GNUC__) && SIZEOF_VOID_P==4
++#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
++		/* there are pointers */        \
++		void **_objptr = (void**)(obj); \
++		gsize _bmap = (desc) >> 16;     \
++		_objptr += OBJECT_HEADER_WORDS; \
++		{ \
++			int _index = __builtin_ctz (_bmap);		\
++			_objptr += _index; \
++			_bmap >>= (_index + 1);				\
++			HANDLE_PTR (_objptr, (obj));		\
++			_objptr ++;							\
++			} \
++		while (_bmap) { \
++			int _index = __builtin_ctz (_bmap);		\
++			_objptr += _index; \
++			_bmap >>= (_index + 1);				\
++			HANDLE_PTR (_objptr, (obj));		\
++			_objptr ++;							\
++		}										\
++	} while (0)
++#elif defined(__GNUC__) && SIZEOF_VOID_P==8
++/* Same as above, but use _builtin_ctzl () */
+ #define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
+ 		/* there are pointers */        \
+ 		void **_objptr = (void**)(obj); \
+ 		gsize _bmap = (desc) >> 16;     \
+ 		_objptr += OBJECT_HEADER_WORDS; \
+ 		{ \
+-			int _index = __builtin_ctz (_bmap); \
++			int _index = __builtin_ctzl (_bmap);		\
+ 			_objptr += _index; \
+ 			_bmap >>= (_index + 1);				\
+ 			HANDLE_PTR (_objptr, (obj));		\
+ 			_objptr ++;							\
+ 			} \
+ 		while (_bmap) { \
+-			int _index = __builtin_ctz (_bmap); \
++			int _index = __builtin_ctzl (_bmap);		\
+ 			_objptr += _index; \
+ 			_bmap >>= (_index + 1);				\
+ 			HANDLE_PTR (_objptr, (obj));		\
+diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs
+index ae00084..246e5aa 100644
+--- a/mono/tests/sgen-descriptors.cs
++++ b/mono/tests/sgen-descriptors.cs
+@@ -1,4 +1,5 @@
+ using System;
++using System.Runtime.InteropServices;
+ 
+ public struct SmallMixed
+ {
+@@ -47,6 +48,13 @@ public class HugePtrFree {
+ 	public LargeStruct2 c;
+ }
+ 
++[StructLayout (LayoutKind.Sequential)]
++public class Non32bitBitmap {
++	public object o;
++	public long i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35;
++	public object o2;
++}
++
+ /*
+ This is a stress test for descriptors.
+ */
+@@ -54,10 +62,10 @@ class Driver {
+ 	static char[] FOO = new char[] { 'f', 'o', 'b' };
+ 
+ 	static void Fill (int cycles) {
+-		object[] root = new object [12];
++		object[] root = new object [13];
+ 		object[] current = root;
+ 		for (int i = 0; i < cycles; ++i) {
+-			current [0] = new object [12];
++			current [0] = new object [13];
+ 			current [1] = new int [6];
+ 			current [2] = new int [2,3];
+ 			current [3] = new string (FOO);
+@@ -72,6 +80,9 @@ class Driver {
+ 				current [10] = new HugePtrFree ();
+ 			if ((i %  10000) == 0)
+ 				current [11] = new LargeStruct2 [1];
++
++			/* Test for 64 bit bitmap descriptors (#14834) */
++			current [12] = new Non32bitBitmap () { o = new object (), i32 = 1, i33 = 1, i34 = 1, i35 = 1, o2 = new object () };
+ 	
+ 			current = (object[])current [0];
+ 		}
+-- 
+1.8.4
+

Deleted: extra-i686/tls_fix.patch
===================================================================
--- extra-i686/tls_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-i686/tls_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,91 +0,0 @@
-From 04eb667e1bc4282a22f291b39099b23611793851 Mon Sep 17 00:00:00 2001
-From: Martin Baulig <martin.baulig at xamarin.com>
-Date: Tue, 15 Mar 2016 18:50:08 -0400
-Subject: [PATCH] [System]: Fix certificate validation on Linux.  Bug #39307.
-
-(cherry picked from commit 37b2b9fbc25a2199aba1d794117924d4828360a7)
----
- .../System/Mono.Net.Security/ChainValidationHelper.cs    |  3 ---
- .../Mono.Net.Security/SystemCertificateValidator.cs      | 16 +++++++++++-----
- 2 files changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-index 70c6996..63a781d 100644
---- a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-+++ b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-@@ -292,9 +292,6 @@ ValidationResult ValidateChain (string host, bool server, XX509CertificateCollec
- 			if (wantsChain)
- 				chain = SystemCertificateValidator.CreateX509Chain (certs);
- 
--			if (wantsChain || SystemCertificateValidator.NeedsChain (settings))
--				SystemCertificateValidator.BuildX509Chain (certs, chain, ref errors, ref status11);
--
- 			bool providerValidated = false;
- 			if (provider != null && provider.HasCustomSystemCertificateValidator) {
- 				var xerrors = (MonoSslPolicyErrors)errors;
-diff --git a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-index f0a0be3..dd67b66 100644
---- a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-+++ b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-@@ -86,13 +86,13 @@ public static X509Chain CreateX509Chain (XX509CertificateCollection certs)
- 			return chain;
- 		}
- 
--		public static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
-+		static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
- 		{
- #if MOBILE
--			return true;
-+			return false;
- #else
- 			if (is_macosx)
--				return true;
-+				return false;
- 
- 			var leaf = (X509Certificate2)certs [0];
- 
-@@ -130,7 +130,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
- 					return false;
- 				}
- 
--				if (host != null && !CheckServerIdentity (leaf, host)) {
-+				if (!string.IsNullOrEmpty (host) && !CheckServerIdentity (leaf, host)) {
- 					errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
- 					status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
- 					return false;
-@@ -143,7 +143,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
- 		static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCollection anchors, string host, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
- 		{
- 			var leaf = certs [0];
--			var result = false;
-+			bool result;
- 
- #if MONODROID
- 			result = AndroidPlatform.TrustEvaluateSsl (certs);
-@@ -166,6 +166,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
- 					result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
- 						trustResult == OSX509Certificates.SecTrustResult.Unspecified);
- 				} catch {
-+					result = false;
-+					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
- 					// Ignore
- 				}
- 
-@@ -178,6 +180,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
- 					status11 = (int)trustResult;
- 					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
- 				}
-+			} else {
-+				result = BuildX509Chain (certs, chain, ref errors, ref status11);
- 			}
- #endif
- 
-@@ -203,6 +207,8 @@ internal static bool NeedsChain (MonoTlsSettings settings)
- #if MOBILE
- 			return false;
- #else
-+			if (!is_macosx)
-+				return true;
- 			if (!CertificateValidationHelper.SupportsX509Chain)
- 				return false;
- 			if (settings != null)

Copied: mono/repos/extra-i686/tls_fix.patch (from rev 277567, mono/trunk/tls_fix.patch)
===================================================================
--- extra-i686/tls_fix.patch	                        (rev 0)
+++ extra-i686/tls_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,91 @@
+From 04eb667e1bc4282a22f291b39099b23611793851 Mon Sep 17 00:00:00 2001
+From: Martin Baulig <martin.baulig at xamarin.com>
+Date: Tue, 15 Mar 2016 18:50:08 -0400
+Subject: [PATCH] [System]: Fix certificate validation on Linux.  Bug #39307.
+
+(cherry picked from commit 37b2b9fbc25a2199aba1d794117924d4828360a7)
+---
+ .../System/Mono.Net.Security/ChainValidationHelper.cs    |  3 ---
+ .../Mono.Net.Security/SystemCertificateValidator.cs      | 16 +++++++++++-----
+ 2 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
+index 70c6996..63a781d 100644
+--- a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
++++ b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
+@@ -292,9 +292,6 @@ ValidationResult ValidateChain (string host, bool server, XX509CertificateCollec
+ 			if (wantsChain)
+ 				chain = SystemCertificateValidator.CreateX509Chain (certs);
+ 
+-			if (wantsChain || SystemCertificateValidator.NeedsChain (settings))
+-				SystemCertificateValidator.BuildX509Chain (certs, chain, ref errors, ref status11);
+-
+ 			bool providerValidated = false;
+ 			if (provider != null && provider.HasCustomSystemCertificateValidator) {
+ 				var xerrors = (MonoSslPolicyErrors)errors;
+diff --git a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
+index f0a0be3..dd67b66 100644
+--- a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
++++ b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
+@@ -86,13 +86,13 @@ public static X509Chain CreateX509Chain (XX509CertificateCollection certs)
+ 			return chain;
+ 		}
+ 
+-		public static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
++		static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
+ 		{
+ #if MOBILE
+-			return true;
++			return false;
+ #else
+ 			if (is_macosx)
+-				return true;
++				return false;
+ 
+ 			var leaf = (X509Certificate2)certs [0];
+ 
+@@ -130,7 +130,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
+ 					return false;
+ 				}
+ 
+-				if (host != null && !CheckServerIdentity (leaf, host)) {
++				if (!string.IsNullOrEmpty (host) && !CheckServerIdentity (leaf, host)) {
+ 					errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
+ 					status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
+ 					return false;
+@@ -143,7 +143,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
+ 		static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCollection anchors, string host, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
+ 		{
+ 			var leaf = certs [0];
+-			var result = false;
++			bool result;
+ 
+ #if MONODROID
+ 			result = AndroidPlatform.TrustEvaluateSsl (certs);
+@@ -166,6 +166,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
+ 					result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
+ 						trustResult == OSX509Certificates.SecTrustResult.Unspecified);
+ 				} catch {
++					result = false;
++					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
+ 					// Ignore
+ 				}
+ 
+@@ -178,6 +180,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
+ 					status11 = (int)trustResult;
+ 					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
+ 				}
++			} else {
++				result = BuildX509Chain (certs, chain, ref errors, ref status11);
+ 			}
+ #endif
+ 
+@@ -203,6 +207,8 @@ internal static bool NeedsChain (MonoTlsSettings settings)
+ #if MOBILE
+ 			return false;
+ #else
++			if (!is_macosx)
++				return true;
+ 			if (!CertificateValidationHelper.SupportsX509Chain)
+ 				return false;
+ 			if (settings != null)

Deleted: extra-x86_64/Microsoft.Portable.Common.targets
===================================================================
--- extra-x86_64/Microsoft.Portable.Common.targets	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/Microsoft.Portable.Common.targets	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,4 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<Import Project="..\Microsoft.Portable.Core.props" />
-	<Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>

Copied: mono/repos/extra-x86_64/Microsoft.Portable.Common.targets (from rev 277567, mono/trunk/Microsoft.Portable.Common.targets)
===================================================================
--- extra-x86_64/Microsoft.Portable.Common.targets	                        (rev 0)
+++ extra-x86_64/Microsoft.Portable.Common.targets	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,4 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+	<Import Project="..\Microsoft.Portable.Core.props" />
+	<Import Project="..\Microsoft.Portable.Core.targets" />
+</Project>

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/PKGBUILD	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,60 +0,0 @@
-# $Id$
-# Maintainer: Daniel Isenmann <daniel at archlinux.org>
-# Contributor: Brice Carpentier <brice at dlfp.org>
-
-pkgname=mono
-pkgver=4.4.1.0
-_pkgver=4.4.1
-pkgrel=1
-pkgdesc="Free implementation of the .NET platform including runtime and compiler"
-arch=(i686 x86_64)
-license=('GPL' 'LGPL2.1' 'MPL' 'custom:MITX11')
-url="http://www.mono-project.com/"
-depends=('zlib' 'libgdiplus>=4.2' 'sh' 'python' 'ca-certificates')
-provides=('monodoc')
-conflicts=('monodoc')
-install="${pkgname}.install"
-source=(http://download.mono-project.com/sources/mono/${pkgname}-${pkgver}.tar.bz2
-        mono.binfmt.d
-	mono_context.patch)
-md5sums=('18b7931a20b0dbb7c27322bb6a1ad5e2'
-         'b9ef8a65fea497acf176cca16c1e2402'
-         '9325e50a3fde354229c507801622b64b')
-
-build() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-	
-  # build mono
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --bindir=/usr/bin \
-    --sbindir=/usr/bin \
-    --with-mcs-docs=no 
-  make
-
-  # build jay
-  cd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
-  make
-}
-
-package() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-  make DESTDIR="${pkgdir}" install
-
-  # install jay
-  pushd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
-  make DESTDIR="${pkgdir}" prefix=/usr INSTALL=../../install-sh install
-  popd
-
-  # install binfmt conf file and pathes
-  install -D -m644 "${srcdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf
-
-  #install license
-  mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
-  install -m644 mcs/MIT.X11 "${pkgdir}"/usr/share/licenses/${pkgname}/
-
-  #fix .pc file to be able to request mono on what it depends, fixes #go-oo build
-  sed -i -e "s:#Requires:Requires:" "${pkgdir}"/usr/lib/pkgconfig/mono.pc
-  sed -i -e "s:/2.0/:/4.5/:g" "${pkgdir}"/usr/lib/pkgconfig/mono-nunit.pc
-}

Copied: mono/repos/extra-x86_64/PKGBUILD (from rev 277567, mono/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Daniel Isenmann <daniel at archlinux.org>
+# Contributor: Brice Carpentier <brice at dlfp.org>
+
+pkgname=mono
+pkgver=4.6.1.3
+_pkgver=4.6.1
+pkgrel=1
+pkgdesc="Free implementation of the .NET platform including runtime and compiler"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL2.1' 'MPL')
+url="http://www.mono-project.com/"
+depends=('zlib' 'libgdiplus>=4.2' 'sh' 'python' 'ca-certificates')
+provides=('monodoc')
+conflicts=('monodoc')
+install="${pkgname}.install"
+source=(http://download.mono-project.com/sources/mono/${pkgname}-${pkgver}.tar.bz2
+        mono.binfmt.d
+	mono_context.patch)
+md5sums=('a056b24e75fa2355d6d4c071e6a3ba2c'
+         'b9ef8a65fea497acf176cca16c1e2402'
+         '9325e50a3fde354229c507801622b64b')
+
+build() {
+  cd "${srcdir}"/${pkgname}-${_pkgver}
+	
+  # build mono
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --bindir=/usr/bin \
+    --sbindir=/usr/bin \
+    --with-mcs-docs=no 
+  make
+
+  # build jay
+  cd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
+  make
+}
+
+package() {
+  cd "${srcdir}"/${pkgname}-${_pkgver}
+  make DESTDIR="${pkgdir}" install
+
+  # install jay
+  pushd "${srcdir}"/${pkgname}-${_pkgver}/mcs/jay
+  make DESTDIR="${pkgdir}" prefix=/usr INSTALL=../../install-sh install
+  popd
+
+  # install binfmt conf file and pathes
+  install -D -m644 "${srcdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf
+
+  #fix .pc file to be able to request mono on what it depends, fixes #go-oo build
+  sed -i -e "s:#Requires:Requires:" "${pkgdir}"/usr/lib/pkgconfig/mono.pc
+  sed -i -e "s:/2.0/:/4.5/:g" "${pkgdir}"/usr/lib/pkgconfig/mono-nunit.pc
+}

Deleted: extra-x86_64/bug434892.patch
===================================================================
--- extra-x86_64/bug434892.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/bug434892.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,11 +0,0 @@
---- trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/07/01 20:17:46	107006
-+++ trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/10/28 09:32:46	117243
-@@ -177,7 +177,7 @@
- 				foreach (OperationMessage om in op.Messages) {
- 					Message msg = ctx.Services.GetMessage (om.Message);
- 					foreach (MessagePart part in msg.Parts)
--						parts.Add (part,part);
-+						parts [part] = part; // do not use Add() - there could be the same MessagePart instance.
- 				}
- 			}
- 			

Copied: mono/repos/extra-x86_64/bug434892.patch (from rev 277567, mono/trunk/bug434892.patch)
===================================================================
--- extra-x86_64/bug434892.patch	                        (rev 0)
+++ extra-x86_64/bug434892.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,11 @@
+--- trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/07/01 20:17:46	107006
++++ trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs	2008/10/28 09:32:46	117243
+@@ -177,7 +177,7 @@
+ 				foreach (OperationMessage om in op.Messages) {
+ 					Message msg = ctx.Services.GetMessage (om.Message);
+ 					foreach (MessagePart part in msg.Parts)
+-						parts.Add (part,part);
++						parts [part] = part; // do not use Add() - there could be the same MessagePart instance.
+ 				}
+ 			}
+ 			

Deleted: extra-x86_64/build_fix.patch
===================================================================
--- extra-x86_64/build_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/build_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,25 +0,0 @@
-From c68c72144d7b2a0516276137855d4508a3f59a17 Mon Sep 17 00:00:00 2001
-From: Michael Hutchinson <m.j.hutchinson at gmail.com>
-Date: Tue, 1 Apr 2014 17:21:51 -0400
-Subject: [PATCH] [xbuild] Include PCL common targets in tarball
-
-BXC18690 - Microsoft.Portable.Common.targets is missing in mono 3.4.0 tarball
----
- mcs/tools/xbuild/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
-index c3a5d6a..31d5329 100644
---- a/mcs/tools/xbuild/Makefile
-+++ b/mcs/tools/xbuild/Makefile
-@@ -93,6 +93,7 @@ EXTRA_DISTFILES = \
- 	frameworks/net_4.5.xml \
- 	targets/Microsoft.Portable.CSharp_4.0.targets \
- 	targets/Microsoft.Portable.CSharp_4.5.targets \
-+	targets/Microsoft.Portable.Common.targets \
- 	targets/Microsoft.Portable.Core.targets \
- 	targets/Microsoft.Portable.Core.props \
- 	targets/Microsoft.WebApplication.targets \
--- 
-1.9.3
-

Copied: mono/repos/extra-x86_64/build_fix.patch (from rev 277567, mono/trunk/build_fix.patch)
===================================================================
--- extra-x86_64/build_fix.patch	                        (rev 0)
+++ extra-x86_64/build_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,25 @@
+From c68c72144d7b2a0516276137855d4508a3f59a17 Mon Sep 17 00:00:00 2001
+From: Michael Hutchinson <m.j.hutchinson at gmail.com>
+Date: Tue, 1 Apr 2014 17:21:51 -0400
+Subject: [PATCH] [xbuild] Include PCL common targets in tarball
+
+BXC18690 - Microsoft.Portable.Common.targets is missing in mono 3.4.0 tarball
+---
+ mcs/tools/xbuild/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
+index c3a5d6a..31d5329 100644
+--- a/mcs/tools/xbuild/Makefile
++++ b/mcs/tools/xbuild/Makefile
+@@ -93,6 +93,7 @@ EXTRA_DISTFILES = \
+ 	frameworks/net_4.5.xml \
+ 	targets/Microsoft.Portable.CSharp_4.0.targets \
+ 	targets/Microsoft.Portable.CSharp_4.5.targets \
++	targets/Microsoft.Portable.Common.targets \
+ 	targets/Microsoft.Portable.Core.targets \
+ 	targets/Microsoft.Portable.Core.props \
+ 	targets/Microsoft.WebApplication.targets \
+-- 
+1.9.3
+

Deleted: extra-x86_64/fix-zlib-helper.patch
===================================================================
--- extra-x86_64/fix-zlib-helper.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/fix-zlib-helper.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,26 +0,0 @@
-@@ -, +, @@ 
----
- support/zlib-helper.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
---- a/support/zlib-helper.c	
-+++ a/support/zlib-helper.c	
-@@ -90,6 +90,8 @@ CreateZStream (gint compress, guchar gzip, read_write_func func, void *gchandle)
- 	result->gchandle = gchandle;
- 	result->compress = compress;
- 	result->buffer = g_new (guchar, BUFFER_SIZE);
-+	result->stream->next_out = result->buffer;
-+	result->stream->avail_out = BUFFER_SIZE;
- 	return result;
- }
- 
-@@ -148,7 +150,7 @@ flush_internal (ZStream *stream, gboolean is_final)
- 	if (!stream->compress)
- 		return 0;
- 
--	if (!is_final) {
-+	if (!is_final && stream->stream->avail_in != 0) {
- 		status = deflate (stream->stream, Z_PARTIAL_FLUSH);
- 		if (status != Z_OK && status != Z_STREAM_END)
- 			return status;
--- 
-

Copied: mono/repos/extra-x86_64/fix-zlib-helper.patch (from rev 277567, mono/trunk/fix-zlib-helper.patch)
===================================================================
--- extra-x86_64/fix-zlib-helper.patch	                        (rev 0)
+++ extra-x86_64/fix-zlib-helper.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,26 @@
+@@ -, +, @@ 
+---
+ support/zlib-helper.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+--- a/support/zlib-helper.c	
++++ a/support/zlib-helper.c	
+@@ -90,6 +90,8 @@ CreateZStream (gint compress, guchar gzip, read_write_func func, void *gchandle)
+ 	result->gchandle = gchandle;
+ 	result->compress = compress;
+ 	result->buffer = g_new (guchar, BUFFER_SIZE);
++	result->stream->next_out = result->buffer;
++	result->stream->avail_out = BUFFER_SIZE;
+ 	return result;
+ }
+ 
+@@ -148,7 +150,7 @@ flush_internal (ZStream *stream, gboolean is_final)
+ 	if (!stream->compress)
+ 		return 0;
+ 
+-	if (!is_final) {
++	if (!is_final && stream->stream->avail_in != 0) {
+ 		status = deflate (stream->stream, Z_PARTIAL_FLUSH);
+ 		if (status != Z_OK && status != Z_STREAM_END)
+ 			return status;
+-- 
+

Deleted: extra-x86_64/mono.binfmt.d
===================================================================
--- extra-x86_64/mono.binfmt.d	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/mono.binfmt.d	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1 +0,0 @@
-:CLR:M::MZ::/usr/bin/mono:

Copied: mono/repos/extra-x86_64/mono.binfmt.d (from rev 277567, mono/trunk/mono.binfmt.d)
===================================================================
--- extra-x86_64/mono.binfmt.d	                        (rev 0)
+++ extra-x86_64/mono.binfmt.d	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1 @@
+:CLR:M::MZ::/usr/bin/mono:

Deleted: extra-x86_64/mono.install
===================================================================
--- extra-x86_64/mono.install	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/mono.install	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,7 +0,0 @@
-post_install() {
-    post_upgrade
-}
-
-post_upgrade() {
-    cert-sync /etc/ssl/certs/ca-certificates.crt
-}

Copied: mono/repos/extra-x86_64/mono.install (from rev 277567, mono/trunk/mono.install)
===================================================================
--- extra-x86_64/mono.install	                        (rev 0)
+++ extra-x86_64/mono.install	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,7 @@
+post_install() {
+    post_upgrade
+}
+
+post_upgrade() {
+    cert-sync /etc/ssl/certs/ca-certificates.crt
+}

Deleted: extra-x86_64/mono_context.patch
===================================================================
--- extra-x86_64/mono_context.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/mono_context.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,54 +0,0 @@
-From 23e34d77f2fd23ab5d61f6ba4aa905817f57668a Mon Sep 17 00:00:00 2001
-From: Rodrigo Kumpera <kumpera at gmail.com>
-Date: Tue, 22 Sep 2015 15:37:07 -0400
-Subject: [PATCH] [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
-
-Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.
-
-This caused crashes on linux when unified suspend was enabled.
----
- mono/utils/mono-context.h | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
-index a2a0b7e..dc53e85 100644
---- a/mono/utils/mono-context.h
-+++ b/mono/utils/mono-context.h
-@@ -183,11 +183,11 @@ extern void mono_context_get_current (void *);
- #define MONO_CONTEXT_GET_CURRENT(ctx)	\
- 	__asm__ __volatile__(	\
- 		"movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"	\
--		"movq %%rbx, %%nacl:0x08(%%r15, %0, 1)\n"	\
--		"movq %%rcx, %%nacl:0x10(%%r15, %0, 1)\n"	\
--		"movq %%rdx, %%nacl:0x18(%%r15, %0, 1)\n"	\
--		"movq %%rbp, %%nacl:0x20(%%r15, %0, 1)\n"	\
--		"movq %%rsp, %%nacl:0x28(%%r15, %0, 1)\n"	\
-+		"movq %%rcx, %%nacl:0x08(%%r15, %0, 1)\n"	\
-+		"movq %%rdx, %%nacl:0x10(%%r15, %0, 1)\n"	\
-+		"movq %%rbx, %%nacl:0x18(%%r15, %0, 1)\n"	\
-+		"movq %%rsp, %%nacl:0x20(%%r15, %0, 1)\n"	\
-+		"movq %%rbp, %%nacl:0x28(%%r15, %0, 1)\n"	\
- 		"movq %%rsi, %%nacl:0x30(%%r15, %0, 1)\n"	\
- 		"movq %%rdi, %%nacl:0x38(%%r15, %0, 1)\n"	\
- 		"movq %%r8,  %%nacl:0x40(%%r15, %0, 1)\n"	\
-@@ -204,14 +204,15 @@ extern void mono_context_get_current (void *);
- 		: "a" ((int64_t)&(ctx))	\
- 		: "rdx", "memory")
- #else
-+
- #define MONO_CONTEXT_GET_CURRENT(ctx)	\
- 	__asm__ __volatile__(	\
- 		"movq $0x0,  0x00(%0)\n"	\
--		"movq %%rbx, 0x08(%0)\n"	\
--		"movq %%rcx, 0x10(%0)\n"	\
--		"movq %%rdx, 0x18(%0)\n"	\
--		"movq %%rbp, 0x20(%0)\n"	\
--		"movq %%rsp, 0x28(%0)\n"	\
-+		"movq %%rcx, 0x08(%0)\n"	\
-+		"movq %%rdx, 0x10(%0)\n"	\
-+		"movq %%rbx, 0x18(%0)\n"	\
-+		"movq %%rsp, 0x20(%0)\n"	\
-+		"movq %%rbp, 0x28(%0)\n"	\
- 		"movq %%rsi, 0x30(%0)\n"	\
- 		"movq %%rdi, 0x38(%0)\n"	\
- 		"movq %%r8,  0x40(%0)\n"	\

Copied: mono/repos/extra-x86_64/mono_context.patch (from rev 277567, mono/trunk/mono_context.patch)
===================================================================
--- extra-x86_64/mono_context.patch	                        (rev 0)
+++ extra-x86_64/mono_context.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,54 @@
+From 23e34d77f2fd23ab5d61f6ba4aa905817f57668a Mon Sep 17 00:00:00 2001
+From: Rodrigo Kumpera <kumpera at gmail.com>
+Date: Tue, 22 Sep 2015 15:37:07 -0400
+Subject: [PATCH] [utils] Fix amd64 version of MONO_CONTEXT_GET_CURRENT.
+
+Registers must be saved in MonoContext in the same order as mono_sigctx_to_monoctx.
+
+This caused crashes on linux when unified suspend was enabled.
+---
+ mono/utils/mono-context.h | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
+index a2a0b7e..dc53e85 100644
+--- a/mono/utils/mono-context.h
++++ b/mono/utils/mono-context.h
+@@ -183,11 +183,11 @@ extern void mono_context_get_current (void *);
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"	\
+-		"movq %%rbx, %%nacl:0x08(%%r15, %0, 1)\n"	\
+-		"movq %%rcx, %%nacl:0x10(%%r15, %0, 1)\n"	\
+-		"movq %%rdx, %%nacl:0x18(%%r15, %0, 1)\n"	\
+-		"movq %%rbp, %%nacl:0x20(%%r15, %0, 1)\n"	\
+-		"movq %%rsp, %%nacl:0x28(%%r15, %0, 1)\n"	\
++		"movq %%rcx, %%nacl:0x08(%%r15, %0, 1)\n"	\
++		"movq %%rdx, %%nacl:0x10(%%r15, %0, 1)\n"	\
++		"movq %%rbx, %%nacl:0x18(%%r15, %0, 1)\n"	\
++		"movq %%rsp, %%nacl:0x20(%%r15, %0, 1)\n"	\
++		"movq %%rbp, %%nacl:0x28(%%r15, %0, 1)\n"	\
+ 		"movq %%rsi, %%nacl:0x30(%%r15, %0, 1)\n"	\
+ 		"movq %%rdi, %%nacl:0x38(%%r15, %0, 1)\n"	\
+ 		"movq %%r8,  %%nacl:0x40(%%r15, %0, 1)\n"	\
+@@ -204,14 +204,15 @@ extern void mono_context_get_current (void *);
+ 		: "a" ((int64_t)&(ctx))	\
+ 		: "rdx", "memory")
+ #else
++
+ #define MONO_CONTEXT_GET_CURRENT(ctx)	\
+ 	__asm__ __volatile__(	\
+ 		"movq $0x0,  0x00(%0)\n"	\
+-		"movq %%rbx, 0x08(%0)\n"	\
+-		"movq %%rcx, 0x10(%0)\n"	\
+-		"movq %%rdx, 0x18(%0)\n"	\
+-		"movq %%rbp, 0x20(%0)\n"	\
+-		"movq %%rsp, 0x28(%0)\n"	\
++		"movq %%rcx, 0x08(%0)\n"	\
++		"movq %%rdx, 0x10(%0)\n"	\
++		"movq %%rbx, 0x18(%0)\n"	\
++		"movq %%rsp, 0x20(%0)\n"	\
++		"movq %%rbp, 0x28(%0)\n"	\
+ 		"movq %%rsi, 0x30(%0)\n"	\
+ 		"movq %%rdi, 0x38(%0)\n"	\
+ 		"movq %%r8,  0x40(%0)\n"	\

Deleted: extra-x86_64/sgen_fix.patch
===================================================================
--- extra-x86_64/sgen_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/sgen_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,112 +0,0 @@
-From d2cc22580898df5d4a15e0f99ab513e1570a6082 Mon Sep 17 00:00:00 2001
-From: Zoltan Varga <vargaz at gmail.com>
-Date: Fri, 20 Sep 2013 19:06:34 +0200
-Subject: [PATCH] [sgen] Use __builtin_ctzl () in OBJ_BITMAP_FOREACH_PTR () on
- 64 bit platforms. Fixes #14834.
-
----
- mono/metadata/sgen-descriptor.h | 28 +++++++++++++++++++++++++---
- mono/tests/sgen-descriptors.cs  | 15 +++++++++++++--
- 2 files changed, 38 insertions(+), 5 deletions(-)
-
-diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h
-index cd53a86..3a00589 100644
---- a/mono/metadata/sgen-descriptor.h
-+++ b/mono/metadata/sgen-descriptor.h
-@@ -170,21 +170,43 @@ enum {
- 		}	\
- 	} while (0)
- 
--#ifdef __GNUC__
-+#if defined(__GNUC__) && SIZEOF_VOID_P==4
-+#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
-+		/* there are pointers */        \
-+		void **_objptr = (void**)(obj); \
-+		gsize _bmap = (desc) >> 16;     \
-+		_objptr += OBJECT_HEADER_WORDS; \
-+		{ \
-+			int _index = __builtin_ctz (_bmap);		\
-+			_objptr += _index; \
-+			_bmap >>= (_index + 1);				\
-+			HANDLE_PTR (_objptr, (obj));		\
-+			_objptr ++;							\
-+			} \
-+		while (_bmap) { \
-+			int _index = __builtin_ctz (_bmap);		\
-+			_objptr += _index; \
-+			_bmap >>= (_index + 1);				\
-+			HANDLE_PTR (_objptr, (obj));		\
-+			_objptr ++;							\
-+		}										\
-+	} while (0)
-+#elif defined(__GNUC__) && SIZEOF_VOID_P==8
-+/* Same as above, but use _builtin_ctzl () */
- #define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
- 		/* there are pointers */        \
- 		void **_objptr = (void**)(obj); \
- 		gsize _bmap = (desc) >> 16;     \
- 		_objptr += OBJECT_HEADER_WORDS; \
- 		{ \
--			int _index = __builtin_ctz (_bmap); \
-+			int _index = __builtin_ctzl (_bmap);		\
- 			_objptr += _index; \
- 			_bmap >>= (_index + 1);				\
- 			HANDLE_PTR (_objptr, (obj));		\
- 			_objptr ++;							\
- 			} \
- 		while (_bmap) { \
--			int _index = __builtin_ctz (_bmap); \
-+			int _index = __builtin_ctzl (_bmap);		\
- 			_objptr += _index; \
- 			_bmap >>= (_index + 1);				\
- 			HANDLE_PTR (_objptr, (obj));		\
-diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs
-index ae00084..246e5aa 100644
---- a/mono/tests/sgen-descriptors.cs
-+++ b/mono/tests/sgen-descriptors.cs
-@@ -1,4 +1,5 @@
- using System;
-+using System.Runtime.InteropServices;
- 
- public struct SmallMixed
- {
-@@ -47,6 +48,13 @@ public class HugePtrFree {
- 	public LargeStruct2 c;
- }
- 
-+[StructLayout (LayoutKind.Sequential)]
-+public class Non32bitBitmap {
-+	public object o;
-+	public long i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35;
-+	public object o2;
-+}
-+
- /*
- This is a stress test for descriptors.
- */
-@@ -54,10 +62,10 @@ class Driver {
- 	static char[] FOO = new char[] { 'f', 'o', 'b' };
- 
- 	static void Fill (int cycles) {
--		object[] root = new object [12];
-+		object[] root = new object [13];
- 		object[] current = root;
- 		for (int i = 0; i < cycles; ++i) {
--			current [0] = new object [12];
-+			current [0] = new object [13];
- 			current [1] = new int [6];
- 			current [2] = new int [2,3];
- 			current [3] = new string (FOO);
-@@ -72,6 +80,9 @@ class Driver {
- 				current [10] = new HugePtrFree ();
- 			if ((i %  10000) == 0)
- 				current [11] = new LargeStruct2 [1];
-+
-+			/* Test for 64 bit bitmap descriptors (#14834) */
-+			current [12] = new Non32bitBitmap () { o = new object (), i32 = 1, i33 = 1, i34 = 1, i35 = 1, o2 = new object () };
- 	
- 			current = (object[])current [0];
- 		}
--- 
-1.8.4
-

Copied: mono/repos/extra-x86_64/sgen_fix.patch (from rev 277567, mono/trunk/sgen_fix.patch)
===================================================================
--- extra-x86_64/sgen_fix.patch	                        (rev 0)
+++ extra-x86_64/sgen_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,112 @@
+From d2cc22580898df5d4a15e0f99ab513e1570a6082 Mon Sep 17 00:00:00 2001
+From: Zoltan Varga <vargaz at gmail.com>
+Date: Fri, 20 Sep 2013 19:06:34 +0200
+Subject: [PATCH] [sgen] Use __builtin_ctzl () in OBJ_BITMAP_FOREACH_PTR () on
+ 64 bit platforms. Fixes #14834.
+
+---
+ mono/metadata/sgen-descriptor.h | 28 +++++++++++++++++++++++++---
+ mono/tests/sgen-descriptors.cs  | 15 +++++++++++++--
+ 2 files changed, 38 insertions(+), 5 deletions(-)
+
+diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h
+index cd53a86..3a00589 100644
+--- a/mono/metadata/sgen-descriptor.h
++++ b/mono/metadata/sgen-descriptor.h
+@@ -170,21 +170,43 @@ enum {
+ 		}	\
+ 	} while (0)
+ 
+-#ifdef __GNUC__
++#if defined(__GNUC__) && SIZEOF_VOID_P==4
++#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
++		/* there are pointers */        \
++		void **_objptr = (void**)(obj); \
++		gsize _bmap = (desc) >> 16;     \
++		_objptr += OBJECT_HEADER_WORDS; \
++		{ \
++			int _index = __builtin_ctz (_bmap);		\
++			_objptr += _index; \
++			_bmap >>= (_index + 1);				\
++			HANDLE_PTR (_objptr, (obj));		\
++			_objptr ++;							\
++			} \
++		while (_bmap) { \
++			int _index = __builtin_ctz (_bmap);		\
++			_objptr += _index; \
++			_bmap >>= (_index + 1);				\
++			HANDLE_PTR (_objptr, (obj));		\
++			_objptr ++;							\
++		}										\
++	} while (0)
++#elif defined(__GNUC__) && SIZEOF_VOID_P==8
++/* Same as above, but use _builtin_ctzl () */
+ #define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
+ 		/* there are pointers */        \
+ 		void **_objptr = (void**)(obj); \
+ 		gsize _bmap = (desc) >> 16;     \
+ 		_objptr += OBJECT_HEADER_WORDS; \
+ 		{ \
+-			int _index = __builtin_ctz (_bmap); \
++			int _index = __builtin_ctzl (_bmap);		\
+ 			_objptr += _index; \
+ 			_bmap >>= (_index + 1);				\
+ 			HANDLE_PTR (_objptr, (obj));		\
+ 			_objptr ++;							\
+ 			} \
+ 		while (_bmap) { \
+-			int _index = __builtin_ctz (_bmap); \
++			int _index = __builtin_ctzl (_bmap);		\
+ 			_objptr += _index; \
+ 			_bmap >>= (_index + 1);				\
+ 			HANDLE_PTR (_objptr, (obj));		\
+diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs
+index ae00084..246e5aa 100644
+--- a/mono/tests/sgen-descriptors.cs
++++ b/mono/tests/sgen-descriptors.cs
+@@ -1,4 +1,5 @@
+ using System;
++using System.Runtime.InteropServices;
+ 
+ public struct SmallMixed
+ {
+@@ -47,6 +48,13 @@ public class HugePtrFree {
+ 	public LargeStruct2 c;
+ }
+ 
++[StructLayout (LayoutKind.Sequential)]
++public class Non32bitBitmap {
++	public object o;
++	public long i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35;
++	public object o2;
++}
++
+ /*
+ This is a stress test for descriptors.
+ */
+@@ -54,10 +62,10 @@ class Driver {
+ 	static char[] FOO = new char[] { 'f', 'o', 'b' };
+ 
+ 	static void Fill (int cycles) {
+-		object[] root = new object [12];
++		object[] root = new object [13];
+ 		object[] current = root;
+ 		for (int i = 0; i < cycles; ++i) {
+-			current [0] = new object [12];
++			current [0] = new object [13];
+ 			current [1] = new int [6];
+ 			current [2] = new int [2,3];
+ 			current [3] = new string (FOO);
+@@ -72,6 +80,9 @@ class Driver {
+ 				current [10] = new HugePtrFree ();
+ 			if ((i %  10000) == 0)
+ 				current [11] = new LargeStruct2 [1];
++
++			/* Test for 64 bit bitmap descriptors (#14834) */
++			current [12] = new Non32bitBitmap () { o = new object (), i32 = 1, i33 = 1, i34 = 1, i35 = 1, o2 = new object () };
+ 	
+ 			current = (object[])current [0];
+ 		}
+-- 
+1.8.4
+

Deleted: extra-x86_64/tls_fix.patch
===================================================================
--- extra-x86_64/tls_fix.patch	2016-10-03 08:39:12 UTC (rev 277567)
+++ extra-x86_64/tls_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -1,91 +0,0 @@
-From 04eb667e1bc4282a22f291b39099b23611793851 Mon Sep 17 00:00:00 2001
-From: Martin Baulig <martin.baulig at xamarin.com>
-Date: Tue, 15 Mar 2016 18:50:08 -0400
-Subject: [PATCH] [System]: Fix certificate validation on Linux.  Bug #39307.
-
-(cherry picked from commit 37b2b9fbc25a2199aba1d794117924d4828360a7)
----
- .../System/Mono.Net.Security/ChainValidationHelper.cs    |  3 ---
- .../Mono.Net.Security/SystemCertificateValidator.cs      | 16 +++++++++++-----
- 2 files changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-index 70c6996..63a781d 100644
---- a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-+++ b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
-@@ -292,9 +292,6 @@ ValidationResult ValidateChain (string host, bool server, XX509CertificateCollec
- 			if (wantsChain)
- 				chain = SystemCertificateValidator.CreateX509Chain (certs);
- 
--			if (wantsChain || SystemCertificateValidator.NeedsChain (settings))
--				SystemCertificateValidator.BuildX509Chain (certs, chain, ref errors, ref status11);
--
- 			bool providerValidated = false;
- 			if (provider != null && provider.HasCustomSystemCertificateValidator) {
- 				var xerrors = (MonoSslPolicyErrors)errors;
-diff --git a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-index f0a0be3..dd67b66 100644
---- a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-+++ b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
-@@ -86,13 +86,13 @@ public static X509Chain CreateX509Chain (XX509CertificateCollection certs)
- 			return chain;
- 		}
- 
--		public static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
-+		static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
- 		{
- #if MOBILE
--			return true;
-+			return false;
- #else
- 			if (is_macosx)
--				return true;
-+				return false;
- 
- 			var leaf = (X509Certificate2)certs [0];
- 
-@@ -130,7 +130,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
- 					return false;
- 				}
- 
--				if (host != null && !CheckServerIdentity (leaf, host)) {
-+				if (!string.IsNullOrEmpty (host) && !CheckServerIdentity (leaf, host)) {
- 					errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
- 					status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
- 					return false;
-@@ -143,7 +143,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
- 		static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCollection anchors, string host, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
- 		{
- 			var leaf = certs [0];
--			var result = false;
-+			bool result;
- 
- #if MONODROID
- 			result = AndroidPlatform.TrustEvaluateSsl (certs);
-@@ -166,6 +166,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
- 					result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
- 						trustResult == OSX509Certificates.SecTrustResult.Unspecified);
- 				} catch {
-+					result = false;
-+					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
- 					// Ignore
- 				}
- 
-@@ -178,6 +180,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
- 					status11 = (int)trustResult;
- 					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
- 				}
-+			} else {
-+				result = BuildX509Chain (certs, chain, ref errors, ref status11);
- 			}
- #endif
- 
-@@ -203,6 +207,8 @@ internal static bool NeedsChain (MonoTlsSettings settings)
- #if MOBILE
- 			return false;
- #else
-+			if (!is_macosx)
-+				return true;
- 			if (!CertificateValidationHelper.SupportsX509Chain)
- 				return false;
- 			if (settings != null)

Copied: mono/repos/extra-x86_64/tls_fix.patch (from rev 277567, mono/trunk/tls_fix.patch)
===================================================================
--- extra-x86_64/tls_fix.patch	                        (rev 0)
+++ extra-x86_64/tls_fix.patch	2016-10-03 08:39:20 UTC (rev 277568)
@@ -0,0 +1,91 @@
+From 04eb667e1bc4282a22f291b39099b23611793851 Mon Sep 17 00:00:00 2001
+From: Martin Baulig <martin.baulig at xamarin.com>
+Date: Tue, 15 Mar 2016 18:50:08 -0400
+Subject: [PATCH] [System]: Fix certificate validation on Linux.  Bug #39307.
+
+(cherry picked from commit 37b2b9fbc25a2199aba1d794117924d4828360a7)
+---
+ .../System/Mono.Net.Security/ChainValidationHelper.cs    |  3 ---
+ .../Mono.Net.Security/SystemCertificateValidator.cs      | 16 +++++++++++-----
+ 2 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
+index 70c6996..63a781d 100644
+--- a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
++++ b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
+@@ -292,9 +292,6 @@ ValidationResult ValidateChain (string host, bool server, XX509CertificateCollec
+ 			if (wantsChain)
+ 				chain = SystemCertificateValidator.CreateX509Chain (certs);
+ 
+-			if (wantsChain || SystemCertificateValidator.NeedsChain (settings))
+-				SystemCertificateValidator.BuildX509Chain (certs, chain, ref errors, ref status11);
+-
+ 			bool providerValidated = false;
+ 			if (provider != null && provider.HasCustomSystemCertificateValidator) {
+ 				var xerrors = (MonoSslPolicyErrors)errors;
+diff --git a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
+index f0a0be3..dd67b66 100644
+--- a/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
++++ b/mcs/class/System/Mono.Net.Security/SystemCertificateValidator.cs
+@@ -86,13 +86,13 @@ public static X509Chain CreateX509Chain (XX509CertificateCollection certs)
+ 			return chain;
+ 		}
+ 
+-		public static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
++		static bool BuildX509Chain (XX509CertificateCollection certs, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
+ 		{
+ #if MOBILE
+-			return true;
++			return false;
+ #else
+ 			if (is_macosx)
+-				return true;
++				return false;
+ 
+ 			var leaf = (X509Certificate2)certs [0];
+ 
+@@ -130,7 +130,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
+ 					return false;
+ 				}
+ 
+-				if (host != null && !CheckServerIdentity (leaf, host)) {
++				if (!string.IsNullOrEmpty (host) && !CheckServerIdentity (leaf, host)) {
+ 					errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
+ 					status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
+ 					return false;
+@@ -143,7 +143,7 @@ static bool CheckUsage (XX509CertificateCollection certs, string host, ref SslPo
+ 		static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCollection anchors, string host, X509Chain chain, ref SslPolicyErrors errors, ref int status11)
+ 		{
+ 			var leaf = certs [0];
+-			var result = false;
++			bool result;
+ 
+ #if MONODROID
+ 			result = AndroidPlatform.TrustEvaluateSsl (certs);
+@@ -166,6 +166,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
+ 					result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
+ 						trustResult == OSX509Certificates.SecTrustResult.Unspecified);
+ 				} catch {
++					result = false;
++					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
+ 					// Ignore
+ 				}
+ 
+@@ -178,6 +180,8 @@ static bool EvaluateSystem (XX509CertificateCollection certs, XX509CertificateCo
+ 					status11 = (int)trustResult;
+ 					errors |= SslPolicyErrors.RemoteCertificateChainErrors;
+ 				}
++			} else {
++				result = BuildX509Chain (certs, chain, ref errors, ref status11);
+ 			}
+ #endif
+ 
+@@ -203,6 +207,8 @@ internal static bool NeedsChain (MonoTlsSettings settings)
+ #if MOBILE
+ 			return false;
+ #else
++			if (!is_macosx)
++				return true;
+ 			if (!CertificateValidationHelper.SupportsX509Chain)
+ 				return false;
+ 			if (settings != null)



More information about the arch-commits mailing list