[vlc-devel] [PATCH] configure: Don't explicitly add -ladvapi32 to linker flags

Jean-Baptiste Kempf jb at videolan.org
Thu Apr 26 01:09:51 CEST 2018


On Thu, 26 Apr 2018, at 01:06, Martin Storsjö wrote:
> On Thu, 26 Apr 2018, Jean-Baptiste Kempf wrote:
> 
> >
> >
> > On Thu, 26 Apr 2018, at 00:49, Martin Storsjö wrote:
> >> This flag was originally not added because of crypto functions,
> >> but together with -lssp in 460879.
> >
> > Because without that, it wouldn't compile. And it failed the buildbots.
> 
> Hmm, strange. Right now, gcc+mingw5 setups still build after this patch 
> for me at least.

Cool. It clearly didn't, at the time.
The fact that the buildbots are using libgcc-static could influence?

> >> Advapi32 is one of the libs that are automatically linked in by
> >> the mingw compiler/linker driver.
> >
> > Are you sure? Are you sure also that it is at the right place? (and doesn't that depend on the mingw version)
> 
> The right place should be at the end, and I'm pretty sure it does that. 
> You can have a look with e.g. "x86_64-w64-mingw32-gcc hello.c -o hello.exe 
> -v", to print the actual link command invoked.
> 
> That said, libtool as used in vlc does some tricks where it parses the 
> output from "$CC -v" and picks up the default libraries, and then links 
> with -nostdlib, adding the default libs manually.
> 
> I don't insist on this fix though - I have a fix for mingw-w64 as well, 
> that at least fixes my build failure - but I didn't really see why this 
> would be necessary.

As the author of the original patch, I do not care a single bit, as long as it does not break the buildbot.

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list