--- /dev/null
+From: Miod Vallat <miod@tarides.com>
+Date: Wed, 19 Jun 2024 13:13:03 +0000
+Subject: Remove fixed register assignments on m68k.
+
+The use of %a5 conflicts with its internal usage as a GOT base by Glibc, and
+given the scarce number of available registers on this platform, it is
+probably better to trust the compiler to perform register assignment here.
+
+Origin: https://github.com/ocaml/ocaml/pull/13252
+---
+ runtime/interp.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/runtime/interp.c b/runtime/interp.c
+index 66f0123..b688a6d 100644
+--- a/runtime/interp.c
++++ b/runtime/interp.c
+@@ -208,11 +208,18 @@ Caml_inline void check_trap_barrier_for_effect
+ #define SP_REG asm("%r17")
+ #define ACCU_REG asm("%r16")
+ #endif
+-#ifdef __mc68000__
++#ifdef __mc68000__ /* { */
++#ifdef __linux__
++/* glibc relies upon %a5 to always contain the base address of the GOT. */
++#define PC_REG asm("a3")
++#define SP_REG asm("a4")
++#define ACCU_REG asm("d7")
++#else
+ #define PC_REG asm("a5")
+ #define SP_REG asm("a4")
+ #define ACCU_REG asm("d7")
+ #endif
++#endif /* } __mc68000 */
+ /* PR#4953: these specific registers not available in Thumb mode */
+ #if defined (__arm__) && !defined(__thumb__)
+ #define PC_REG asm("r6")