Add a patch to fix clang 15 compat on ppc64le
This commit is contained in:
parent
593af93cdc
commit
c78aca21d6
@ -96,6 +96,9 @@ Patch8: runtime-77270-ppc64le-fsharp-crash.patch
|
||||
Patch9: runtime-77308-ppc64le-delegate.patch
|
||||
# Disable apphost; there's no net6.0 apphost for ppc64le
|
||||
Patch10: roslyn-analyzers-ppc64le-apphost.patch
|
||||
# Fix ppc64le build with clang 15
|
||||
# TODO upstream this
|
||||
Patch11: runtime-mono-ppc64le-clang15.patch
|
||||
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
@ -426,6 +429,7 @@ popd
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
# Fix bad hardcoded path in build
|
||||
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/hostmisc/pal.unix.cpp
|
||||
|
39
runtime-mono-ppc64le-clang15.patch
Normal file
39
runtime-mono-ppc64le-clang15.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/src/runtime/src/mono/mono/mini/mini-ppc.c b/src/runtime/src/mono/mono/mini/mini-ppc.c
|
||||
index bc97b497af9..cc5e5ccc0e6 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/mini-ppc.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/mini-ppc.c
|
||||
@@ -2733,7 +2733,7 @@ handle_thunk (MonoCompile *cfg, guchar *code, const guchar *target)
|
||||
cfg->arch.thunks = cfg->thunks;
|
||||
cfg->arch.thunks_size = cfg->thunk_area;
|
||||
#ifdef THUNK_ADDR_ALIGNMENT
|
||||
- cfg->arch.thunks = ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
|
||||
+ cfg->arch.thunks = (guint8 *)ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
|
||||
#endif
|
||||
}
|
||||
thunks = cfg->arch.thunks;
|
||||
@@ -5886,7 +5886,7 @@ host_mgreg_t*
|
||||
mono_arch_context_get_int_reg_address (MonoContext *ctx, int reg)
|
||||
{
|
||||
if (reg == ppc_r1)
|
||||
- return (host_mgreg_t)(gsize)MONO_CONTEXT_GET_SP (ctx);
|
||||
+ return (host_mgreg_t *)(gsize)&ctx->sc_sp;
|
||||
|
||||
return &ctx->regs [reg];
|
||||
}
|
||||
diff --git a/src/runtime/src/mono/mono/mini/tramp-ppc.c b/src/runtime/src/mono/mono/mini/tramp-ppc.c
|
||||
index 59bcb275a48..e0bc7f8eca4 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/tramp-ppc.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/tramp-ppc.c
|
||||
@@ -672,10 +672,10 @@ mono_arch_get_call_target (guint8 *code)
|
||||
}
|
||||
#if defined(TARGET_POWERPC64) && !defined(PPC_USES_FUNCTION_DESCRIPTOR)
|
||||
else if (((guint32*)(code - 32)) [0] >> 26 == 15) {
|
||||
- guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
|
||||
+ guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
|
||||
return thunk;
|
||||
} else if (((guint32*)(code - 4)) [0] >> 26 == 15) {
|
||||
- guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
|
||||
+ guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
|
||||
return thunk;
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user