summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2017-03-16 16:30:23 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-17 16:53:04 +0000
commit6dcf5c6e6eadd0a572f9aa61783b54ccd39f0378 (patch)
tree6543d24aa5d9259c57658653e729565da0935e0a /meta
parenta861ee210c37c9853d5266e42716edfa88ec7847 (diff)
downloadpoky-6dcf5c6e6eadd0a572f9aa61783b54ccd39f0378.tar.gz
cmake: Backport fix to enable -Wformat-security
Backport build fix that removes -Wformat-security for specific tests. Enable "-Wformat-security" for cmake in security_flags.inc. (From OE-Core rev: b00f9c77ebd211578ba133c28abcbc5752305e25) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/security_flags.inc1
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc1
-rw-r--r--meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch33
3 files changed, 34 insertions, 1 deletions
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index b0a775450f..da1c3a01db 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -91,7 +91,6 @@ SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
91 91
92# Recipes which fail to compile when elevating -Wformat-security to an error 92# Recipes which fail to compile when elevating -Wformat-security to an error
93SECURITY_STRINGFORMAT_pn-busybox = "" 93SECURITY_STRINGFORMAT_pn-busybox = ""
94SECURITY_STRINGFORMAT_pn-cmake = ""
95SECURITY_STRINGFORMAT_pn-expect = "" 94SECURITY_STRINGFORMAT_pn-expect = ""
96SECURITY_STRINGFORMAT_pn-gcc = "" 95SECURITY_STRINGFORMAT_pn-gcc = ""
97SECURITY_STRINGFORMAT_pn-kexec-tools = "" 96SECURITY_STRINGFORMAT_pn-kexec-tools = ""
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 131ff70e58..6c8b36d18d 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -15,6 +15,7 @@ SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
15 file://support-oe-qt4-tools-names.patch \ 15 file://support-oe-qt4-tools-names.patch \
16 file://qt4-fail-silent.patch \ 16 file://qt4-fail-silent.patch \
17 file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \ 17 file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
18 file://0001-KWIML-tests-Remove-format-security-from-flags.patch \
18 " 19 "
19 20
20SRC_URI[md5sum] = "79bd7e65cd81ea3aa2619484ad6ff25a" 21SRC_URI[md5sum] = "79bd7e65cd81ea3aa2619484ad6ff25a"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch b/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch
new file mode 100644
index 0000000000..190133ba5c
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch
@@ -0,0 +1,33 @@
1From 0941395b146804abcd87004589ff6e7a2953412d Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Thu, 16 Mar 2017 14:39:04 +0200
4Subject: [PATCH] KWIML tests: Remove format-security from flags
5
6For the tests where "format" is removed from flags, "format-security"
7should be removed as well. Otherwise building cmake with
8"-Wformat -Wformat-security" fails:
9
10| cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
11
12Upstream-Status: Backport [part of commit f77420cfc9]
13Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
14---
15 Utilities/KWIML/test/CMakeLists.txt | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt
19index 4f6f37b..1bf93bb 100644
20--- a/Utilities/KWIML/test/CMakeLists.txt
21+++ b/Utilities/KWIML/test/CMakeLists.txt
22@@ -10,7 +10,7 @@ endif()
23 # Suppress printf/scanf format warnings; we test if the sizes match.
24 foreach(lang C CXX)
25 if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
26- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
27+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security")
28 endif()
29 endforeach()
30
31--
322.1.4
33