Patchwork bind: fix build failure for static+openssl

login
register
mail settings
Submitter Gustavo Zacarias
Date May 5, 2013, 8:54 p.m.
Message ID <1367787251-725-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/241530/
State Accepted
Commit 80ebf12906afc3a1e5f4e5682d4c5dc0779a556a
Headers show

Comments

Gustavo Zacarias - May 5, 2013, 8:54 p.m.
Bind just links to openssl libraries without checking it's dependencies.
This works when doing shared builds since the linker picks the deps up,
but fails badly on static builds.
So just define LIBS="-lz" when openssl is enabled. Fixes:
http://autobuild.buildroot.net/results/a9a166f932e0b6727ae8e470ce748418797875b9/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/bind/bind.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Peter Korsgaard - May 5, 2013, 8:58 p.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Bind just links to openssl libraries without checking it's
 Gustavo> dependencies.  This works when doing shared builds since the
 Gustavo> linker picks the deps up, but fails badly on static builds.
 Gustavo> So just define LIBS="-lz" when openssl is enabled. Fixes:
 Gustavo> http://autobuild.buildroot.net/results/a9a166f932e0b6727ae8e470ce748418797875b9/

Committed, thanks.

Patch

diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index 8a66534..f689594 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -30,7 +30,7 @@  endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	BIND_DEPENDENCIES += openssl
-	BIND_CONF_OPT += --with-openssl=$(STAGING_DIR)/usr
+	BIND_CONF_OPT += --with-openssl=$(STAGING_DIR)/usr LIBS="-lz"
 else
 	BIND_CONF_OPT += --with-openssl=no
 endif