* [Buildroot] [PATCH] json-c: fix build without threads support
@ 2017-12-30 22:31 Baruch Siach
2017-12-31 11:47 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2017-12-30 22:31 UTC (permalink / raw)
To: 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 <baruch@tkos.co.il>
---
.../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 <baruch@tkos.co.il>
+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 <baruch@tkos.co.il>
+---
+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))
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] json-c: fix build without threads support
2017-12-30 22:31 [Buildroot] [PATCH] json-c: fix build without threads support Baruch Siach
@ 2017-12-31 11:47 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-12-31 11:47 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 31 Dec 2017 00:31:29 +0200, Baruch Siach wrote:
> +# Patching configure.ac
> +JSON_C_AUTORECONF = YES
> +HOST_JSON_C_AUTORECONF = YES
I've dropped this last line, because it is implied by JSON_C_AUTORECONF
= YES, and then I've applied. Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-31 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 22:31 [Buildroot] [PATCH] json-c: fix build without threads support Baruch Siach
2017-12-31 11:47 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox