Skip to contentSkip to conversation

atftp: fix static linking

PATCH New Gustavo Zacarias 2 participants 3 messages Jul 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atftp: fix static linking

Openssl uses libz hence pull it in, also needs to explicitly link against libpthread. Fixes:
http://autobuild.buildroot.net/results/259/2592612be38a2c1dde21b44be2ecf25d1cc5211a/

---
 package/atftp/atftp.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/atftp/atftp.mk +5 -0
index 1d6a7c3..a018b9d 100644
@@ -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
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 1/1 atftp: fix static linking

Hi Gustavo,

Quoted 1 line · Gustavo Zacarias

Openssl uses libz hence pull it in,

I don't see openssl or libz in this patch. But...

Quoted 16 lines

also needs to explicitly link
against libpthread. Fixes:
http://autobuild.buildroot.net/results/259/2592612be38a2c1dde21b44be2ecf25d1cc5211a/

---
 package/atftp/atftp.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/atftp/atftp.mk +0 -0
index 1d6a7c3..a018b9d 100644
@@ -9,10 +9,15 @@ ATFTP_SITE = http://sourceforge.net/projects/atftp/files/
 ATFTP_LICENSE = GPLv2+
 ATFTP_LICENSE_FILES = LICENSE

package/atftp/atftp.mk ATFTP_SITE = http://sourceforge.net/projects/atftp/files/ · line 20

Quoted 10 lines
package/atftp/atftp.mk +5 -0
 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

... ncurses in not mentioned in the commit log.

package/atftp/atftp.mk ATFTP_SITE = http://sourceforge.net/projects/atftp/files/ · line 23

Quoted 3 lines
package/atftp/atftp.mk +0 -0
 else
 ATFTP_CONF_OPT += --disable-libreadline
 endif

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 atftp: fix static linking

Quoted 6 lines · Baruch Siach

Hi Gustavo,

Quoted 1 line · Gustavo Zacarias

Openssl uses libz hence pull it in,

I don't see openssl or libz in this patch. But...

Brain fart with the inadyn static tests, i'll resend :) Thanks.
Regards.