Richard W.M. Jones
2018-Aug-31 08:03 UTC
[Libguestfs] [PATCH] build: Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).
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
Pino Toscano
2018-Aug-31 10:31 UTC
Re: [Libguestfs] [PATCH] build: Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).
On Friday, 31 August 2018 10:03:31 CEST Richard W.M. Jones wrote:> 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.This is for supermin, right?> 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.The latest commit in supermin is 5c5eff66dfaccb212b8906e769e40633d8b8f5e4, which basically already raised the OCaml build requirement to >= 4.02.0. Because of that, I'd say this LGTM. -- Pino Toscano
Richard W.M. Jones
2018-Aug-31 10:57 UTC
Re: [Libguestfs] [PATCH] build: Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).
On Fri, Aug 31, 2018 at 12:31:46PM +0200, Pino Toscano wrote:> On Friday, 31 August 2018 10:03:31 CEST Richard W.M. Jones wrote: > > 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. > > This is for supermin, right?Yes, but we might need something similar for libguestfs. Still trying to get details on the (supposed) libguestfs bugs that OCaml tools don't use the right hardening flags.> > 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. > > The latest commit in supermin is > 5c5eff66dfaccb212b8906e769e40633d8b8f5e4, which basically already > raised the OCaml build requirement to >= 4.02.0. > > Because of that, I'd say this LGTM.Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Reasonably Related Threads
- [PATCH] build: Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).
- Re: [PATCH supermin 0/9] kernel: Multiple fixes to handling of kernels (RHBZ#1477758).
- [PATCH hivex] ocaml: Link the C bindings with LDFLAGS (RHBZ#1548536).
- [PATCH] ocaml: make sure to pass LDFLAGS to ocamlmklibs linker (RHBZ#1624130)
- [supermin PATCH v2 4/4] build: check for outputs in --if-newer check (RHBZ#1813809)