From 2c4d7697407943061209a4f1816f19acbe4d5be6 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 4 Aug 2014 10:45:49 +0200 Subject: gnutls: hack to use libpthread gnutls use libgcrypt and should init gcrypt's mutex functionality but does not. This leads to asserts in libgcrypt: Ohhhh jeeee: Assertion `pool_is_locked' failed (random-csprng.c:615:mix_pool) This patch hacks autoconf to always use libpthread and thus initalizes libgcrypt with working mutex functions. --- recipes-support/gnutls/files/libpthreadhack.patch | 34 +++++++++++++++++++++++ recipes-support/gnutls/gnutls_%.bbappend | 3 ++ 2 files changed, 37 insertions(+) create mode 100644 recipes-support/gnutls/files/libpthreadhack.patch create mode 100644 recipes-support/gnutls/gnutls_%.bbappend (limited to 'recipes-support') diff --git a/recipes-support/gnutls/files/libpthreadhack.patch b/recipes-support/gnutls/files/libpthreadhack.patch new file mode 100644 index 0000000..0086a3a --- /dev/null +++ b/recipes-support/gnutls/files/libpthreadhack.patch @@ -0,0 +1,34 @@ +diff -Naur gnutls-2.12.23.orig/lib/configure.ac gnutls-2.12.23/lib/configure.ac +--- gnutls-2.12.23.orig/lib/configure.ac 2014-08-01 19:01:35.243966651 +0200 ++++ gnutls-2.12.23/lib/configure.ac 2014-08-01 19:01:49.398773492 +0200 +@@ -124,7 +124,18 @@ + lgl_INIT + + AC_CHECK_FUNCS(getrusage,,) +-AC_LIB_HAVE_LINKFLAGS(pthread,, [#include ], [pthread_mutex_lock (0);]) ++ ++#hack: the cross compile here thinks libpthread is not available. ++#AC_LIB_HAVE_LINKFLAGS(pthread,, [#include ], [pthread_mutex_lock (0);]) ++HAVE_LIBPTHREAD=yes ++LIBPTHREAD=-lpthread ++LTLIBPTHREAD=-lpthread ++LIBPTHREAD_PREFIX=/mnt/sdc2/oe-disk/oe-core_V2.3/build/out-eglibc/sysroots/colibri-t30/usr ++AC_DEFINE([HAVE_LIBPTHREAD], 1, [Define if you have the $1 library.]) ++AC_SUBST([HAVE_LIBPTHREAD]) ++AC_SUBST([LIBPTHREAD]) ++AC_SUBST([LTLIBPTHREAD]) ++AC_SUBST([LIBPTHREAD_PREFIX]) + + LIBGNUTLS_LIBS="-lgnutls $LIBS" + LIBGNUTLS_CFLAGS="" +diff -Naur gnutls-2.12.23.orig/lib/gnutls_int.h gnutls-2.12.23/lib/gnutls_int.h +--- gnutls-2.12.23.orig/lib/gnutls_int.h 2012-11-08 17:11:15.000000000 +0100 ++++ gnutls-2.12.23/lib/gnutls_int.h 2014-08-01 20:58:48.406146057 +0200 +@@ -28,6 +28,7 @@ + + #ifdef HAVE_CONFIG_H + #include ++#include "config.h" + #endif + + #include diff --git a/recipes-support/gnutls/gnutls_%.bbappend b/recipes-support/gnutls/gnutls_%.bbappend new file mode 100644 index 0000000..4924aa3 --- /dev/null +++ b/recipes-support/gnutls/gnutls_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://libpthreadhack.patch" -- cgit v1.2.3