* [PATCH v2 0/5] Bump min compiler versions again
@ 2026-09-15 8:52 Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 1/5] tests/vm: drop redundant '; ' at end of each shell command Daniel P. Berrangé via qemu development
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier
With the security policy we want to rely on usage of
the -ftrivial-auto-var-init=zero flag to declare
bugs "not a CVE" if they rely on uninitialized stack
variables.
This arg is only supported by CLang 17 or GCC 12 though,
both of which are beyond our current min versions.
This series bumps both CLang and GCC to enable this.
The GCC bump is technically something we shouldn't do per
our platform support matrix, as the system compiler in our
targetted releases of NetBSD, remains GCC 10.4
This series considers it reasonable to bend the rules
slightly, as NetBSD does have new enough CLang, and also
ships newer GCC as non-system compilers.
Also historically the macOS XCode versions reported by
clang did not appear to align with upstream CLang versions
so we checked versions separately for macOS.
With this set of patches we happen to end up on 17.0 for
both upstream CLang and macOS Clang, and this makes me
wonder if we can rely on aligned versions going forward ?
Latest XCode 26.6 apparently reports clang 21.0.0 which
appears to be a match for a modern llvm release.
Daniel P. Berrangé (5):
tests/vm: drop redundant ';' at end of each shell command
meson: simplify clang version checks
meson: bump min XCode CLang to 17.0
meson: bump min upstream CLang to 17.0
meson: bump min GCC to 12.0
meson.build | 12 ++++++------
tests/vm/netbsd | 17 +++++++++++------
2 files changed, 17 insertions(+), 12 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/5] tests/vm: drop redundant '; ' at end of each shell command
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
@ 2026-09-15 8:52 ` Daniel P. Berrangé via qemu development
2026-09-15 8:52 ` [PATCH v2 2/5] meson: simplify clang version checks Daniel P. Berrangé
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé via qemu development @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier
The newline implicitly separates every command, and the one case
where two comamnds were on the same line can trivially be split.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/vm/netbsd | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index 45afe675e1..a9879f6146 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -64,15 +64,16 @@ class NetBSDVM(basevm.BaseVM):
]
BUILD_SCRIPT = """
- set -e;
+ set -e
rm -rf /home/qemu/qemu-test.*
- cd $(mktemp -d /home/qemu/qemu-test.XXXXXX);
- mkdir src build; cd src;
- tar -xf /dev/rld1a;
+ cd $(mktemp -d /home/qemu/qemu-test.XXXXXX)
+ mkdir src build
+ cd src
+ tar -xf /dev/rld1a
cd ../build
../src/configure --disable-opengl --extra-ldflags=-L/usr/pkg/lib \
- --extra-cflags=-I/usr/pkg/include {configure_opts};
- gmake --output-sync -j{jobs} {target} {verbose};
+ --extra-cflags=-I/usr/pkg/include {configure_opts}
+ gmake --output-sync -j{jobs} {target} {verbose}
"""
poweroff = "/sbin/poweroff"
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/5] meson: simplify clang version checks
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 1/5] tests/vm: drop redundant '; ' at end of each shell command Daniel P. Berrangé via qemu development
@ 2026-09-15 8:52 ` Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 3/5] meson: bump min XCode CLang to 17.0 Daniel P. Berrangé
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier
The checks for the clang minor versions are currently redundant since
there can never be a minor version less than zero. Going forward it
is likely sufficient to always pick a NN.0.0 release as the min CLang
version, so drop the minor version checks.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index cfac634cf1..cb3eaf3abe 100644
--- a/meson.build
+++ b/meson.build
@@ -330,11 +330,11 @@ foreach lang : all_languages
# ok
elif compiler.get_id() == 'clang' and compiler.compiles('''
#ifdef __apple_build_version__
- # if __clang_major__ < 15 || (__clang_major__ == 15 && __clang_minor__ < 0)
+ # if __clang_major__ < 15
# error You need at least XCode Clang v15.0 to compile QEMU
# endif
#else
- # if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
+ # if __clang_major__ < 10
# error You need at least Clang v10.0 to compile QEMU
# endif
#endif''')
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/5] meson: bump min XCode CLang to 17.0
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 1/5] tests/vm: drop redundant '; ' at end of each shell command Daniel P. Berrangé via qemu development
2026-09-15 8:52 ` [PATCH v2 2/5] meson: simplify clang version checks Daniel P. Berrangé
@ 2026-09-15 8:52 ` Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 4/5] meson: bump min upstream " Daniel P. Berrangé
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier, Philippe Mathieu-Daudé
The current two latest macOS releases (Tahoe and Sequoia) support
XCode 17.x, XCode 26.x and XCode 27.x is in Beta.
XCode 17.x reported CLang 17.0.0, and this continued with XCode 26.0
stream until XCode 26.4 switched to reporting CLang 21.0.0.
A min XCode CLang of 17.0.0 looks appropriate and matches our current
CI job matrix.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index cb3eaf3abe..ff181e7021 100644
--- a/meson.build
+++ b/meson.build
@@ -330,8 +330,8 @@ foreach lang : all_languages
# ok
elif compiler.get_id() == 'clang' and compiler.compiles('''
#ifdef __apple_build_version__
- # if __clang_major__ < 15
- # error You need at least XCode Clang v15.0 to compile QEMU
+ # if __clang_major__ < 17
+ # error You need at least XCode Clang v17.0 to compile QEMU
# endif
#else
# if __clang_major__ < 10
@@ -342,7 +342,7 @@ foreach lang : all_languages
elif compiler.get_id() == 'emscripten'
# ok
else
- error('You either need GCC v10.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 v17.0) to compile QEMU')
endif
endforeach
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/5] meson: bump min upstream CLang to 17.0
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
` (2 preceding siblings ...)
2026-09-15 8:52 ` [PATCH v2 3/5] meson: bump min XCode CLang to 17.0 Daniel P. Berrangé
@ 2026-09-15 8:52 ` Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 5/5] meson: bump min GCC to 12.0 Daniel P. Berrangé
2026-09-15 14:53 ` [PATCH v2 0/5] Bump min compiler versions again Richard Henderson
5 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier
Per our supported platform policy, oldest distros we target
have the following CLang available:
Fedora 43: 21.1.2
CentOS Stream 9: 22.1.8
Debian 13: 17.0.6
Ubuntu 24.04: 20.1.2
OpenBSD: 22.1.8
FreeBSD: 23.1.0
NetBSD: 21.1.8
OpenSUSE Leap 16.0: 19.1.7
Thus Debian is our prime constraint and we can move from 10.0
to 17.0 as our min version.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index ff181e7021..fc1bb685ab 100644
--- a/meson.build
+++ b/meson.build
@@ -334,15 +334,15 @@ foreach lang : all_languages
# error You need at least XCode Clang v17.0 to compile QEMU
# endif
#else
- # if __clang_major__ < 10
- # error You need at least Clang v10.0 to compile QEMU
+ # if __clang_major__ < 17
+ # error You need at least Clang v17.0 to compile QEMU
# endif
#endif''')
# ok
elif compiler.get_id() == 'emscripten'
# ok
else
- error('You either need GCC v10.4 or Clang v10.0 (or XCode Clang v17.0) to compile QEMU')
+ error('You either need GCC v10.4 or Clang v17.0 (or XCode Clang v17.0) to compile QEMU')
endif
endforeach
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 5/5] meson: bump min GCC to 12.0
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
` (3 preceding siblings ...)
2026-09-15 8:52 ` [PATCH v2 4/5] meson: bump min upstream " Daniel P. Berrangé
@ 2026-09-15 8:52 ` Daniel P. Berrangé
2026-09-15 14:53 ` [PATCH v2 0/5] Bump min compiler versions again Richard Henderson
5 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-09-15 8:52 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Daniel P. Berrangé,
Pierrick Bouvier
This is a slight violation of our platform support policy since
current NetBSD only has GCC 10.4 as its system compiler. It
does, however, have new enough CLang and newer GCC versions can
be opted-in.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 4 ++--
tests/vm/netbsd | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index fc1bb685ab..9845317b73 100644
--- a/meson.build
+++ b/meson.build
@@ -326,7 +326,7 @@ endif
foreach lang : all_languages
compiler = meson.get_compiler(lang)
- if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=10.4')
+ if compiler.get_id() == 'gcc' and compiler.version().version_compare('>=12.0')
# ok
elif compiler.get_id() == 'clang' and compiler.compiles('''
#ifdef __apple_build_version__
@@ -342,7 +342,7 @@ foreach lang : all_languages
elif compiler.get_id() == 'emscripten'
# ok
else
- error('You either need GCC v10.4 or Clang v17.0 (or XCode Clang v17.0) to compile QEMU')
+ error('You either need GCC v12.0 or Clang v17.0 (or XCode Clang v17.0) to compile QEMU')
endif
endforeach
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index a9879f6146..749116d3dc 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -61,6 +61,9 @@ class NetBSDVM(basevm.BaseVM):
# libs: networking
"libslirp",
+
+ # Until system GCC is updated to >= 12.0
+ "clang",
]
BUILD_SCRIPT = """
@@ -72,7 +75,8 @@ class NetBSDVM(basevm.BaseVM):
tar -xf /dev/rld1a
cd ../build
../src/configure --disable-opengl --extra-ldflags=-L/usr/pkg/lib \
- --extra-cflags=-I/usr/pkg/include {configure_opts}
+ --extra-cflags=-I/usr/pkg/include {configure_opts} \
+ --cc=clang
gmake --output-sync -j{jobs} {target} {verbose}
"""
poweroff = "/sbin/poweroff"
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/5] Bump min compiler versions again
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
` (4 preceding siblings ...)
2026-09-15 8:52 ` [PATCH v2 5/5] meson: bump min GCC to 12.0 Daniel P. Berrangé
@ 2026-09-15 14:53 ` Richard Henderson
5 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2026-09-15 14:53 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Alex Bennée, Marc-André Lureau, Paolo Bonzini,
Kyle Evans, Warner Losh, Pierrick Bouvier
On 9/14/26 22:52, Daniel P. Berrangé wrote:
> Daniel P. Berrangé (5):
> tests/vm: drop redundant ';' at end of each shell command
> meson: simplify clang version checks
> meson: bump min XCode CLang to 17.0
> meson: bump min upstream CLang to 17.0
> meson: bump min GCC to 12.0
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-15 14:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 8:52 [PATCH v2 0/5] Bump min compiler versions again Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 1/5] tests/vm: drop redundant '; ' at end of each shell command Daniel P. Berrangé via qemu development
2026-09-15 8:52 ` [PATCH v2 2/5] meson: simplify clang version checks Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 3/5] meson: bump min XCode CLang to 17.0 Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 4/5] meson: bump min upstream " Daniel P. Berrangé
2026-09-15 8:52 ` [PATCH v2 5/5] meson: bump min GCC to 12.0 Daniel P. Berrangé
2026-09-15 14:53 ` [PATCH v2 0/5] Bump min compiler versions again Richard Henderson
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.