All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/wayland: fix build with gcc 4.8
@ 2022-04-18 21:34 Fabrice Fontaine
  2022-04-23 15:04 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-04-18 21:34 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E . MORIN, Thomas Petazzoni, Fabrice Fontaine

Fix the following build failure with gcc 4.8 raised since bump to
version 1.20.0 in commit f94ba5c31cf7f863e6fae996fc042a56e20118f3 and
https://gitlab.freedesktop.org/wayland/wayland/-/commit/80164ef3005e8bb5f785082b97a75cab15444f82:

../src/wayland-util.c: In function 'for_each_helper':
../src/wayland-util.c:373:2: error: 'for' loop initial declarations are only allowed in C99 mode
  for (size_t idx = 0; idx < count; idx++) {
  ^
../src/wayland-util.c:373:2: note: use option -std=c99 or -std=gnu99 to compile your code

Fixes:
 - http://autobuild.buildroot.org/results/3040c9a8cf08415a7f4338185f6dc7245c68c64c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../wayland/0001-build-set-c_std-c99.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/wayland/0001-build-set-c_std-c99.patch

diff --git a/package/wayland/0001-build-set-c_std-c99.patch b/package/wayland/0001-build-set-c_std-c99.patch
new file mode 100644
index 0000000000..69f728aa11
--- /dev/null
+++ b/package/wayland/0001-build-set-c_std-c99.patch
@@ -0,0 +1,34 @@
+From 40c275f642e3895aeb748403fcdfd92d7d875d65 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Mon, 10 Jan 2022 14:54:02 +0100
+Subject: [PATCH] build: set c_std=c99
+
+Set explicitly the C standard to use to make sure we don't use
+features not available on our target platforms.
+
+Signed-off-by: Simon Ser <contact@emersion.fr>
+
+[Retrieved from:
+https://gitlab.freedesktop.org/wayland/wayland/-/commit/40c275f642e3895aeb748403fcdfd92d7d875d65]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index cab267e9..e9691ffe 100644
+--- a/meson.build
++++ b/meson.build
+@@ -5,7 +5,8 @@ project(
+ 	meson_version: '>= 0.52.1',
+ 	default_options: [
+ 		'warning_level=2',
+-		'buildtype=debugoptimized'
++		'buildtype=debugoptimized',
++		'c_std=c99',
+ 	]
+ )
+ wayland_version = meson.project_version().split('.')
+-- 
+GitLab
+
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/wayland: fix build with gcc 4.8
  2022-04-18 21:34 [Buildroot] [PATCH 1/1] package/wayland: fix build with gcc 4.8 Fabrice Fontaine
@ 2022-04-23 15:04 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2022-04-23 15:04 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Yann E . MORIN, Thomas Petazzoni



On 18/04/2022 23:34, Fabrice Fontaine wrote:
> Fix the following build failure with gcc 4.8 raised since bump to
> version 1.20.0 in commit f94ba5c31cf7f863e6fae996fc042a56e20118f3 and
> https://gitlab.freedesktop.org/wayland/wayland/-/commit/80164ef3005e8bb5f785082b97a75cab15444f82:
> 
> ../src/wayland-util.c: In function 'for_each_helper':
> ../src/wayland-util.c:373:2: error: 'for' loop initial declarations are only allowed in C99 mode
>    for (size_t idx = 0; idx < count; idx++) {
>    ^
> ../src/wayland-util.c:373:2: note: use option -std=c99 or -std=gnu99 to compile your code
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/3040c9a8cf08415a7f4338185f6dc7245c68c64c
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   .../wayland/0001-build-set-c_std-c99.patch    | 34 +++++++++++++++++++
>   1 file changed, 34 insertions(+)
>   create mode 100644 package/wayland/0001-build-set-c_std-c99.patch
> 
> diff --git a/package/wayland/0001-build-set-c_std-c99.patch b/package/wayland/0001-build-set-c_std-c99.patch
> new file mode 100644
> index 0000000000..69f728aa11
> --- /dev/null
> +++ b/package/wayland/0001-build-set-c_std-c99.patch
> @@ -0,0 +1,34 @@
> +From 40c275f642e3895aeb748403fcdfd92d7d875d65 Mon Sep 17 00:00:00 2001
> +From: Simon Ser <contact@emersion.fr>
> +Date: Mon, 10 Jan 2022 14:54:02 +0100
> +Subject: [PATCH] build: set c_std=c99
> +
> +Set explicitly the C standard to use to make sure we don't use
> +features not available on our target platforms.
> +
> +Signed-off-by: Simon Ser <contact@emersion.fr>
> +
> +[Retrieved from:
> +https://gitlab.freedesktop.org/wayland/wayland/-/commit/40c275f642e3895aeb748403fcdfd92d7d875d65]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + meson.build | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index cab267e9..e9691ffe 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -5,7 +5,8 @@ project(
> + 	meson_version: '>= 0.52.1',
> + 	default_options: [
> + 		'warning_level=2',
> +-		'buildtype=debugoptimized'
> ++		'buildtype=debugoptimized',
> ++		'c_std=c99',
> + 	]
> + )
> + wayland_version = meson.project_version().split('.')
> +--
> +GitLab
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-04-23 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 21:34 [Buildroot] [PATCH 1/1] package/wayland: fix build with gcc 4.8 Fabrice Fontaine
2022-04-23 15:04 ` Arnout Vandecappelle

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.