Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] openssh: fix static linking
@ 2014-09-09 18:29 ANDY KENNEDY
  2014-09-09 18:37 ` Baruch Siach
  2014-09-09 19:34 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: ANDY KENNEDY @ 2014-09-09 18:29 UTC (permalink / raw)
  To: buildroot

When BR2_PREFER_STATIC_LIB is set, openssl is a static library, openssh
attempts to build dynamically as the LDFLAGS are dropped out of this build.
If PREFER_STATIC is set, add back in --static to the LDFLAGS of openssh
to make the linker happy.

Signed-off-by:  Andy Kennedy <andy.kennedy@adtran.com>
---
diff -Naur a/package/openssh/openssh.mk b/package/openssh/openssh.mk
--- a/package/openssh/openssh.mk	2014-02-27 14:51:23.000000000 -0600
+++ b/package/openssh/openssh.mk	2014-09-09 12:09:57.043850866 -0500
@@ -6,10 +6,18 @@
 
 OPENSSH_VERSION = 6.5p1
 OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
-OPENSSH_CONF_ENV = LD="$(TARGET_CC)" LDFLAGS="$(TARGET_CFLAGS)"
+OPENSSH_CONF_ENV = LD="$(TARGET_CC)"
 OPENSSH_CONF_OPT = --disable-lastlog --disable-utmp \
 		--disable-utmpx --disable-wtmp --disable-wtmpx --disable-strip
 
+OPENSSH_LDFLAGS_FOR_CONF = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+OPENSSH_LDFLAGS_FOR_CONF += --static
+endif
+
+OPENSSH_CONFIGURE_ENV += LDFLAGS="$(OPENSSH_LDFLAGS_FOR_CONF)"
+
 OPENSSH_DEPENDENCIES = zlib openssl
 
 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-09 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 18:29 [Buildroot] [PATCH] openssh: fix static linking ANDY KENNEDY
2014-09-09 18:37 ` Baruch Siach
2014-09-09 19:17   ` ANDY KENNEDY
2014-09-09 19:34 ` Thomas Petazzoni
2014-09-09 19:40   ` ANDY KENNEDY
2014-09-09 20:18     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox