[Libguestfs] [PATCH] build: Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).

Richard W.M. Jones rjones at redhat.com
Fri Aug 31 08:03:31 UTC 2018


We also use -runtime-variant _pic which selects the OCaml runtime
linked with -fPIC.  This will cause a performance regression on i686
although that probably doesn't matter now.

A bigger issue is that it will stop supermin from building with older
versions of OCaml (<= 4.02.2).  We might instead try detecting if it's
the old version in ./configure but that gets a bit fragile.
---
 src/supermin-link.sh.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/supermin-link.sh.in b/src/supermin-link.sh.in
index 29b84a1..b7fded6 100644
--- a/src/supermin-link.sh.in
+++ b/src/supermin-link.sh.in
@@ -21,4 +21,8 @@
 # Hack automake to link 'supermin' binary properly.  There is no other
 # way to add the -cclib parameter to the end of the command line.
 
-exec "$@" -linkpkg -cclib '@EXT2FS_LIBS@ @COM_ERR_LIBS@ @LIBRPM_LIBS@'
+exec "$@" \
+     -linkpkg \
+     -runtime-variant _pic \
+     -ccopt '@CFLAGS@' \
+     -cclib '@LDFLAGS@ @EXT2FS_LIBS@ @COM_ERR_LIBS@ @LIBRPM_LIBS@'
-- 
2.18.0




More information about the Libguestfs mailing list