git: 104d69cec3f6 - main - lang/mono6.8: fix build with llvm 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Oct 2023 09:39:31 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=104d69cec3f69491cbc1053edf8dbae9f13e1acf
commit 104d69cec3f69491cbc1053edf8dbae9f13e1acf
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-10-01 08:59:50 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-10-01 09:39:21 +0000
lang/mono6.8: fix build with llvm 16
exceptions-ppc.c:817:32: error: incompatible pointer to integer conversion assigning to 'host_mgreg_t' (aka 'long') from 'gpointer' (aka 'void *') [-Wint-conversion]
ctx->regs [PPC_FIRST_ARG_REG] = user_data;
^ ~~~~~~~~~
exceptions-ppc.c:819: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:821: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:2384:77: note: passing argument to parameter 'func' here
void mono_arch_setup_resume_sighandler_ctx (MonoContext *ctx, gpointer func);
^
3 errors generated.
---
lang/mono6.8/files/patch-mono_mini_exceptions-ppc.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lang/mono6.8/files/patch-mono_mini_exceptions-ppc.c b/lang/mono6.8/files/patch-mono_mini_exceptions-ppc.c
new file mode 100644
index 000000000000..14c32e91e6ef
--- /dev/null
+++ b/lang/mono6.8/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] = (host_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