aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-21 12:23:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-10 12:21:33 +0100
commit4b159968d6181155c270e2547706933b9df4d80b (patch)
tree8ec90b345ad357f86885b18ce46591f3cc96b489
parent7f14d7de88da7e6e1b6934f9c608d67d80dc8398 (diff)
downloadopenembedded-core-contrib-4b159968d6181155c270e2547706933b9df4d80b.tar.gz
puzzles: Add -Wno-error=format-overflow if compiler supports it
Fixes build with gcc7 in such a way that it keeps working with older compilers who dont support -Wno-error=format-overflow= option Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch32
-rw-r--r--meta/recipes-sato/puzzles/puzzles_git.bb3
2 files changed, 34 insertions, 1 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch b/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch
new file mode 100644
index 0000000000..d40a3b1ef9
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch
@@ -0,0 +1,32 @@
+From 337799e40350b3db2441cc98f65ec36a74dfb356 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Apr 2017 12:18:08 -0700
+Subject: [PATCH] Use -Wno-error=format-overflow= if the compiler supports it
+
+we need this warning to be suppressed with gcc7+
+however older compilers dont support it so we need
+a way to disble it only if compiler supports it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3a38c95..bb9035e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,7 +42,7 @@ fi
+ if test "x$GCC" = "xyes"; then
+ AC_MSG_CHECKING([for usable gcc warning flags])
+ gccwarningflags=
+- for flag in -Wall -Werror -std=c89 -pedantic; do
++ for flag in -Wall -Werror -std=c89 -pedantic -Wno-error=format-overflow=; do
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS$gccwarningflags $flag $GTK_CFLAGS"
+--
+2.12.2
+
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb
index a25c00760a..7b8495ff75 100644
--- a/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -14,7 +14,8 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
file://0001-Use-labs-instead-of-abs.patch \
file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
file://0001-Clarify-conditions-to-avoid-compiler-errors.patch \
-"
+ file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
+ "
SRCREV = "8dfe5cec31e784e4ece2955ecc8cc35ee7e8fbb3"
PE = "1"
PV = "0.0+git${SRCPV}"