[v2,1/3] meson: Increase required compiler versions
diff mbox series

Message ID 20260831132312.619946-2-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • treewide: Use `std::span`
Related show

Commit Message

Barnabás Pőcze Aug. 31, 2026, 1:23 p.m. UTC
GCC 10 appears to be the first compiler version that provides the
`<span>` header in its libstdc++. So require at least gcc 10.

The clang situation is more complicated because it can use different
standard libraries, but libc++ has provided `<span>` even in llvm 7,
so keep the version requirement as is.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kieran Bingham Aug. 31, 2026, 1:31 p.m. UTC | #1
Quoting Barnabás Pőcze (2026-08-31 14:23:10)
> GCC 10 appears to be the first compiler version that provides the
> `<span>` header in its libstdc++. So require at least gcc 10.
> 
> The clang situation is more complicated because it can use different
> standard libraries, but libc++ has provided `<span>` even in llvm 7,
> so keep the version requirement as is.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index d8e78ed6c0..37fe9ce4f4 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -154,8 +154,8 @@ if cc.get_id() == 'clang'
>  endif
>  
>  if cc.get_id() == 'gcc'
> -    if cc.version().version_compare('<9')
> -        error('gcc version is too old, libcamera requires 9.0 or newer')
> +    if cc.version().version_compare('<10')
> +        error('gcc version is too old, libcamera requires 10.0 or newer')
>      endif
>  
>      # In C++20 mode, prior to gcc 11, object slicing in a return statement didn't
> -- 
> 2.55.0
>

Patch
diff mbox series

diff --git a/meson.build b/meson.build
index d8e78ed6c0..37fe9ce4f4 100644
--- a/meson.build
+++ b/meson.build
@@ -154,8 +154,8 @@  if cc.get_id() == 'clang'
 endif
 
 if cc.get_id() == 'gcc'
-    if cc.version().version_compare('<9')
-        error('gcc version is too old, libcamera requires 9.0 or newer')
+    if cc.version().version_compare('<10')
+        error('gcc version is too old, libcamera requires 10.0 or newer')
     endif
 
     # In C++20 mode, prior to gcc 11, object slicing in a return statement didn't