mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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