diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-03-03 18:21:58 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-03-03 21:15:02 +0100 |
commit | bb0e6ca0a85f41942ceb6e99cb4202396c326999 (patch) | |
tree | 9567677bdaa24651a06c91932317d2bd30db426f | |
parent | c984dee8253eeac830e30d7917dbe1dfc7d44eb1 (diff) | |
download | ptxdist-bb0e6ca0a85f41942ceb6e99cb4202396c326999.tar.gz ptxdist-bb0e6ca0a85f41942ceb6e99cb4202396c326999.tar.xz |
json-c: fix building with gcc-7.x icecc
Icecc splits preprocessing and compiling. As a result comments are no
longer available at compile time and building fails with:
json_object.c: In function 'json_object_get_int64':
json_object.c:698:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
json_object.c:701:2: note: here
cc1: all warnings being treated as errors
The code uses comments that prevent building with '-C' so use remove
-Werror instead.
Note: Setting CFLAGS during configure does not work. -Werror is added later
in the commandline.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | patches/json-c-0.13-20171207/0001-configure.ac-remove-Werror.patch | 32 | ||||
l--------- | patches/json-c-0.13-20171207/autogen.sh | 1 | ||||
-rw-r--r-- | patches/json-c-0.13-20171207/series | 4 | ||||
-rw-r--r-- | rules/json-c.make | 4 |
4 files changed, 37 insertions, 4 deletions
diff --git a/patches/json-c-0.13-20171207/0001-configure.ac-remove-Werror.patch b/patches/json-c-0.13-20171207/0001-configure.ac-remove-Werror.patch new file mode 100644 index 000000000..6effae982 --- /dev/null +++ b/patches/json-c-0.13-20171207/0001-configure.ac-remove-Werror.patch @@ -0,0 +1,32 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Sat, 3 Mar 2018 21:13:12 +0100 +Subject: [PATCH] configure.ac: remove -Werror + +Building with -Werror fails for gcc-7.x and icecc. + +Icecc splits preprocessing and compiling. As a result comments are no +longer available at compile time and building fails with: + +json_object.c: In function 'json_object_get_int64': +json_object.c:698:6: error: this statement may fall through [-Werror=implicit-fallthrough=] +json_object.c:701:2: note: here +cc1: all warnings being treated as errors + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + 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]) + diff --git a/patches/json-c-0.13-20171207/autogen.sh b/patches/json-c-0.13-20171207/autogen.sh new file mode 120000 index 000000000..9f8a4cb7d --- /dev/null +++ b/patches/json-c-0.13-20171207/autogen.sh @@ -0,0 +1 @@ +../autogen.sh
\ No newline at end of file diff --git a/patches/json-c-0.13-20171207/series b/patches/json-c-0.13-20171207/series new file mode 100644 index 000000000..bdfd419ad --- /dev/null +++ b/patches/json-c-0.13-20171207/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-configure.ac-remove-Werror.patch +# 229bc9ecec2d6d1a80c65f5369241d77 - git-ptx-patches magic diff --git a/rules/json-c.make b/rules/json-c.make index 0b7fe4626..166392e1f 100644 --- a/rules/json-c.make +++ b/rules/json-c.make @@ -29,10 +29,6 @@ JSON_C_LICENSE := MIT # Prepare # ---------------------------------------------------------------------------- -JSON_C_CONF_ENV := \ - $(CROSS_ENV) \ - CFLAGS="-O2 -g -Wno-error" - # # autoconf # |