aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-09-30 22:23:37 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-10-01 09:39:19 +0000
commit37848ee482f0e3433cd2ced0ad9cd6714189da6d (patch)
tree2e9efa2b74fde0a544ff20aafaacc9f30bc5f450
parent6ff1298e7d42585a58adddcaf119acec8bda4a39 (diff)
downloadports-37848ee482f0e3433cd2ced0ad9cd6714189da6d.tar.gz
ports-37848ee482f0e3433cd2ced0ad9cd6714189da6d.zip
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.
-rw-r--r--lang/mono5.20/files/patch-mono_mini_exceptions-ppc.c17
1 files changed, 17 insertions, 0 deletions
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