[Libguestfs] nbdkit / mingw support

Eric Blake eblake at redhat.com
Tue Mar 24 18:43:52 UTC 2020


On 3/21/20 7:06 AM, Richard W.M. Jones wrote:
> Eric:
> 
> Yifan Gu has posted a few patches for mingw support.  My comments
> below.
> 
> https://github.com/gyf304/nbdkit/commit/a37c4ca6546dfc4e96e305af97b62e5a9d6174ca
> 
> * I think the SHARED_LDFLAGS idea is good.  I pushed a slightly
>    different take on the idea here:
>    https://github.com/libguestfs/nbdkit/commit/1d634009ab8e43592065ec469df6312400525cc8
>    It's slightly different from what Yifan posted above, because I
>    replaced -module -avoid-version -shared with $(SHARED_LDFLAGS),
>    adding -no-undefined additionally on mingw.

Why are we trying to avoid -no-undefined on other platforms?  I do think 
it's annoying the way libtool picked their defaults: the lowest-common 
denominator in shared libraries is avoiding undefined symbols, while 
many platforms such as Linux permit it as extension.  But instead of 
making libtool default to the lowest common denominator, instead, you 
HAVE to specify -no-undefined on platforms where undefined does not 
work, and on other platforms, the absence of -no-undefined lets you get 
away with extensions, while the explicit use of -no-undefined tells your 
toolchain to verify that indeed you are following the stricter 
compatibility setup of no undefined symbols.  But if a strict setup is 
necessary for building on mingw, being able to validate on Linux that we 
are obeying a strict setup seems like it would be a good thing (then 
Linux builds can tell us if we accidentally introduce an undefined 
symbol dependency), rather than waiting until someone reports the 
problem on less-tested mingw.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list