From bf0f2420ff5e3c7ae479d40197c72a928bf2de4d Mon Sep 17 00:00:00 2001 From: xdave Date: Mon, 28 Oct 2013 14:35:52 -0600 Subject: [PATCH] mono: update to 3.2.3. --- common/shlibs | 1 + srcpkgs/mono/patches/sgen_fix__arch.patch | 112 ++++++++++++++++++++++ srcpkgs/mono/template | 16 +++- 3 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/mono/patches/sgen_fix__arch.patch diff --git a/common/shlibs b/common/shlibs index a9625fb2c1..9501ca143a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1417,3 +1417,4 @@ libgldi.so.3 libgldi-3.3.1_1 libevdev.so.1 libevdev-0.4_1 libmutter-wayland.so.0 mutter-wayland-3.10.1_1 libgdiplus.so.0 libgdiplus-2.10.9_1 +libmonosgen-2.0.so.1 mono-3.2.3_1 diff --git a/srcpkgs/mono/patches/sgen_fix__arch.patch b/srcpkgs/mono/patches/sgen_fix__arch.patch new file mode 100644 index 0000000000..40cb9fba7f --- /dev/null +++ b/srcpkgs/mono/patches/sgen_fix__arch.patch @@ -0,0 +1,112 @@ +From d2cc22580898df5d4a15e0f99ab513e1570a6082 Mon Sep 17 00:00:00 2001 +From: Zoltan Varga +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 + diff --git a/srcpkgs/mono/template b/srcpkgs/mono/template index 3c83196e45..8eb7ec3674 100644 --- a/srcpkgs/mono/template +++ b/srcpkgs/mono/template @@ -1,12 +1,22 @@ # Template file for 'mono' pkgname=mono -version=3.0.7 +version=3.2.3 revision=1 build_style=gnu-configure -makedepends="zlib libtool perl" +hostmakedepends="libtool perl" +makedepends="zlib-devel libX11-devel libgdiplus-devel" +patch_args="-Np1" short_desc="Free implementation of the .NET platform including runtime and compiler" maintainer="pancake " homepage="http://www.go-mono.org" license="GPL-2, LGPL-2, MPL, MITX11" distfiles="http://download.mono-project.com/sources/mono/$pkgname-$version.tar.bz2" -checksum=89357e58a1b5cb6ff3116d4ce8227dee61b1c0cb494fa2844da5b1fc55fb890b +checksum=b8c2f97d6a5232dbf5a8180e5c38d4722b81af748893649d7d9e82c5cf8ef41a + +# XXX: figure out how to split this up into subpkgs. +mono_package() { + depends="libgdiplus>=0" + pkg_install() { + vmove all + } +}