[Buildroot] [git commit] minidlna: fix static linking

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jan 28 21:28:10 UTC 2014


Dear Peter Korsgaard,

On Tue, 28 Jan 2014 22:21:01 +0100, Peter Korsgaard wrote:

>  >> -# static build is broken w.r.t libgcc_s
>  >> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
>  >> +# the configure script / Makefile forgets to link with some of the dependent
>  >> +# libraries breaking static linking, so help it along
>  >> +MINIDLNA_CONF_ENV = \
>  >> +	LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
>  >> +else
> 
>  > I know we're doing this in a bunch of cases, but I believe we should
>  > rather fix the package itself, rather than encoding into the
>  > Buildroot .mk file the list of libraries to link with. Because if
>  > libogg or libavutil becomes unnecessary in a future version of
>  > minidlna, we may not notice, and still link needlessly against them.
> 
> True. Patches are welcome ;)

Well. When the static linking requires such weirdness to fix upstream
breakage, and nobody cares about linking statically the package, then
marking it as depends on !BR2_PREFER_STATIC_LIB is probably a better
solution.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list