Blame 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch

1addc80
From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001
1addc80
From: "Richard W.M. Jones" <rjones@redhat.com>
1addc80
Date: Wed, 12 Jul 2023 22:37:58 +0100
47169f1
Subject: [PATCH 09/10] ocamlc: Use -output-complete-exe instead of -custom
1addc80
1addc80
This prevents bytecode executables from being broken by strip and
1addc80
similar tools.  Note this is incompatible with OCaml < 4.10 (so breaks
1addc80
RHEL 8).  However this only affects bytecode builds which we prefer
1addc80
not to use in RHEL.  I left the old option in the Makefile so that it
1addc80
could be uncommented by someone using older OCaml + bytecode.  We need
1addc80
this for OCaml 5.0 since that drops native backends (temporarily) for
1addc80
riscv64, s390x and ppc64le.
1addc80
---
1addc80
 src/Makefile.am | 3 ++-
1addc80
 1 file changed, 2 insertions(+), 1 deletion(-)
1addc80
1addc80
diff --git a/src/Makefile.am b/src/Makefile.am
1addc80
index 5b07e5d..5a1c671 100644
1addc80
--- a/src/Makefile.am
1addc80
+++ b/src/Makefile.am
1addc80
@@ -132,7 +132,8 @@ OCAMLFLAGS = -g -warn-error +C+D+E+F+L+M+P+S+U+V+X+Y+Z-3
1addc80
 if !HAVE_OCAMLOPT
1addc80
 OBJECTS = $(BOBJECTS)
1addc80
 BEST    = c
1addc80
-OCAMLFLAGS += -custom
1addc80
+#OCAMLFLAGS += -custom  # for OCaml < 4.10
1addc80
+OCAMLFLAGS += -output-complete-exe
1addc80
 else
1addc80
 OBJECTS = $(XOBJECTS)
1addc80
 BEST    = opt
1addc80
-- 
1addc80
2.37.3
1addc80