[Buildroot] [Patch] Allow file to be built against static libs.

Peter Korsgaard jacmet at sunsite.dk
Wed Jul 20 21:51:11 UTC 2011


>>>>> "ANDY" == ANDY KENNEDY <ANDY.KENNEDY at adtran.com> writes:

 >> Ehh, drop that, I remembered wrong - We're already doing --enable-
 >> static --disable-shared.

 ANDY> Okay, well, sortta, but not really.  I believe this to be the culprit:

 ANDY> #############################################################
 ANDY> #
 ANDY> # zlib
 ANDY> #
 ANDY> #############################################################
 ANDY> ZLIB_VERSION:=1.2.5
 ANDY> ZLIB_SOURCE:=zlib-$(ZLIB_VERSION).tar.bz2
 ANDY> ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
 ANDY> ZLIB_INSTALL_STAGING=YES

 ANDY> ifeq ($(BR2_PREFER_STATIC_LIB),y)
 ANDY> ZLIB_PIC :=
 ANDY> ZLIB_SHARED := --static
 ANDY> else
 ANDY> ZLIB_PIC := -fPIC
 ANDY> ZLIB_SHARED := --shared
 ANDY> endif

Yes, this is all fine. The problem is just that we link host stuff
dynamically, but zlib was building the host version in the same was as
the target one (so static if BR2_PREFER_STATIC_LIB), which would then
break host-file when it tried to dynamically link to zlib.

I've fixed that now, thanks for reporting it.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list