atftp: fix static linking
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Thu, 10 Jul 2014 13:59:23 +0000 (10:59 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 10 Jul 2014 14:59:00 +0000 (16:59 +0200)
Readline uses ncurses hence pull it in, also needs to explicitly link
against libpthread. Fixes:
http://autobuild.buildroot.net/results/259/2592612be38a2c1dde21b44be2ecf25d1cc5211a/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/atftp/atftp.mk

index 1d6a7c363217b7b7fdebc3a70d07cf88011e4dbd..a018b9d4f1ae6a4c4f8d49ae4aa215ba576f7234 100644 (file)
@@ -9,10 +9,15 @@ ATFTP_SITE = http://sourceforge.net/projects/atftp/files/
 ATFTP_LICENSE = GPLv2+
 ATFTP_LICENSE_FILES = LICENSE
 ATFTP_CONF_OPT = --disable-libwrap --disable-mtftp
+# For static we need to explicitly link against libpthread
+ATFTP_LIBS = -lpthread
+ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)"
 
 ifeq ($(BR2_PACKAGE_READLINE),y)
 ATFTP_DEPENDENCIES += readline
 ATFTP_CONF_OPT += --enable-libreadline
+# For static, readline links with ncurses
+ATFTP_LIBS += -lncurses
 else
 ATFTP_CONF_OPT += --disable-libreadline
 endif