1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
-index 0c9d638..c62f23d 100644
+index 64e6d7e..4d94dc6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1249,6 +1249,10 @@ AS_CASE([$host],
+@@ -1353,6 +1353,10 @@ AS_CASE([$host],
[oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
1 file changed, 10 insertions(+)
diff --git a/configure.ac b/configure.ac
-index c62f23d..d5d432a 100644
+index 4d94dc6..af1ea7b 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1502,6 +1502,16 @@ AS_CASE([$arch],
+@@ -1608,6 +1608,16 @@ AS_CASE([$arch],
# Alpine and other musl-based Linux distributions
[common_cflags="-no-pie $common_cflags"])])
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/driver/main_args.ml b/driver/main_args.ml
-index 732dea3..65239ce 100644
+index ea07d15..7972427 100644
--- a/driver/main_args.ml
+++ b/driver/main_args.ml
-@@ -1903,7 +1903,6 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1920,7 +1920,6 @@ third-party libraries such as Lwt, but with a different API."
include Core
include Compiler
let _compat_32 = set bytecode_compatible_32
let _dcamlprimc = set keep_camlprimc_file
let _dinstr = set dump_instr
let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s))
-@@ -1922,6 +1921,15 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1939,6 +1938,15 @@ third-party libraries such as Lwt, but with a different API."
let _use_runtime s = use_runtime := s
let _v () = Compenv.print_version_and_library "compiler"
let _vmthread () = Compenv.fatal vmthread_removed_message
+++ /dev/null
-From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
-Date: Wed, 8 Feb 2023 08:45:00 +0100
-Subject: Filter out -f{debug,file}-prefix-map= from ocamlc_cflags and mkexe
-
-Bug-Debian: https://bugs.debian.org/1030785
-Forwarded: not-needed
----
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index d5d432a..467099f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,7 +36,7 @@ CONFIGURE_ARGS="$*"
- # rely on $CFLAGS because these cannot be processed by flexlink (and are not
- # passed)
- mkexe_cmd='$(CC)'
--mkexe_cflags='$(OC_CFLAGS) $(CFLAGS)'
-+mkexe_cflags='$(OC_CFLAGS) $(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))'
- mkexe_extra_flags=''
- mkexe_via_cc_extra_cmd=''
- mkexe_ldflags_prefix=''
-@@ -2555,7 +2555,7 @@ AS_IF([test "$ccomptype" != "msvc"],
-
- oc_cflags="$common_cflags $internal_cflags"
- oc_cppflags="$common_cppflags $internal_cppflags"
--ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $CFLAGS"
-+ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"
- ocamlc_cppflags="$common_cppflags $CPPFLAGS"
-
- AS_CASE([$host],
-@@ -2652,7 +2652,7 @@ AC_CONFIG_COMMANDS_PRE([
- mkexe_exp="$mkexe_cmd_exp"
- AS_IF([test -n "$mkexe_cflags"],
- [mkexe="$mkexe $mkexe_cflags"
-- mkexe_exp="$mkexe_exp $common_cflags $CFLAGS"])
-+ mkexe_exp="$mkexe_exp $common_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"])
- AS_IF([test -n "$mkexe_extra_flags"],
- [mkexe="$mkexe $mkexe_extra_flags"
- mkexe_exp="$mkexe_exp $mkexe_extra_flags"])
+++ /dev/null
-From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
-Date: Wed, 12 Jun 2024 13:09:53 +0200
-Subject: Fix call to test in configure.ac
-
-Forwarded: https://github.com/ocaml/ocaml/pull/13268
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 467099f..a8e4222 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2690,7 +2690,7 @@ ${mkdll_ldflags}"
- ],[
- mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)'
- mkdll_ldflags_exp="${oc_dll_ldflags}"
-- AS_IF([test -n ${LDFLAGS}],
-+ AS_IF([test -n "${LDFLAGS}"],
- [mkdll_ldflags_exp="$mkdll_ldflags_exp $LDFLAGS"])
- mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)"
- mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}"
+++ /dev/null
-From: Miod Vallat <miod@tarides.com>
-Date: Wed, 19 Jun 2024 13:13:03 +0000
-Subject: Rework fixed register assignments on m68k.
-
-The use of %a5 conflicts with its internal usage as a GOT base by Glibc,
-so shift assignments one register down.
-
-Origin: https://github.com/ocaml/ocaml/pull/13252
----
- runtime/interp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/runtime/interp.c b/runtime/interp.c
-index 66f0123..05c61e3 100644
---- a/runtime/interp.c
-+++ b/runtime/interp.c
-@@ -209,7 +209,7 @@ Caml_inline void check_trap_barrier_for_effect
- #define ACCU_REG asm("%r16")
- #endif
- #ifdef __mc68000__
--#define PC_REG asm("a5")
-+#define PC_REG asm("a3")
- #define SP_REG asm("a4")
- #define ACCU_REG asm("d7")
- #endif
+++ /dev/null
-From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
-Date: Fri, 28 Jun 2024 07:53:21 +0200
-Subject: Avoid atomic 64-bit load on Debian armel
-
-Bug: https://github.com/ocaml/ocaml/issues/13234
-Forwarded: https://github.com/ocaml/ocaml/pull/13267
----
- otherlibs/runtime_events/runtime_events_consumer.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/otherlibs/runtime_events/runtime_events_consumer.c b/otherlibs/runtime_events/runtime_events_consumer.c
-index 9df4eb5..1771df7 100644
---- a/otherlibs/runtime_events/runtime_events_consumer.c
-+++ b/otherlibs/runtime_events/runtime_events_consumer.c
-@@ -189,7 +189,16 @@ caml_runtime_events_create_cursor(const char_os* runtime_events_path, int pid,
-
- cursor->ring_file_size_bytes = GetFileSize(cursor->ring_file_handle, NULL);
- #else
-- ring_fd = open(runtime_events_loc, O_RDONLY, 0);
-+#if defined(__ARM_ARCH) && __ARM_ARCH <= 5
-+ /* Atomic 64-bit load requires RW memory on Debian armel. See:
-+ https://github.com/ocaml/ocaml/issues/13234 */
-+ const int open_flags = O_RDWR;
-+ const int mmap_prot = PROT_READ | PROT_WRITE;
-+#else
-+ const int open_flags = O_RDONLY;
-+ const int mmap_prot = PROT_READ;
-+#endif
-+ ring_fd = open(runtime_events_loc, open_flags, 0);
-
- if( ring_fd == -1 ) {
- caml_stat_free(cursor);
-@@ -210,7 +219,7 @@ caml_runtime_events_create_cursor(const char_os* runtime_events_path, int pid,
- /* This cast is necessary for compatibility with Illumos' non-POSIX
- mmap/munmap */
- cursor->metadata = (struct runtime_events_metadata_header *)
-- mmap(NULL, cursor->ring_file_size_bytes, PROT_READ,
-+ mmap(NULL, cursor->ring_file_size_bytes, mmap_prot,
- MAP_SHARED, ring_fd, 0);
-
- if( cursor->metadata == MAP_FAILED ) {
+++ /dev/null
-From: Xavier Leroy <xavier.leroy@college-de-france.fr>
-Date: Thu, 29 Aug 2024 12:08:16 +0200
-Subject: Don't use r12 to pass size to caml_call_realloc_stack
-
-The temporary r12 can be destroyed by a PLT shim.
-Instead, use r27 (a non-temporary register, not used at OCaml function entry).
-
-Origin: https://github.com/ocaml/ocaml/pull/13410
----
- asmcomp/power/emit.mlp | 3 ++-
- runtime/power.S | 6 +++---
- 2 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
-index 47f5419..70a6a0f 100644
---- a/asmcomp/power/emit.mlp
-+++ b/asmcomp/power/emit.mlp
-@@ -996,8 +996,9 @@ let fundecl fundecl =
- || max_frame_size >= stack_threshold_size then begin
- let overflow = new_label () and ret = new_label () in
- (* The return address is saved in a register not used for param passing *)
-+ (* The size is passed in a register normally not used for param passing *)
- `{emit_label overflow}: mflr 28\n`;
-- ` li 12, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
-+ ` li 27, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
- emit_call "caml_call_realloc_stack";
- emit_call_nop ();
- ` mtlr 28\n`;
-diff --git a/runtime/power.S b/runtime/power.S
-index bfb37fa..9e5b243 100644
---- a/runtime/power.S
-+++ b/runtime/power.S
-@@ -358,16 +358,16 @@
- caml_system__code_begin:
-
- /* Reallocate the stack when it is too small. */
--/* Desired size is passed in register TMP2. */
-+/* Desired size is passed in register r27. */
-
- FUNCTION caml_call_realloc_stack
- /* Save return address in caller's frame. */
- mflr 0
- std 0, LR_SAVE(SP)
- /* Save all registers, as well as ALLOC_PTR and TRAP_PTR */
-- SAVE_ALL_REGS /* TMP2 is preserved */
-+ SAVE_ALL_REGS /* r27 is preserved */
- /* Recover desired size, to be passed in r3 */
-- mr 3, TMP2
-+ mr 3, 27
- /* Switch stacks and call caml_try_realloc_stack */
- SWITCH_OCAML_TO_C
- Far_call(caml_try_realloc_stack)
0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch
0006-Do-not-error-on-warnings-in-autoconf.patch
0007-Put-manpages-in-section-3o-instead-of-3.patch
-0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch
-0008-Fix-call-to-test-in-configure.ac.patch
-0009-Rework-fixed-register-assignments-on-m68k.patch
-0010-Avoid-atomic-64-bit-load-on-Debian-armel.patch
-0011-Don-t-use-r12-to-pass-size-to-caml_call_realloc_stac.patch