summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/cmake
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-10-17 11:48:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-28 16:15:18 +0100
commit5bfc112449caa381bc6b51b475a3f35a1a1159ea (patch)
tree240aadd6e984b0a48a599009560bde91353c1c62 /meta/recipes-devtools/cmake
parente66f5eabed5ba7778e80026bc918e943c6d70518 (diff)
downloadpoky-5bfc112449caa381bc6b51b475a3f35a1a1159ea.tar.gz
cmake: avoid configure failures if CFLAGS contains -Wstrict-prototypes
(From OE-Core rev: 0c89b010ce2e426f55ac7c6f94befef988913834) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/cmake')
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc1
-rw-r--r--meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch42
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 4fcb0b1ed0..821bb81892 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -14,6 +14,7 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
14SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ 14SRC_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 " 18 "
18 19
19SRC_URI[md5sum] = "d6dd661380adacdb12f41b926ec99545" 20SRC_URI[md5sum] = "d6dd661380adacdb12f41b926ec99545"
diff --git a/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
new file mode 100644
index 0000000000..8b8d4802ee
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
@@ -0,0 +1,42 @@
1From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Fri, 14 Oct 2016 16:26:58 -0700
4Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with
5 -Wstrict-prototypes
6
7Avoid warnings (and therefore build failures etc) if a user happens
8to add -Wstrict-prototypes to CFLAGS.
9
10 | $ gcc --version
11 | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
12 |
13 | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c
14 | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
15 | CHECK_FUNCTION_EXISTS();
16 | ^
17 | cc1: all warnings being treated as errors
18 |
19
20Upstream-Status: Pending
21
22Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
23---
24 Modules/CheckFunctionExists.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
28index 2304000..224e340 100644
29--- a/Modules/CheckFunctionExists.c
30+++ b/Modules/CheckFunctionExists.c
31@@ -4,7 +4,7 @@
32 extern "C"
33 #endif
34 char
35- CHECK_FUNCTION_EXISTS();
36+ CHECK_FUNCTION_EXISTS(void);
37 #ifdef __CLASSIC_C__
38 int main()
39 {
40--
411.9.1
42