From patchwork Tue May 14 11:57:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 243687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id C58B12C00C2 for ; Tue, 14 May 2013 21:56:38 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D71BCA01EF; Tue, 14 May 2013 11:56:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4WzZMhXckdS6; Tue, 14 May 2013 11:56:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 277D8A005F; Tue, 14 May 2013 11:56:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 25D358F7A0 for ; Tue, 14 May 2013 11:56:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6DB518C85E for ; Tue, 14 May 2013 11:56:33 +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 hxk4pAVYCdbe for ; Tue, 14 May 2013 11:56:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6455A8C7B4 for ; Tue, 14 May 2013 11:56:32 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id t59so367171wes.38 for ; Tue, 14 May 2013 04:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=SIZKlYQFnZ/dwIsF+cGRXbhfo9+btevNKLuKGL64h4A=; b=a2icpVdGY0yQiKIHPFAvsEDrmVmexvwDBw9y5gqlVebTwTjsOzr+PMHmeHUodoy7cc BKT/rAwHTmpJ84xof1HzWnO1Yp4KCp6ATLoxs+pdp3pOMY9LUuNZGIPqeRPDjOvwiV+z 6Ztsp5avf58Q9m0SvYkZo9ow9FWV6X01K+rtPnOLgVyN3EX3pvKskyHun80nG+Ec6gLf 5M3o5QtMwf84Gm//QZg9gZaM1IF5CiOBwXL/jTdldwXJmrkHy+UMB2PJgYUe06gCh5Fq 1TcT+NLOoz7o4LSAIp+Ht4X/SfLW35/fwkgMQG6YJrzsZif92rgPWVlJlkOoIfD9NQzw u7zw== X-Received: by 10.180.205.200 with SMTP id li8mr5882401wic.15.1368532590980; Tue, 14 May 2013 04:56:30 -0700 (PDT) Received: from smartin-de.aldebaran.lan (20-87-190-109.dsl.ovh.fr. [109.190.87.20]) by mx.google.com with ESMTPSA id ff10sm23269686wib.10.2013.05.14.04.56.30 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 May 2013 04:56:30 -0700 (PDT) From: Samuel Martin To: buildroot@busybox.net Date: Tue, 14 May 2013 13:57:10 +0200 Message-Id: <1368532631-12983-2-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1368532631-12983-1-git-send-email-s.martin49@gmail.com> References: <1368532631-12983-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Signed-off-by: Samuel Martin --- ...ib2-0004-fix-build-when-no-thread-support.patch | 40 ++++++++++++++++++++++ package/libglib2/libglib2.mk | 3 ++ 2 files changed, 43 insertions(+) create mode 100644 package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch diff --git a/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch b/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch new file mode 100644 index 0000000..e1de20a --- /dev/null +++ b/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch @@ -0,0 +1,40 @@ +Fix gio/gcancellable.c build when thread support is disabled + +Signed-off-by: "Samuel Martin" +--- +--- a/gio/gcancellable.c 2013-05-14 10:49:10.656384566 +0200 ++++ b/gio/gcancellable.c 2013-05-14 12:38:46.339432786 +0200 +@@ -263,6 +263,7 @@ g_cancellable_reset (GCancellable *cance + + g_return_if_fail (G_IS_CANCELLABLE (cancellable)); + ++#ifdef G_THREADS_ENABLED + G_LOCK(cancellable); + + priv = cancellable->priv; +@@ -282,6 +283,7 @@ g_cancellable_reset (GCancellable *cance + priv->cancelled = FALSE; + } + G_UNLOCK(cancellable); ++#endif + } + + /** +@@ -612,6 +614,9 @@ g_cancellable_disconnect (GCancellable + if (handler_id == 0 || cancellable == NULL) + return; + ++ g_return_if_fail (G_IS_CANCELLABLE (cancellable)); ++ ++#ifdef G_THREADS_ENABLED + G_LOCK (cancellable); + + priv = cancellable->priv; +@@ -625,6 +630,7 @@ g_cancellable_disconnect (GCancellable + + g_signal_handler_disconnect (cancellable, handler_id); + G_UNLOCK (cancellable); ++#endif + } + + typedef struct { diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index d78e8ec..3ac78ba 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -67,6 +67,9 @@ HOST_LIBGLIB2_CONF_OPT = \ --disable-tests LIBGLIB2_CONF_OPT += --disable-tests +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + LIBGLIB2_CONF_OPT += --with-threads=none --disable-threads +endif LIBGLIB2_DEPENDENCIES = host-pkgconf host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext) host-gettext