From patchwork Tue Sep 12 11:43:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 812806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xs2y820g4z9s5L for ; Tue, 12 Sep 2017 21:44:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A1CFB2D8C7; Tue, 12 Sep 2017 11:44:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NIF9GLU-ji98; Tue, 12 Sep 2017 11:44:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 99DAA22CD3; Tue, 12 Sep 2017 11:44:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D6FFB1BF238 for ; Tue, 12 Sep 2017 11:44:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D15A287D98 for ; Tue, 12 Sep 2017 11:44:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ArUdjCURitzr for ; Tue, 12 Sep 2017 11:44:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DD0882F4D for ; Tue, 12 Sep 2017 11:44:07 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 23CC04402AD; Tue, 12 Sep 2017 14:44:04 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Tue, 12 Sep 2017 14:43:58 +0300 Message-Id: <502def3c81c8bc65ada11c1bb87e65725b8b8900.1505216638.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH] libcurl: fix build without threads X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When c-ares is not enabled libcurl enables the threaded DNS resolver by default. Make sure the threaded resolvers is disabled when the toolchain does not support threads. Add upstream patch that fixes the configure option for disabling the threaded resolver. Fixes: http://autobuild.buildroot.net/results/39f/39fa63fb2ecb75e4b2521d1ee3dfa357c4e5c594/ http://autobuild.buildroot.net/results/dfd/dfd296086d0d6bed73b92fe2fa4ba5434dddf796/ Signed-off-by: Baruch Siach --- ...confopts.m4-fix-disable-threaded-resolver.patch | 40 ++++++++++++++++++++++ package/libcurl/libcurl.mk | 8 +++++ 2 files changed, 48 insertions(+) create mode 100644 package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch diff --git a/package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch b/package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch new file mode 100644 index 000000000000..c7a563e8258f --- /dev/null +++ b/package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch @@ -0,0 +1,40 @@ +From 3cb4bb6b5fb8a936cb69e2e9ea6a4e692122abb9 Mon Sep 17 00:00:00 2001 +From: Jakub Zakrzewski +Date: Tue, 15 Aug 2017 13:21:33 -0400 +Subject: [PATCH] curl-confopts.m4: fix --disable-threaded-resolver + +Closes https://github.com/curl/curl/issues/1784 + +Signed-off-by: Baruch Siach +--- +Upstream status: commit 3cb4bb6b5fb + + m4/curl-confopts.m4 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 +index d77a884d58bd..6dcd0f1a6794 100644 +--- a/m4/curl-confopts.m4 ++++ b/m4/curl-confopts.m4 +@@ -37,14 +37,14 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver]) + AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]), + OPT_THRES=$enableval) + case "$OPT_THRES" in +- *) +- dnl configure option not specified +- want_thres="yes" +- ;; + no) + dnl --disable-threaded-resolver option used + want_thres="no" + ;; ++ *) ++ dnl configure option not specified ++ want_thres="yes" ++ ;; + esac + AC_MSG_RESULT([$want_thres]) + ]) +-- +2.14.1 + diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk index 64110cccf072..d7f860eb1b2a 100644 --- a/package/libcurl/libcurl.mk +++ b/package/libcurl/libcurl.mk @@ -14,6 +14,8 @@ LIBCURL_DEPENDENCIES = host-pkgconf \ LIBCURL_LICENSE = curl LIBCURL_LICENSE_FILES = COPYING LIBCURL_INSTALL_STAGING = YES +# Patching m4/curl-confopts.m4 +LIBCURL_AUTORECONF = YES # We disable NTLM support because it uses fork(), which doesn't work # on non-MMU platforms. Moreover, this authentication method is @@ -22,6 +24,12 @@ LIBCURL_INSTALL_STAGING = YES LIBCURL_CONF_OPTS = --disable-manual --disable-ntlm-wb \ --enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBCURL_CONF_OPTS += --enable-threaded-resolver +else +LIBCURL_CONF_OPTS += --disable-threaded-resolver +endif + ifeq ($(BR2_PACKAGE_LIBCURL_VERBOSE),y) LIBCURL_CONF_OPTS += --enable-verbose else