From 3dbf1376a486e8504ce4b064272bd8241bea1478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 13 Nov 2025 14:42:38 +0100 Subject: [PATCH] gstreamer: Add `-Wno-volatile` for GCC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Older versions of glib may use `volatile` qualified variables, triggering the warning in C++20. So suppress it. Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Naushir Patuck --- src/gstreamer/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build index fd83e073..602f978e 100644 --- a/src/gstreamer/meson.build +++ b/src/gstreamer/meson.build @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') libcamera_gst_cpp_args += ['-Wno-unused-function'] endif +# In C++20 many operations involving the `volatile` qualifier became deprecated. +# glib however made use of `volatile` in certain macros that would trigger +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') + libcamera_gst_cpp_args += ['-Wno-volatile'] +endif + libcamera_gst = shared_library('gstlibcamera', libcamera_gst_sources, cpp_args : libcamera_gst_cpp_args,