* [Buildroot] [PATCH 1/1] package/seatd: fix build with gcc < 7
@ 2021-08-08 17:15 Fabrice Fontaine
2021-08-08 20:29 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-08-08 17:15 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Since its addition in commit daae31149017cbf8b03634cfc56da132f7e1ad83,
seatd fails to build with gcc < 7 because it unconditonally uses
-Wimplicit-fallthrough which is only available since gcc 7.1 and
https://github.com/gcc-mirror/gcc/commit/81fea426da8c4687bb32e6894dc26f00ae211822
resulting in the following build failure:
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wimplicit-fallthrough'
Fixes:
- http://autobuild.buildroot.org/results/0ee6816a7cceebdafd07612677a594bdf68e0790
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...003-meson.build-fix-build-with-gcc-7.patch | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 package/seatd/0003-meson.build-fix-build-with-gcc-7.patch
diff --git a/package/seatd/0003-meson.build-fix-build-with-gcc-7.patch b/package/seatd/0003-meson.build-fix-build-with-gcc-7.patch
new file mode 100644
index 0000000000..0e9f437cc3
--- /dev/null
+++ b/package/seatd/0003-meson.build-fix-build-with-gcc-7.patch
@@ -0,0 +1,48 @@
+From 0b32c33978fbe8772df6d185c9b9d646c442dc5d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 8 Aug 2021 19:00:35 +0200
+Subject: [PATCH] meson.build: fix build with gcc < 7
+
+Test if -Wimplicit-fallthrough is available before using it as it has
+been added only since gcc 7.1 and
+https://github.com/gcc-mirror/gcc/commit/81fea426da8c4687bb32e6894dc26f00ae211822
+and so it will raise the following build failure with gcc < 7:
+
+arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wimplicit-fallthrough'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/0ee6816a7cceebdafd07612677a594bdf68e0790
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/kennylevinsen/seatd/pull/1]
+---
+ meson.build | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1131b4b..c366a59 100644
+--- a/meson.build
++++ b/meson.build
+@@ -31,7 +31,6 @@ add_project_arguments(
+ '-Wold-style-definition', # nop
+ '-Wpointer-arith',
+ '-Wstrict-prototypes',
+- '-Wimplicit-fallthrough',
+ '-Wmissing-prototypes',
+ '-Wno-unknown-warning-option',
+ '-Wno-unused-command-line-argument',
+@@ -45,6 +44,11 @@ add_project_arguments(
+ language: 'c',
+ )
+
++cc = meson.get_compiler('c')
++if cc.has_argument('-Wimplicit-fallthrough')
++ add_project_arguments('-Wimplicit-fallthrough' , language : 'c')
++endif
++
+ if ['debugoptimized', 'release', 'minsize'].contains(get_option('buildtype'))
+ add_project_arguments('-D_FORTIFY_SOURCE=2', language: 'c')
+ endif
+--
+2.30.2
+
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/seatd: fix build with gcc < 7
2021-08-08 17:15 [Buildroot] [PATCH 1/1] package/seatd: fix build with gcc < 7 Fabrice Fontaine
@ 2021-08-08 20:29 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-08-08 20:29 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
On Sun, 8 Aug 2021 19:15:18 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Since its addition in commit daae31149017cbf8b03634cfc56da132f7e1ad83,
> seatd fails to build with gcc < 7 because it unconditonally uses
> -Wimplicit-fallthrough which is only available since gcc 7.1 and
> https://github.com/gcc-mirror/gcc/commit/81fea426da8c4687bb32e6894dc26f00ae211822
> resulting in the following build failure:
>
> arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wimplicit-fallthrough'
>
> Fixes:
> - http://autobuild.buildroot.org/results/0ee6816a7cceebdafd07612677a594bdf68e0790
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...003-meson.build-fix-build-with-gcc-7.patch | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
> create mode 100644 package/seatd/0003-meson.build-fix-build-with-gcc-7.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-08 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 17:15 [Buildroot] [PATCH 1/1] package/seatd: fix build with gcc < 7 Fabrice Fontaine
2021-08-08 20:29 ` Thomas Petazzoni
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.