diff mbox

[1/1] package/fbv: Fix linking against libpng

Message ID 1407683528-2780-1-git-send-email-bernd.kuhls@t-online.de
State Accepted
Headers show

Commit Message

Bernd Kuhls Aug. 10, 2014, 3:12 p.m. UTC
Fixes
http://autobuild.buildroot.net/results/9ca/9cacec257f979745a7d4a43224b243ee4e16f9ac/
http://autobuild.buildroot.net/results/996/996e42396546555e9fcf0c7135aac610ccca4eee/
http://autobuild.buildroot.net/results/c91/c918046900045c34c73e16578026cce3e6bcccf8/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/fbv/fbv.mk |    1 +
 1 file changed, 1 insertion(+)

Comments

Peter Korsgaard Aug. 11, 2014, 9:31 p.m. UTC | #1
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

 > Fixes
 > http://autobuild.buildroot.net/results/9ca/9cacec257f979745a7d4a43224b243ee4e16f9ac/
 > http://autobuild.buildroot.net/results/996/996e42396546555e9fcf0c7135aac610ccca4eee/
 > http://autobuild.buildroot.net/results/c91/c918046900045c34c73e16578026cce3e6bcccf8/

 > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 > ---
 >  package/fbv/fbv.mk |    1 +
 >  1 file changed, 1 insertion(+)

 > diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk
 > index 6f41d9f..980bb9e 100644
 > --- a/package/fbv/fbv.mk
 > +++ b/package/fbv/fbv.mk
 > @@ -15,6 +15,7 @@ FBV_DEPENDENCIES = # empty
 >  FBV_CONFIGURE_OPTS = # empty
 >  ifeq ($(BR2_PACKAGE_FBV_PNG),y)
 >  FBV_DEPENDENCIES += libpng
 > +FBV_CONFIGURE_OPTS += "--libs=$(shell $(PKG_CONFIG_HOST_BINARY) --libs libpng)"

Hmm, the issue is specifically about static linking (as libpng uses
zlib and lm, but fbv doesn't directly use them), so that would be good to
mention in the commit message.

With that said, your fix doesn't work as pkg-config --libs libpng just
returns -lpng16. You need to explicitly ask for the static version with
--static to get -lpng16 -lz.

I've changed it only use pkg-config (with --static) for the static
linking case and committed, thanks.
diff mbox

Patch

diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk
index 6f41d9f..980bb9e 100644
--- a/package/fbv/fbv.mk
+++ b/package/fbv/fbv.mk
@@ -15,6 +15,7 @@  FBV_DEPENDENCIES = # empty
 FBV_CONFIGURE_OPTS = # empty
 ifeq ($(BR2_PACKAGE_FBV_PNG),y)
 FBV_DEPENDENCIES += libpng
+FBV_CONFIGURE_OPTS += "--libs=$(shell $(PKG_CONFIG_HOST_BINARY) --libs libpng)"
 else
 FBV_CONFIGURE_OPTS += --without-libpng
 endif