diff mbox

[2/2] fwup: fix static linking issues

Message ID 1471544678-12514-2-git-send-email-rahul.bedarkar@imgtec.com
State Rejected
Headers show

Commit Message

Rahul Bedarkar Aug. 18, 2016, 6:24 p.m. UTC
In case of static linking, we need to link against dependencies of
dependencies. When static libs are enabled, pkg-config seems to be
outputting private libs implicitly without need of --static option.

Instead of manually adding libs for dependencies of libconfuse and
libarchive, use pkg-config.

Fixes:

  http://autobuild.buildroot.net/results/69d/69d410e13a49b0ed34c501ba27d32df3269adb16/

Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
 package/fwup/fwup.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Petazzoni Aug. 18, 2016, 7:25 p.m. UTC | #1
Hello,

On Thu, 18 Aug 2016 23:54:38 +0530, Rahul Bedarkar wrote:
> In case of static linking, we need to link against dependencies of
> dependencies. When static libs are enabled, pkg-config seems to be
> outputting private libs implicitly without need of --static option.
> 
> Instead of manually adding libs for dependencies of libconfuse and
> libarchive, use pkg-config.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/69d/69d410e13a49b0ed34c501ba27d32df3269adb16/
> 
> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>

We already have some patches from Frank updating fwup:
especially https://patchwork.ozlabs.org/patch/657961/, which I believe
fixes the same issue, by using pkg-config: see commit
https://github.com/fhunleth/fwup/commit/d770b51ec097480db6d4ddeefd8e2ae21059b090
in fwup upstream.

Thanks,

Thomas
diff mbox

Patch

diff --git a/package/fwup/fwup.mk b/package/fwup/fwup.mk
index ae85716..db13fcc 100644
--- a/package/fwup/fwup.mk
+++ b/package/fwup/fwup.mk
@@ -13,5 +13,9 @@  HOST_FWUP_DEPENDENCIES = host-libconfuse host-libarchive host-libsodium
 FWUP_AUTORECONF = YES
 FWUP_CONF_ENV = ac_cv_path_HELP2MAN=""
 
+ifeq ($(BR2_STATIC_LIBS),y)
+FWUP_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libconfuse libarchive`"
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))