[Buildroot] [PATCH] openssh: fix static linking

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Sep 9 19:34:35 UTC 2014


Hello,

On Tue, 9 Sep 2014 18:29:31 +0000, ANDY KENNEDY wrote:

> 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 at adtran.com>

Sorry, but it does not make sense, because:

ifeq ($(BR2_PREFER_STATIC_LIB),y)
SHARED_STATIC_LIBS_OPTS = --enable-static --disable-shared
TARGET_CFLAGS += -static
TARGET_CXXFLAGS += -static
TARGET_LDFLAGS += -static
else
SHARED_STATIC_LIBS_OPTS = --enable-static --enable-shared
endif

So, TARGET_CFLAGS does have -static.

Please make sure to test your patches against the latest master. I'm
sure you're again testing against 2014.02, and there has been quite a
few changes since then in terms of static library support.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list