SHA256
1
0
forked from pool/supermin
supermin/005-Only-supply-output-complete-exe-to-final-link.patch

37 lines
1.1 KiB
Diff
Raw Normal View History

Subject: ocamlc: Only supply -output-complete-exe to final link
From: Richard W.M. Jones rjones@redhat.com Wed Jul 12 22:51:43 2023 +0100
Date: Wed Jul 12 22:51:43 2023 +0100:
Git: 59a8ffc40db94a38879d9c923520e0bd70ffa271
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
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: