public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH] meson.build: Bump the minimum GCC version to v10.4
@ 2026-03-10 15:53 Thomas Huth
  2026-03-10 18:08 ` Fabiano Rosas
  2026-03-11  9:41 ` Daniel P. Berrangé
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2026-03-10 15:53 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Fabiano Rosas, Peter Maydell,
	Nia Alarie, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

Our minimum supported version of GCC used to be v7.4 since we still
wanted to support NetBSD 9.x in the past:

 https://gitlab.com/qemu-project/qemu/-/issues/614
 https://gitlab.com/qemu-project/qemu/-/commit/3830df5f83b9b52d949676

However, NetBSD 10 has already been released since two years ago
(see https://www.netbsd.org/releases/formal-10/NetBSD-10.0.html),
so according to our support policy, starting with QEMU v11.0, we
don't have to take care of the previous major release of NetBSD
anymore.

Looking at the various distros that we take care of (see e.g.
https://repology.org/project/gcc/versions), and the NetBSD 10.0
3rd party package information:

 https://cvsweb.netbsd.org/bsdweb.cgi/src/doc/3RDPARTY?rev=1.1905.2.14;content-type=text%2Fplain;only_with_tag=netbsd-10-0-RELEASE

... it seems like NetBSD 10 has the lowest version of GCC again,
but at least it's GCC 10.4 now. Thus bump our GCC requirement to
this version now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index f45885f05a1..6ccca2325a7 100644
--- a/meson.build
+++ b/meson.build
@@ -325,7 +325,7 @@ endif
 
 foreach lang : all_languages
   compiler = meson.get_compiler(lang)
-  if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=7.4')
+  if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=10.4')
     # ok
   elif compiler.get_id() == 'clang' and compiler.compiles('''
       #ifdef __apple_build_version__
@@ -341,7 +341,7 @@ foreach lang : all_languages
   elif compiler.get_id() == 'emscripten'
     # ok
   else
-    error('You either need GCC v7.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU')
+    error('You either need GCC v10.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU')
   endif
 endforeach
 
-- 
2.53.0



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

* Re: [PATCH] meson.build: Bump the minimum GCC version to v10.4
  2026-03-10 15:53 [PATCH] meson.build: Bump the minimum GCC version to v10.4 Thomas Huth
@ 2026-03-10 18:08 ` Fabiano Rosas
  2026-03-11  9:41 ` Daniel P. Berrangé
  1 sibling, 0 replies; 3+ messages in thread
From: Fabiano Rosas @ 2026-03-10 18:08 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Peter Maydell, Nia Alarie,
	Thomas Huth

Thomas Huth <thuth@redhat.com> writes:

> From: Thomas Huth <thuth@redhat.com>
>
> Our minimum supported version of GCC used to be v7.4 since we still
> wanted to support NetBSD 9.x in the past:
>
>  https://gitlab.com/qemu-project/qemu/-/issues/614
>  https://gitlab.com/qemu-project/qemu/-/commit/3830df5f83b9b52d949676
>
> However, NetBSD 10 has already been released since two years ago
> (see https://www.netbsd.org/releases/formal-10/NetBSD-10.0.html),
> so according to our support policy, starting with QEMU v11.0, we
> don't have to take care of the previous major release of NetBSD
> anymore.
>
> Looking at the various distros that we take care of (see e.g.
> https://repology.org/project/gcc/versions), and the NetBSD 10.0
> 3rd party package information:
>
>  https://cvsweb.netbsd.org/bsdweb.cgi/src/doc/3RDPARTY?rev=1.1905.2.14;content-type=text%2Fplain;only_with_tag=netbsd-10-0-RELEASE
>
> ... it seems like NetBSD 10 has the lowest version of GCC again,
> but at least it's GCC 10.4 now. Thus bump our GCC requirement to
> this version now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index f45885f05a1..6ccca2325a7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -325,7 +325,7 @@ endif
>  
>  foreach lang : all_languages
>    compiler = meson.get_compiler(lang)
> -  if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=7.4')
> +  if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=10.4')
>      # ok
>    elif compiler.get_id() == 'clang' and compiler.compiles('''
>        #ifdef __apple_build_version__
> @@ -341,7 +341,7 @@ foreach lang : all_languages
>    elif compiler.get_id() == 'emscripten'
>      # ok
>    else
> -    error('You either need GCC v7.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU')
> +    error('You either need GCC v10.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU')
>    endif
>  endforeach

Acked-by: Fabiano Rosas <farosas@suse.de>


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

* Re: [PATCH] meson.build: Bump the minimum GCC version to v10.4
  2026-03-10 15:53 [PATCH] meson.build: Bump the minimum GCC version to v10.4 Thomas Huth
  2026-03-10 18:08 ` Fabiano Rosas
@ 2026-03-11  9:41 ` Daniel P. Berrangé
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2026-03-11  9:41 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Paolo Bonzini, qemu-devel, Marc-André Lureau,
	Philippe Mathieu-Daudé, Fabiano Rosas, Peter Maydell,
	Nia Alarie

On Tue, Mar 10, 2026 at 04:53:31PM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> Our minimum supported version of GCC used to be v7.4 since we still
> wanted to support NetBSD 9.x in the past:
> 
>  https://gitlab.com/qemu-project/qemu/-/issues/614
>  https://gitlab.com/qemu-project/qemu/-/commit/3830df5f83b9b52d949676
> 
> However, NetBSD 10 has already been released since two years ago
> (see https://www.netbsd.org/releases/formal-10/NetBSD-10.0.html),
> so according to our support policy, starting with QEMU v11.0, we
> don't have to take care of the previous major release of NetBSD
> anymore.
> 
> Looking at the various distros that we take care of (see e.g.
> https://repology.org/project/gcc/versions), and the NetBSD 10.0
> 3rd party package information:
> 
>  https://cvsweb.netbsd.org/bsdweb.cgi/src/doc/3RDPARTY?rev=1.1905.2.14;content-type=text%2Fplain;only_with_tag=netbsd-10-0-RELEASE
> 
> ... it seems like NetBSD 10 has the lowest version of GCC again,
> but at least it's GCC 10.4 now. Thus bump our GCC requirement to
> this version now.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


AFAICT,  GCC 10.4  ships with gnu17 as its default C standard.

CLang 10.x also seems to support gnu17.

So separate from this patch, we could likely bump our C stndard
from gnu11 to gnu17. Though C17 doesn't seem to have any big
ticket items that help us compared  C11, it makes sense to
track the newer standard versions as they become available to
us.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

end of thread, other threads:[~2026-03-11  9:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 15:53 [PATCH] meson.build: Bump the minimum GCC version to v10.4 Thomas Huth
2026-03-10 18:08 ` Fabiano Rosas
2026-03-11  9:41 ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox