Skip to contentSkip to conversation

libssh2: fix pkg-config info for mbedtls backend

PATCH New Baruch Siach 3 participants 7 messages Mar 20, 2018 – Apr 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libssh2: fix pkg-config info for mbedtls backend

The libssh2.pc file did not contain the needed info for static link with libssh2. Add a patch fixing that.

Fixes (qemu):
http://autobuild.buildroot.net/results/634/6346b25be2844f9ef722e52040ac1b43d9c38899/

---
 .../0002-acinclude.m4-add-mbedtls-to-LIBS.patch    | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/libssh2/0002-acinclude.m4-add-mbedtls-to-LIBS.patch
package/libssh2/0002-acinclude.m4-add-mbedtls-to-LIBS.patch new file +31 -0
new file mode 100644
index 000000000000..76e08c51a937
@@ -0,0 +1,31 @@
+From f4846473f0f0ec313f8ed7ff4cd9f59c1741465d Mon Sep 17 00:00:00 2001
+From: Baruch Siach <[email protected]>
+Date: Tue, 20 Mar 2018 20:21:53 +0200
+Subject: [PATCH] acinclude.m4: add mbedtls to LIBS
+
+This is useful for static builds so that the Libs.private field in
+libssh2.pc contains correct info for the benefit of pkg-config users.
+Static link with libssh2 requires this information.
+
+Signed-off-by: Baruch Siach <[email protected]>
+---
+Upstream status: https://github.com/libssh2/libssh2/pull/242
+
+ acinclude.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index c0e89a1a0c98..02c70845d27c 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -441,6 +441,7 @@ m4_case([$1],
+ [mbedtls], [
+   LIBSSH2_LIB_HAVE_LINKFLAGS([mbedcrypto], [], [#include <mbedtls/version.h>], [
+     AC_DEFINE(LIBSSH2_MBEDTLS, 1, [Use $1])
++    LIBS="$LIBS $LIBMBEDCRYPTO"
+     found_crypto="$1"
+     support_clear_memory=yes
+   ])
+-- 
+2.16.2
+
Signature · 1 line
2.16.2
#1 lore raw

PATCH 2/2 qemu: add libssh2 optional dependency

Make sure that qemu uses libssh2 when libssh2 is enabled, for build consistency.

Cc Francois Perrad <[email protected]>
---
 package/qemu/qemu.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/qemu/qemu.mk +7 -0
index 345ef526681a..c3a7e7738ee6 100644
@@ -212,6 +212,13 @@ else
 QEMU_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSSH2),y)
+QEMU_OPTS += --enable-libssh2
+QEMU_DEPENDENCIES += libssh2
+else
+QEMU_OPTS += --disable-libssh2
+endif
+
 # Override CPP, as it expects to be able to call it like it'd
 # call the compiler.
 define QEMU_CONFIGURE_CMDS
Signature · 1 line
2.16.2
#2 lore raw

PATCH 2/2 qemu: add libssh2 optional dependency

Hi Baruch,

Le 20/03/2018 ? 19:46, Baruch Siach a ?crit?:

Quoted 5 lines

Make sure that qemu uses libssh2 when libssh2 is enabled, for build consistency.

Cc Francois Perrad <[email protected]>

Best regards,
Romain

Quoted 23 lines
---
 package/qemu/qemu.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/qemu/qemu.mk +7 -0
index 345ef526681a..c3a7e7738ee6 100644
@@ -212,6 +212,13 @@ else
 QEMU_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSSH2),y)
+QEMU_OPTS += --enable-libssh2
+QEMU_DEPENDENCIES += libssh2
+else
+QEMU_OPTS += --disable-libssh2
+endif
+
 # Override CPP, as it expects to be able to call it like it'd
 # call the compiler.
 define QEMU_CONFIGURE_CMDS
#5 lore raw

PATCH 1/2 libssh2: fix pkg-config info for mbedtls backend

In reply to Baruch Siach
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The libssh2.pc file did not contain the needed info for static link with libssh2. Add a patch fixing that.

Fixes (qemu):
http://autobuild.buildroot.net/results/634/6346b25be2844f9ef722e52040ac1b43d9c38899/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/2 libssh2: fix pkg-config info for mbedtls backend

In reply to Baruch Siach
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The libssh2.pc file did not contain the needed info for static link with libssh2. Add a patch fixing that.

Fixes (qemu):
http://autobuild.buildroot.net/results/634/6346b25be2844f9ef722e52040ac1b43d9c38899/

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard