package/libssh2: fix build with openssl and atomic
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 18 May 2019 09:53:23 +0000 (11:53 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 18 May 2019 19:58:18 +0000 (21:58 +0200)
Fixes:
 - http://autobuild.buildroot.org/results/e381eefa39307f1c8eb22f872df438b3fe0352dd

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libssh2/libssh2.mk

index ed0dd40bec349b40735bb46c0ead7a826eb07550..abee1f8c77c951913f20c74f8536fc76a571a955 100644 (file)
@@ -26,9 +26,12 @@ LIBSSH2_CONF_OPTS += --with-libgcrypt-prefix=$(STAGING_DIR)/usr \
 # linking
 LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
 else ifeq ($(BR2_PACKAGE_LIBSSH2_OPENSSL),y)
-LIBSSH2_DEPENDENCIES += openssl
+LIBSSH2_DEPENDENCIES += host-pkgconf openssl
 LIBSSH2_CONF_OPTS += --with-libssl-prefix=$(STAGING_DIR)/usr \
        --with-crypto=openssl
+# configure.ac forgets to link to dependent libraries of openssl breaking static
+# linking
+LIBSSH2_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 endif
 
 # Add zlib support if enabled