mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0046-ocaml-make-sure-to-pass-LDFLAGS-to-ocamlmklibs-linke.patch

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