mono: use proper Git patches
PATCH 1/2 mono: use proper Git patches
In order to ease the modification of the Mono patches, turn the existing ones into proper Git patches.
Signed-off-by Thomas Petazzoni <[email protected]>
---
...Disable-backtrace-on-not-supported-uclibc.patch | 27 ++++++++++++++++++++++
package/mono/0001-gc-fix-uclibc.patch | 16 -------------
...so-path-depending-on-C-library-being-use.patch} | 17 ++++++++++----
.../0003-mono-context.h-fix-build-on-MIPS.patch | 6 ++---
4 files changed, 43 insertions(+), 23 deletions(-)
create mode 100644 package/mono/0001-Disable-backtrace-on-not-supported-uclibc.patch
delete mode 100644 package/mono/0001-gc-fix-uclibc.patch
rename package/mono/{0002-support-uclibc-musl.patch => 0002-Adjust-libc.so-path-depending-on-C-library-being-use.patch} (57%)package/mono/0001-Disable-backtrace-on-not-supported-uclibc.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 5232ec11c74eb49fb220a7e2df80e46ac621e941 Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci <[email protected]> +Date: Sat, 7 Feb 2015 09:49:37 +0100 +Subject: [PATCH] Disable backtrace on not supported uclibc + +Signed-off-by: Angelo Compagnucci <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + libgc/include/gc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgc/include/gc.h b/libgc/include/gc.h +index 2265fdb..6485fc0 100644 +--- a/libgc/include/gc.h ++++ b/libgc/include/gc.h +@@ -500,7 +500,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); + #if defined(__linux__) || defined(__GLIBC__) + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif +-- +2.1.0 +
package/mono/0001-gc-fix-uclibc.patch deleted +0 -16
@@ -1,16 +0,0 @@ -Disable backtrace on not supported uclibc. - -Signed-off-by: Angelo Compagnucci <[email protected]> - -diff -purN mono-native-3.8.0.orig/libgc/include/gc.h mono-native-3.8.0/libgc/include/gc.h ---- mono-native-3.8.0.orig/libgc/include/gc.h 2014-10-07 15:00:21.259466731 +0200 -+++ mono-native-3.8.0/libgc/include/gc.h 2014-10-07 15:05:25.560975681 +0200 -@@ -500,7 +500,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_of - #ifdef __linux__ - # include <features.h> - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif
package/mono/0002-Adjust-libc.so-path-depending-on-C-library-being-use.patch renamed from package/mono/0002-support-uclibc-musl.patch +13 -4
@@ -1,16 +1,22 @@ -Adjust libc.so path depending on C library being used +From 6f8346438e0257259867b5dca6bb6db54eb96705 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Sat, 7 Feb 2015 09:50:24 +0100 +Subject: [PATCH] Adjust libc.so path depending on C library being used By default, on Linux systems, Mono assumes that the C library is libc.so.6. While this is true for glibc, it is not true for uClibc and Musl based systems. This patch adds support for such systems. Signed-off-by: Thomas Petazzoni <[email protected]> +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) -Index: b/configure.ac -=================================================================== +diff --git a/configure.ac b/configure.ac +index 5d9961a..f6a7909 100644 --- a/configure.ac +++ b/configure.ac -@@ -2973,6 +2973,12 @@ +@@ -2978,6 +2978,12 @@ case "$host" in SQLITE="libsqlite.so" SQLITE3="libsqlite3.so" ;;
@@ -23,3 +29,6 @@ Index: b/configure.ac *-*-*linux*) AC_PATH_X dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh` +-- +2.1.0 +
package/mono/0003-mono-context.h-fix-build-on-MIPS.patch +3 -3
@@ -1,4 +1,4 @@ -From 8f489c24e1770c2852efcaff9419d54bfadf0854 Mon Sep 17 00:00:00 2001 +From 2a8fab27a4308335282752164bebcfc77771fd3f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni <[email protected]> Date: Fri, 6 Feb 2015 14:56:10 +0100 Subject: [PATCH] mono-context.h: fix build on MIPS
@@ -16,10 +16,10 @@ Signed-off-by: Thomas Petazzoni <[email protected]> 1 file changed, 2 insertions(+) diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h -index d96eb75..ad56e2c 100755 +index 3b01b49..8852a63 100755 --- a/mono/utils/mono-context.h +++ b/mono/utils/mono-context.h -@@ -464,6 +464,8 @@ mono_ia64_context_get_fp (MonoContext *ctx) +@@ -460,6 +460,8 @@ mono_ia64_context_get_fp (MonoContext *ctx) #elif ((defined(__mips__) && !defined(MONO_CROSS_COMPILE)) || (defined(TARGET_MIPS))) && SIZEOF_REGISTER == 4 /* defined(__ia64__) */
Signature · 1 line
2.1.0
PATCH 2/2 mono: backport patches to fix PowerPC build
Mono 3.12.0 doesn't build properly on PowerPC, but there are already patches upstream to fix those issues. This commit backports the two necessary patches to get the PowerPC build working.
Fixes:
http://autobuild.buildroot.org/results/91d/91d4b9d3f2d3597b071a1bcec8339eaf2a9c7981/
Signed-off-by Thomas Petazzoni <[email protected]>
--- ...e-ppc-sigctx-monoctx-conversion-code-to-m.patch | 92 ++++++++++++++++++++++ ...build-errors-in-mono-context.c-on-ppc64el.patch | 84 ++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 package/mono/0004-jit-Move-the-ppc-sigctx-monoctx-conversion-code-to-m.patch create mode 100644 package/mono/0005-Fix-build-errors-in-mono-context.c-on-ppc64el.patch
package/mono/0004-jit-Move-the-ppc-sigctx-monoctx-conversion-code-to-m.patch new file +92 -0
@@ -0,0 +1,92 @@ +From bf8e3967e4809923d99159ebfa294daf897b5c29 Mon Sep 17 00:00:00 2001 +From: Zoltan Varga <[email protected]> +Date: Mon, 10 Nov 2014 05:22:04 -0500 +Subject: [PATCH] [jit] Move the ppc sigctx<->monoctx conversion code to + mono-context.c. + +Backported from upstream commit +7e056cd346ccab104715e19d51d0ceccd51b696d by Thomas Petazzoni +<[email protected]>. + +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + mono/mini/exceptions-ppc.c | 22 ++-------------------- + mono/utils/mono-context.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 28 insertions(+), 20 deletions(-) + +diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c +index 6c3878e..9b9dbef 100644 +--- a/mono/mini/exceptions-ppc.c ++++ b/mono/mini/exceptions-ppc.c +@@ -600,31 +600,13 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, + void + mono_arch_sigctx_to_monoctx (void *ctx, MonoContext *mctx) + { +-#ifdef MONO_CROSS_COMPILE +- g_assert_not_reached (); +-#else +- os_ucontext *uc = ctx; +- +- mctx->sc_ir = UCONTEXT_REG_NIP(uc); +- mctx->sc_sp = UCONTEXT_REG_Rn(uc, 1); +- memcpy (&mctx->regs, &UCONTEXT_REG_Rn(uc, 13), sizeof (mgreg_t) * MONO_SAVED_GREGS); +- memcpy (&mctx->fregs, &UCONTEXT_REG_FPRn(uc, 14), sizeof (double) * MONO_SAVED_FREGS); +-#endif ++ return mono_sigctx_to_monoctx (ctx, mctx); + } + + void + mono_arch_monoctx_to_sigctx (MonoContext *mctx, void *ctx) + { +-#ifdef MONO_CROSS_COMPILE +- g_assert_not_reached (); +-#else +- os_ucontext *uc = ctx; +- +- UCONTEXT_REG_NIP(uc) = mctx->sc_ir; +- UCONTEXT_REG_Rn(uc, 1) = mctx->sc_sp; +- memcpy (&UCONTEXT_REG_Rn(uc, 13), &mctx->regs, sizeof (mgreg_t) * MONO_SAVED_GREGS); +- memcpy (&UCONTEXT_REG_FPRn(uc, 14), &mctx->fregs, sizeof (double) * MONO_SAVED_FREGS); +-#endif ++ return mono_monoctx_to_sigctx (mctx, ctx); + } + + gpointer +diff --git a/mono/utils/mono-context.c b/mono/utils/mono-context.c +index c52d044..689bf86 100644 +--- a/mono/utils/mono-context.c ++++ b/mono/utils/mono-context.c +@@ -421,4 +421,30 @@ mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx) + } + } + ++#elif (((defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__)) && !defined(MONO_CROSS_COMPILE))) || (defined(TARGET_POWERPC)) ++ ++#include <mono/utils/mono-context.h> ++ ++void ++mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx) ++{ ++ os_ucontext *uc = sigctx; ++ ++ mctx->sc_ir = UCONTEXT_REG_NIP(uc); ++ mctx->sc_sp = UCONTEXT_REG_Rn(uc, 1); ++ memcpy (&mctx->regs, &UCONTEXT_REG_Rn(uc, 13), sizeof (mgreg_t) * MONO_SAVED_GREGS); ++ memcpy (&mctx->fregs, &UCONTEXT_REG_FPRn(uc, 14), sizeof (double) * MONO_SAVED_FREGS); ++} ++ ++void ++mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx) ++{ ++ os_ucontext *uc = sigctx; ++ ++ UCONTEXT_REG_NIP(uc) = mctx->sc_ir; ++ UCONTEXT_REG_Rn(uc, 1) = mctx->sc_sp; ++ memcpy (&UCONTEXT_REG_Rn(uc, 13), &mctx->regs, sizeof (mgreg_t) * MONO_SAVED_GREGS); ++ memcpy (&UCONTEXT_REG_FPRn(uc, 14), &mctx->fregs, sizeof (double) * MONO_SAVED_FREGS); ++} ++ + #endif /* #if defined(__i386__) */ +-- +2.1.0 +
package/mono/0005-Fix-build-errors-in-mono-context.c-on-ppc64el.patch new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH 1/2 mono: use proper Git patches
In reply to Thomas PetazzoniQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
In order to ease the modification of the Mono patches, turn the existing ones into proper Git patches.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed both, thanks.
Signature · 1 line
Bye, Peter Korsgaard