From 79ae75a2b38bd23fa339eb46777429d4ecd5c71a Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 25 Jan 2016 17:17:15 +0100 Subject: [PATCH] backport fix from upstream, fix build problem with gcc 4.4.7 on s390x --- mono-4.2.1-s390.patch | 33 +++++++++++++++++++++------------ mono.spec | 5 ++++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/mono-4.2.1-s390.patch b/mono-4.2.1-s390.patch index 6172cda..a6c0eac 100644 --- a/mono-4.2.1-s390.patch +++ b/mono-4.2.1-s390.patch @@ -1,17 +1,26 @@ -diff -up mono-4.2.2/mono/metadata/icall.c.than mono-4.2.2/mono/metadata/icall.c ---- mono-4.2.2/mono/metadata/icall.c.than 2016-01-22 07:19:14.752781004 -0500 -+++ mono-4.2.2/mono/metadata/icall.c 2016-01-22 07:20:47.642781004 -0500 -@@ -825,10 +825,10 @@ ves_icall_System_Runtime_CompilerService - #define SWAP(n) {\ - guint ## n *data = (guint ## n *) mono_array_addr (array, char, 0); \ - guint ## n *src = (guint ## n *) field_data; \ +diff -up mono-4.2.1/mono/metadata/icall.c.than mono-4.2.1/mono/metadata/icall.c +--- mono-4.2.1/mono/metadata/icall.c.than 2015-11-12 10:00:29.000000000 +0100 ++++ mono-4.2.1/mono/metadata/icall.c 2016-01-25 16:36:24.479028169 +0100 +@@ -822,14 +822,14 @@ ves_icall_System_Runtime_CompilerService + } + + #if G_BYTE_ORDER != G_LITTLE_ENDIAN +-#define SWAP(n) {\ +- guint ## n *data = (guint ## n *) mono_array_addr (array, char, 0); \ +- guint ## n *src = (guint ## n *) field_data; \ - guint ## n *end = (guint ## n *)((char*)src + size); \ -+ int i; \ - \ +-\ - for (; src < end; data++, src++) { \ - *data = read ## n (src); \ -+ for (i = 0; i < (size / sizeof(guint ## n)); i++) { \ -+ data[i] = read ## n (&src[i]); \ - } \ +- } \ ++#define SWAP(n) { \ ++ guint ## n *data = (guint ## n *) mono_array_addr (array, char, 0); \ ++ guint ## n *src = (guint ## n *) field_data; \ ++ int i, nEnt = (size / sizeof(guint ## n)); \ ++ \ ++ for (i = 0; i < nEnt; i++) { \ ++ data[i] = read ## n (&src[i]); \ ++ } \ } + /* printf ("Initialize array with elements of %s type\n", klass->element_class->name); */ diff --git a/mono.spec b/mono.spec index 05f1e3f..3f20cb5 100644 --- a/mono.spec +++ b/mono.spec @@ -17,7 +17,7 @@ Name: mono Version: 4.2.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Cross-platform, Open Source, .NET development framework Group: Development/Languages @@ -747,6 +747,9 @@ mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_bindir} %{_libdir}/pkgconfig/monodoc.pc %changelog +* Mon Jan 25 2016 Than Ngo - 4.2.1-9 +- backport fix from upstream, fix build problem with gcc 4.4.7 on s390x + * Fri Jan 22 2016 Than Ngo - 4.2.1-8 - fix build failure on s390, thanks to