fix build failure against new glibc-2.26 on aarch64

This commit is contained in:
Than Ngo 2017-09-20 23:17:50 +02:00
parent 00b1ee25f8
commit 9ac52a3aca
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,15 @@
diff -up mono-4.8.0/mono/utils/mono-context.c.than mono-4.8.0/mono/utils/mono-context.c
--- mono-4.8.0/mono/utils/mono-context.c.than 2017-09-20 20:58:53.854625078 +0200
+++ mono-4.8.0/mono/utils/mono-context.c 2017-09-20 22:53:40.863538894 +0200
@@ -387,7 +387,11 @@ mono_sigctx_to_monoctx (void *sigctx, Mo
mctx->pc = UCONTEXT_REG_PC (sigctx);
mctx->regs [ARMREG_SP] = UCONTEXT_REG_SP (sigctx);
#ifdef __linux__
+#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 26)))
+ struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__glibc_reserved1;
+#else
struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__reserved;
+#endif
int i;
g_assert (fpctx->head.magic == FPSIMD_MAGIC);

View File

@ -37,6 +37,7 @@ Patch5: mono-4.6.1-aarch64.patch
# fix bz#1484151, bz#1484149 due to new glibc which
# drops the struct ucontext
Patch6: mono-4.8.0.520-glibc-ucontext.patch
Patch7: mono-4.8.0-aarch64-glibc-2.26.patch
BuildRequires: bison
BuildRequires: cmake
@ -280,6 +281,7 @@ Development file for monodoc
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# Add undeclared Arg
sed -i "61a #define ARG_MAX _POSIX_ARG_MAX" mono/io-layer/wapi_glob.h
@ -795,7 +797,7 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%changelog
* Wed Sep 20 2017 Than Ngo <than@redhat.com> - 4.8.0-12
- fixed the build failure on s390x/ppc64/ppc64le against new glibc
- fixed the build failure on s390x/ppc64/ppc64le/aarch64 against new glibc
which drops the tag struct ucontext
* Sun Aug 27 2017 Ville Skyttä <ville.skytta@iki.fi> - 4.8.0-11