Blame SOURCES/0002-build-Pass-CFLAGS-LDFLAGS-to-final-supermin-link-RHB.patch

1c4e8d
From 34f0b5e73dca76e27d65af6d4709d45d256c8f3f Mon Sep 17 00:00:00 2001
1c4e8d
From: "Richard W.M. Jones" <rjones@redhat.com>
1c4e8d
Date: Fri, 31 Aug 2018 09:00:44 +0100
1c4e8d
Subject: [PATCH 2/2] build: Pass CFLAGS & LDFLAGS to final supermin link
1c4e8d
 (RHBZ#1624175).
1c4e8d
1c4e8d
We also use -runtime-variant _pic which selects the OCaml runtime
1c4e8d
linked with -fPIC.  This will cause a performance regression on i686
1c4e8d
although that probably doesn't matter now.
1c4e8d
1c4e8d
A bigger issue is that it will stop supermin from building with older
1c4e8d
versions of OCaml (<= 4.02.2).  We might instead try detecting if it's
1c4e8d
the old version in ./configure but that gets a bit fragile.
1c4e8d
---
1c4e8d
 src/supermin-link.sh.in | 6 +++++-
1c4e8d
 1 file changed, 5 insertions(+), 1 deletion(-)
1c4e8d
1c4e8d
diff --git a/src/supermin-link.sh.in b/src/supermin-link.sh.in
1c4e8d
index 29b84a1..b7fded6 100644
1c4e8d
--- a/src/supermin-link.sh.in
1c4e8d
+++ b/src/supermin-link.sh.in
1c4e8d
@@ -21,4 +21,8 @@
1c4e8d
 # Hack automake to link 'supermin' binary properly.  There is no other
1c4e8d
 # way to add the -cclib parameter to the end of the command line.
1c4e8d
 
1c4e8d
-exec "$@" -linkpkg -cclib '@EXT2FS_LIBS@ @COM_ERR_LIBS@ @LIBRPM_LIBS@'
1c4e8d
+exec "$@" \
1c4e8d
+     -linkpkg \
1c4e8d
+     -runtime-variant _pic \
1c4e8d
+     -ccopt '@CFLAGS@' \
1c4e8d
+     -cclib '@LDFLAGS@ @EXT2FS_LIBS@ @COM_ERR_LIBS@ @LIBRPM_LIBS@'
1c4e8d
-- 
1c4e8d
2.19.0.rc0
1c4e8d