From patchwork Sat Dec 30 22:31:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 854172 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z8J915MgYz9t2d for ; Sun, 31 Dec 2017 09:31:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 78F1587505; Sat, 30 Dec 2017 22:31:42 +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 fXFkShhBt5uO; Sat, 30 Dec 2017 22:31:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CF28286411; Sat, 30 Dec 2017 22:31:39 +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 379031C26F4 for ; Sat, 30 Dec 2017 22:31:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 32D6886411 for ; Sat, 30 Dec 2017 22:31:39 +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 pLxPSNr+4ujl for ; Sat, 30 Dec 2017 22:31:36 +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 7330E86408 for ; Sat, 30 Dec 2017 22:31:36 +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 5979A44004E; Sun, 31 Dec 2017 00:31:34 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Sun, 31 Dec 2017 00:31:29 +0200 Message-Id: <969aa23e24cae04dd3d71c0d29c48445b0335a4d.1514673089.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.15.1 Subject: [Buildroot] [PATCH] json-c: fix build without threads support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 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" An uClibc toolchain that does not support threads emits a warning when _REENTRANT is defined. This breaks build with -Werror. Remove -Werror as a workaround to fix the build. This issue as been reported upstream (https://github.com/json-c/json-c/issues/396). Fixes: http://autobuild.buildroot.net/results/606/60683141f2ef320a28820c4cd65d2b951123b147/ http://autobuild.buildroot.net/results/969/969faba96d94c1bda7e06b005d8f3a3f7175a0a2/ Signed-off-by: Baruch Siach --- .../json-c/0001-configure.ac-remove-Werror.patch | 32 ++++++++++++++++++++++ package/json-c/json-c.mk | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 package/json-c/0001-configure.ac-remove-Werror.patch diff --git a/package/json-c/0001-configure.ac-remove-Werror.patch b/package/json-c/0001-configure.ac-remove-Werror.patch new file mode 100644 index 000000000000..e877671519d2 --- /dev/null +++ b/package/json-c/0001-configure.ac-remove-Werror.patch @@ -0,0 +1,32 @@ +From 79d862ccaabc6620ce4b2783a44d6014ae837df9 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Sun, 31 Dec 2017 00:01:37 +0200 +Subject: [PATCH] configure.ac: remove -Werror + +The unconditional _REENTRANT macro causes a warning when building with a +no-threads toolchain. Remove -Werror to fix the build. + +Signed-off-by: Baruch Siach +--- +Patch status: not upstreamable +Issue reported upstream: https://github.com/json-c/json-c/issues/396 +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 024c5aa0d687..74caa4d99e15 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -165,7 +165,7 @@ AS_IF([test "x$enable_Bsymbolic" = "xcheck"], + AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions]) + AC_SUBST(JSON_BSYMBOLIC_LDFLAGS) + +-AX_APPEND_COMPILE_FLAGS([-Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations]) ++AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-qual -Wno-error=deprecated-declarations]) + AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-string -Wno-unused-parameter]) + AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE -D_REENTRANT]) + +-- +2.15.1 + diff --git a/package/json-c/json-c.mk b/package/json-c/json-c.mk index d8007b869133..046529560861 100644 --- a/package/json-c/json-c.mk +++ b/package/json-c/json-c.mk @@ -10,5 +10,9 @@ JSON_C_INSTALL_STAGING = YES JSON_C_LICENSE = MIT JSON_C_LICENSE_FILES = COPYING +# Patching configure.ac +JSON_C_AUTORECONF = YES +HOST_JSON_C_AUTORECONF = YES + $(eval $(autotools-package)) $(eval $(host-autotools-package))