All of lore.kernel.org
 help / color / mirror / Atom feed
* [morty][PATCH] cmake: avoid configure failures if CFLAGS contains -Wstrict-prototypes
@ 2017-12-14  1:00 Andre McCurdy
  2018-01-07 18:24 ` akuster808
  0 siblings, 1 reply; 2+ messages in thread
From: Andre McCurdy @ 2017-12-14  1:00 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 0c89b010ce2e426f55ac7c6f94befef988913834)
---
 meta/recipes-devtools/cmake/cmake.inc              |  1 +
 ...void-gcc-warnings-with-Wstrict-prototypes.patch | 42 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch

diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 4fcb0b1..821bb81 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])}"
 SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
+           file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
            "
 
 SRC_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 0000000..8b8d480
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
@@ -0,0 +1,42 @@
+From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 14 Oct 2016 16:26:58 -0700
+Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with
+ -Wstrict-prototypes
+
+Avoid warnings (and therefore build failures etc) if a user happens
+to add -Wstrict-prototypes to CFLAGS.
+
+ | $ gcc --version
+ | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
+ |
+ | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c
+ | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
+ |    CHECK_FUNCTION_EXISTS();
+ |    ^
+ | cc1: all warnings being treated as errors
+ |
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ Modules/CheckFunctionExists.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
+index 2304000..224e340 100644
+--- a/Modules/CheckFunctionExists.c
++++ b/Modules/CheckFunctionExists.c
+@@ -4,7 +4,7 @@
+ extern "C"
+ #endif
+   char
+-  CHECK_FUNCTION_EXISTS();
++  CHECK_FUNCTION_EXISTS(void);
+ #ifdef __CLASSIC_C__
+ int main()
+ {
+-- 
+1.9.1
+
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [morty][PATCH] cmake: avoid configure failures if CFLAGS contains -Wstrict-prototypes
  2017-12-14  1:00 [morty][PATCH] cmake: avoid configure failures if CFLAGS contains -Wstrict-prototypes Andre McCurdy
@ 2018-01-07 18:24 ` akuster808
  0 siblings, 0 replies; 2+ messages in thread
From: akuster808 @ 2018-01-07 18:24 UTC (permalink / raw)
  To: Andre McCurdy, openembedded-core

this in now in morty

thanks,

Armin


On 12/13/2017 05:00 PM, Andre McCurdy wrote:
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> (cherry picked from commit 0c89b010ce2e426f55ac7c6f94befef988913834)
> ---
>  meta/recipes-devtools/cmake/cmake.inc              |  1 +
>  ...void-gcc-warnings-with-Wstrict-prototypes.patch | 42 ++++++++++++++++++++++
>  2 files changed, 43 insertions(+)
>  create mode 100644 meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
>
> diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
> index 4fcb0b1..821bb81 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])}"
>  SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
>             file://support-oe-qt4-tools-names.patch \
>             file://qt4-fail-silent.patch \
> +           file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
>             "
>  
>  SRC_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 0000000..8b8d480
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
> @@ -0,0 +1,42 @@
> +From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001
> +From: Andre McCurdy <armccurdy@gmail.com>
> +Date: Fri, 14 Oct 2016 16:26:58 -0700
> +Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with
> + -Wstrict-prototypes
> +
> +Avoid warnings (and therefore build failures etc) if a user happens
> +to add -Wstrict-prototypes to CFLAGS.
> +
> + | $ gcc --version
> + | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
> + |
> + | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c
> + | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> + |    CHECK_FUNCTION_EXISTS();
> + |    ^
> + | cc1: all warnings being treated as errors
> + |
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> +---
> + Modules/CheckFunctionExists.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
> +index 2304000..224e340 100644
> +--- a/Modules/CheckFunctionExists.c
> ++++ b/Modules/CheckFunctionExists.c
> +@@ -4,7 +4,7 @@
> + extern "C"
> + #endif
> +   char
> +-  CHECK_FUNCTION_EXISTS();
> ++  CHECK_FUNCTION_EXISTS(void);
> + #ifdef __CLASSIC_C__
> + int main()
> + {
> +-- 
> +1.9.1
> +



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-07 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14  1:00 [morty][PATCH] cmake: avoid configure failures if CFLAGS contains -Wstrict-prototypes Andre McCurdy
2018-01-07 18:24 ` akuster808

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.