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