upgrade to Mono 5.20.1.34, with a bootstrap build

This commit is contained in:
Timotheus Pokorra 2019-08-06 22:27:36 +02:00
parent fba27de001
commit 44f3dc59ca
5 changed files with 18 additions and 194 deletions

View File

@ -1,41 +0,0 @@
From 0bf46dbe2cf0a215ca6e64793b7c434433f50722 Mon Sep 17 00:00:00 2001
From: Marek Safar <marek.safar@gmail.com>
Date: Wed, 31 Oct 2018 10:25:58 +0100
Subject: [PATCH] Fixes __MonoCS__ handling of value types
---
.../src/System/Collections/Generic/LargeArrayBuilder.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs b/external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs
index c0f441909dcf..8ec603ace72e 100644
--- a/external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs
+++ b/external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs
@@ -263,7 +263,7 @@ public CopyPosition CopyTo(CopyPosition position, T[] array, int arrayIndex, int
T[] buffer = GetBuffer(row);
int copied =
#if __MonoCS__
- CopyToCore(buffer, column, array, arrayIndex, count);
+ CopyToCore(buffer, column, array, ref arrayIndex, ref count);
#else
CopyToCore(buffer, column);
#endif
@@ -278,7 +278,7 @@ public CopyPosition CopyTo(CopyPosition position, T[] array, int arrayIndex, int
buffer = GetBuffer(++row);
copied =
#if __MonoCS__
- CopyToCore(buffer, 0, array, arrayIndex, count);
+ CopyToCore(buffer, 0, array, ref arrayIndex, ref count);
#else
CopyToCore(buffer, 0);
#endif
@@ -289,7 +289,7 @@ public CopyPosition CopyTo(CopyPosition position, T[] array, int arrayIndex, int
#if __MonoCS__
}
- static int CopyToCore(T[] sourceBuffer, int sourceIndex, T[] array, int arrayIndex, int count)
+ static int CopyToCore(T[] sourceBuffer, int sourceIndex, T[] array, ref int arrayIndex, ref int count)
#else
int CopyToCore(T[] sourceBuffer, int sourceIndex)
#endif

View File

@ -1,124 +0,0 @@
From 6d07dd66f1412b8f7eaadbcd9d660859d4227954 Mon Sep 17 00:00:00 2001
From: Neale Ferguson <neale@sinenomine.net>
Date: Sat, 11 Aug 2018 19:33:58 -0400
Subject: [PATCH] =?UTF-8?q?Fix=20s390x=20build=20broken=20by=20incorrect?=
=?UTF-8?q?=20specification=20of=20the=20msgfi=20instuc=E2=80=A6=20(#10026?=
=?UTF-8?q?)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix s390x build broken by incorrect specification of the msgfi instruction used in MUL_IMM type operations. The instruction had been encoded as its 32-bit counterpart (msfi).
In addition, the s390x microcode makes the mono_strength_reduction_division unnecessary so this can be bypassed.
The change to basic.make is just to avoid error messages when basic-profile-check.exe hasn't been built yet.
---
mcs/build/profiles/basic.make | 2 +-
mono/arch/s390x/s390x-codegen.h | 4 ++--
mono/mini/local-propagation.c | 9 +++------
mono/mini/mini-s390x.h | 1 +
mono/mini/mini.c | 3 +++
mono/mini/mini.h | 1 +
6 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make
index eb2264efd457..7dd7770fc512 100644
--- a/mcs/build/profiles/basic.make
+++ b/mcs/build/profiles/basic.make
@@ -122,7 +122,7 @@ $(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs $(GENSOURCES_CS)
$(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)
diff --git a/mono/arch/s390x/s390x-codegen.h b/mono/arch/s390x/s390x-codegen.h
index 49fc120f7d49..12fdd2894eaa 100644
--- a/mono/arch/s390x/s390x-codegen.h
+++ b/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)
diff --git a/mono/mini/local-propagation.c b/mono/mini/local-propagation.c
index 4b5e02ff28f0..d8e8461291aa 100644
--- a/mono/mini/local-propagation.c
+++ b/mono/mini/local-propagation.c
@@ -370,7 +370,7 @@ mono_strength_reduction_ins (MonoCompile *cfg, MonoInst *ins, const char **spec)
}
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 *cfg, MonoInst *ins, const char **spec)
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 *cfg, MonoInst *ins, const char **spec)
allocated_vregs = TRUE;
}
-#endif
break;
}
#if SIZEOF_REGISTER == 4
diff --git a/mono/mini/mini-s390x.h b/mono/mini/mini-s390x.h
index 464ddb117894..9323182c0cc7 100644
--- a/mono/mini/mini-s390x.h
+++ b/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
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 9fdf34bd2a98..fa7608daebfe 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -3045,6 +3045,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
}
/*
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index 780208ed8a57..fb217b3194b7 100644
--- a/mono/mini/mini.h
+++ b/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;

View File

@ -1,11 +0,0 @@
--- a/mono/utils/mono-context.h 2019-03-22 04:57:54.560641101 +0000
+++ b/mono/utils/mono-context.h 2019-03-22 04:58:27.765211676 +0000
@@ -865,7 +865,7 @@
#define MONO_ARCH_HAS_MONO_CONTEXT 1
-typedef struct ucontext MonoContext;
+typedef ucontext_t MonoContext;
#define MONO_CONTEXT_SET_IP(ctx,ip) \
do { \

View File

@ -2,7 +2,7 @@
# workaround https://github.com/mono/mono/issues/9009#issuecomment-477073609
%undefine _hardened_build
%endif
%global bootstrap 0
%global bootstrap 1
%if 0%{?el6}
# see https://fedorahosted.org/fpc/ticket/395, it was added to el7
%global mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64 ppc64le
@ -20,10 +20,10 @@
%undefine _missing_build_ids_terminate_build
%endif
%global xamarinrelease 28
%global xamarinrelease 34
Name: mono
Version: 5.18.1
Release: 10%{?dist}
Version: 5.20.1
Release: 0%{?dist}
Summary: Cross-platform, Open Source, .NET development framework
License: MIT
@ -44,15 +44,12 @@ Patch1: mono-4.2.1-ppc.patch
Patch2: mono-5.10.0-find-provides.patch
Patch3: mono-4.2-fix-winforms-trayicon.patch
Patch4: mono-4.6.1-aarch64.patch
Patch5: mono-5.18.1-s390x-ucontext.patch
Patch6: mono-5.18.0-roslyn-binaries.patch
Patch7: mono-5.18.0-use-mcs.patch
Patch8: mono-5.18.0-use-v471.patch
Patch9: mono-5.18.0-reference-assemblies-fix.patch
Patch10: mono-5.18.0-sharpziplib-parent-path-traversal.patch
Patch11: mono-5.18.1-python3.patch
Patch12: mono-5.18.1-s390x-build.patch
Patch13: mono-5.18.0-largearraybuilder.patch
Patch5: mono-5.18.0-roslyn-binaries.patch
Patch6: mono-5.18.0-use-mcs.patch
Patch7: mono-5.18.0-use-v471.patch
Patch8: mono-5.18.0-reference-assemblies-fix.patch
Patch9: mono-5.18.0-sharpziplib-parent-path-traversal.patch
Patch10: mono-5.18.1-python3.patch
BuildRequires: bison
BuildRequires: python%{python3_pkgversion}
@ -341,9 +338,6 @@ not install anything from outside the mono source (XSP, mono-basic, etc.).
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
# Remove hardcoded lib directory for libMonoPosixHelper.so from the config
sed -i 's|$mono_libdir/||g' data/config.in
@ -453,6 +447,9 @@ rm -rf %{buildroot}/usr/lib/mono/msbuild
# we have btls debug files
rm -rf %{buildroot}/usr/lib/debug/usr/lib64/libmono-btls-shared.so-*.debug
# drop other debug files as well
rm -rf %{buildroot}/usr/lib/debug/usr/lib64/libmono-native.so*.debug
# create a symbolic link so that Fedora packages targetting Framework 4.5 will still build
cd %{buildroot}/usr/lib/mono && ln -s 4.7.1-api 4.5-api && cd -
# as requested in bug 1704861; we have had that link in F29 with Mono 4.8 as well.
@ -522,7 +519,7 @@ cert-sync /etc/pki/tls/certs/ca-bundle.crt
%{_mandir}/man1/lc.1.gz
%{_mandir}/man1/mprof-report.1.gz
%{_libdir}/libMonoPosixHelper.so*
%{_libdir}/libmono-system-native.so*
%{_libdir}/libmono-native.so*
%dir %{_monodir}
%dir %{_monodir}/4.5
%dir %{_monodir}/4.5/Facades
@ -901,6 +898,9 @@ cert-sync /etc/pki/tls/certs/ca-bundle.crt
%files complete
%changelog
* Tue Aug 06 2019 Timotheus Pokorra <timotheus.pokorra@solidcharity.com> - 5.20.1-0
- upgrade to Mono 5.20.1.34, with a bootstrap build
* Tue Jul 30 2019 Tom Callaway <spot@fedoraproject.org> - 5.18.1-10
- add rpm helper scripts (formerly in rpm-build)

View File

@ -1 +1 @@
SHA512 (mono-5.18.1.28.tar.bz2) = f25861cacb33ae9dbfd21b1b6a2c65bac56e64c77e817121b853ba9586dba04b569003f7f1c0ba4a4391171cd7bb0afe27ee7012581fefa96f6625dd14ab56de
SHA512 (mono-5.20.1.34.tar.bz2) = 08de875c2d5431c85a4a6d0a0938539750ae30c5cd1af1e50bd37ff5c31c1cfa87e2e757f97fb47fb3a23a8646c3455fe9faf86e4ec2c04264c751a776a166d3