From 57ed1fc4281462e02604b0e740c4ffa31cf93afb Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Thu, 27 Sep 2018 15:51:01 +0200
Subject: [PATCH] ocaml: make sure to pass LDFLAGS to ocamlmklibs linker
(RHBZ#1624130)
Pass the LDFLAGS properly as arguments for the C linker when using
ocamlmklibs via the -ldopt option.
Followup of commit 34c23403c51a4d59d826c8045e06f9aabc2ceb16.
(cherry picked from commit 4ff573c352973036b722ec0c9bf79be958b83b2c)
---
ocaml/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 752fc109c..4d13eed97 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -64,14 +64,14 @@ endif
stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
$(OCAMLMKLIB) -o mlguestfs \
+ -ldopt '$(LDFLAGS)' \
$(libguestfsocaml_a_OBJECTS) guestfs.cmo \
- $(LDFLAGS) \
$(LTLIBINTL) \
-L../lib/.libs -lguestfs
if HAVE_OCAMLOPT
$(OCAMLMKLIB) -o mlguestfs \
+ -ldopt '$(LDFLAGS)' \
$(libguestfsocaml_a_OBJECTS) guestfs.cmx \
- $(LDFLAGS) \
$(LTLIBINTL) \
-L../lib/.libs -lguestfs
endif
--
2.20.1