supermin/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch

43 lines
1.2 KiB
Diff
Raw Normal View History

2023-07-12 21:53:51 +00:00
From 59a8ffc40db94a38879d9c923520e0bd70ffa271 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 12 Jul 2023 22:51:43 +0100
Subject: [PATCH 10/10] ocamlc: Only supply -output-complete-exe to final link
Add a separate variable to store link flags, and use that to supply
-output-complete-exe. Apparently ocamlc ignores -custom in the wrong
place.
Fixes: dc80dbbef60d5d81a7d4321683a8c7305dc04972
---
src/Makefile.am | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 5a1c671..1268aa5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -132,8 +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 # for OCaml < 4.10
-OCAMLFLAGS += -output-complete-exe
+#OCAMLLINKFLAGS = -custom # for OCaml < 4.10
+OCAMLLINKFLAGS = -output-complete-exe
else
OBJECTS = $(XOBJECTS)
BEST = opt
@@ -143,7 +143,8 @@ supermin_DEPENDENCIES = $(OBJECTS)
supermin_LINK = \
./supermin-link.sh \
- $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
+ $(OCAMLFIND) $(BEST) $(OCAMLLINKFLAGS) $(OCAMLFLAGS) \
+ $(OCAMLPACKAGES) \
$(OBJECTS) -o $@
.mli.cmi:
--
2.37.3