diff mbox

[2/3] gnutls: make it non-wchar friendly

Message ID 1356530149-12305-2-git-send-email-gustavo@zacarias.com.ar
State Accepted
Commit f1b86cef9884894df26ed25efaabe254f8f0754b
Headers show

Commit Message

Gustavo Zacarias Dec. 26, 2012, 1:55 p.m. UTC
Make gnutls work for non-wchar toolchains.
It's just a matter of throwing a helping hand to configure.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/connman/Config.in         |    2 +-
 package/gnutls/Config.in          |    4 ----
 package/gnutls/gnutls.mk          |    5 ++++-
 package/libsoup/Config.in         |    2 +-
 package/network-manager/Config.in |    2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)

Comments

Peter Korsgaard Feb. 5, 2013, 10:17 a.m. UTC | #1
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Make gnutls work for non-wchar toolchains.
 Gustavo> It's just a matter of throwing a helping hand to configure.

While this makes gnutls build, it doesn't actually work as there's no
rpl_wctomb implementation so the .so ends up with an undefined reference
to wctomb:

./host/usr/bin/arm-linux-nm -D staging/usr/lib/libgnutls.so.28|grep wctomb
         U wctomb

Causing linker errors for packages trying to use it:

  CCLD   msmtp
host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgnutls.so: undefined reference to `wctomb'
collect2: ld returned 1 exit status

So I'll have to revert this.
diff mbox

Patch

diff --git a/package/connman/Config.in b/package/connman/Config.in
index 93f9ab5..4c9741b 100644
--- a/package/connman/Config.in
+++ b/package/connman/Config.in
@@ -5,7 +5,7 @@  config BR2_PACKAGE_CONNMAN
 	select BR2_PACKAGE_IPTABLES
 	select BR2_PACKAGE_GNUTLS
 	depends on !(BR2_UCLIBC_VERSION_0_9_31 || BR2_UCLIBC_VERSION_0_9_32)
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_INET_IPV6
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in
index 556caea..cedf120 100644
--- a/package/gnutls/Config.in
+++ b/package/gnutls/Config.in
@@ -1,12 +1,8 @@ 
 config BR2_PACKAGE_GNUTLS
 	bool "gnutls"
 	select BR2_PACKAGE_LIBGCRYPT
-	depends on BR2_USE_WCHAR
 	help
 	  GnuTLS is a secure communications library implementing the SSL
 	  and TLS protocols and technologies around them.
 
 	  http://www.gnu.org/software/gnutls/gnutls.html
-
-comment "gnutls requires a toolchain with WCHAR support"
-	depends on !BR2_USE_WCHAR
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 2634642..506d7f5 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -10,7 +10,10 @@  GNUTLS_SITE = $(BR2_GNU_MIRROR)/gnutls
 GNUTLS_LICENSE = GPLv3+ LGPLv2.1+
 GNUTLS_LICENSE_FILES = COPYING lib/COPYING
 GNUTLS_DEPENDENCIES = host-pkgconf libgcrypt $(if $(BR2_PACKAGE_ZLIB),zlib)
-GNUTLS_CONF_ENV = acl_cv_rpath=no
+GNUTLS_CONF_ENV = acl_cv_rpath=no \
+	ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
+	gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
+	gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no)
 GNUTLS_CONF_OPT = --with-libgcrypt --without-libgcrypt-prefix \
 		--without-p11-kit --disable-rpath
 GNUTLS_INSTALL_STAGING = YES
diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in
index 57b425f..c3b4ceb 100644
--- a/package/libsoup/Config.in
+++ b/package/libsoup/Config.in
@@ -1,6 +1,6 @@ 
 config BR2_PACKAGE_LIBSOUP
 	bool "libsoup"
-	depends on BR2_USE_WCHAR # glib2 and gnutls
+	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
index e2324d6..f2544da 100644
--- a/package/network-manager/Config.in
+++ b/package/network-manager/Config.in
@@ -4,7 +4,7 @@  config BR2_PACKAGE_NETWORK_MANAGER
 	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS_GLIB