git: 37848ee482f0 - main - lang/mono5.20: fix build with llvm 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Oct 2023 09:39:30 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=37848ee482f0e3433cd2ced0ad9cd6714189da6d commit 37848ee482f0e3433cd2ced0ad9cd6714189da6d Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-09-30 22:23:37 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-10-01 09:39:19 +0000 lang/mono5.20: fix build with llvm 16 exceptions-ppc.c:798:32: error: incompatible pointer to integer conversion assigning to 'mgreg_t' (aka 'long') from 'gpointer' (aka 'void *') [-Wint-conversion] ctx->regs [PPC_FIRST_ARG_REG] = user_data; ^ ~~~~~~~~~ exceptions-ppc.c:800:23: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'gpointer' (aka 'void *') [-Wint-conversion] *(unsigned long *)sp = MONO_CONTEXT_GET_SP(ctx); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ exceptions-ppc.c:802:45: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion] mono_arch_setup_resume_sighandler_ctx(ctx, (unsigned long) async_cb); ^~~~~~~~~~~~~~~~~~~~~~~~ ./mini.h:2314:77: note: passing argument to parameter 'func' here void mono_arch_setup_resume_sighandler_ctx (MonoContext *ctx, gpointer func); ^ 3 errors generated. --- lang/mono5.20/files/patch-mono_mini_exceptions-ppc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lang/mono5.20/files/patch-mono_mini_exceptions-ppc.c b/lang/mono5.20/files/patch-mono_mini_exceptions-ppc.c new file mode 100644 index 000000000000..066765a694dd --- /dev/null +++ b/lang/mono5.20/files/patch-mono_mini_exceptions-ppc.c @@ -0,0 +1,17 @@ +--- mono/mini/exceptions-ppc.c.orig 2023-09-30 21:55:09 UTC ++++ mono/mini/exceptions-ppc.c +@@ -795,11 +795,11 @@ mono_arch_setup_async_callback (MonoContext *ctx, void + mono_arch_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), gpointer user_data) + { + uintptr_t sp = (uintptr_t) MONO_CONTEXT_GET_SP(ctx); +- ctx->regs [PPC_FIRST_ARG_REG] = user_data; ++ ctx->regs [PPC_FIRST_ARG_REG] = (mgreg_t)user_data; + sp -= PPC_MINIMAL_STACK_SIZE; +- *(unsigned long *)sp = MONO_CONTEXT_GET_SP(ctx); ++ *(unsigned long *)sp = (uintptr_t)MONO_CONTEXT_GET_SP(ctx); + MONO_CONTEXT_SET_BP(ctx, sp); +- mono_arch_setup_resume_sighandler_ctx(ctx, (unsigned long) async_cb); ++ mono_arch_setup_resume_sighandler_ctx(ctx, (gpointer) async_cb); + } + + void