All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: nia <nia@netbsd.org>, "Peter Maydell" <peter.maydell@linaro.org>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: Minimal GCC version for QEMU
Date: Wed, 11 Mar 2026 09:31:42 +0000	[thread overview]
Message-ID: <abE2fnEDSg4z6y0B@redhat.com> (raw)
In-Reply-To: <1c26bf07-1d19-4764-9f6f-28b47a7f0f8b@redhat.com>

On Wed, Mar 11, 2026 at 08:28:01AM +0100, Thomas Huth wrote:
> On 11/03/2026 00.06, nia wrote:
> > On Tue, Mar 10, 2026 at 04:47:30PM +0100, Thomas Huth wrote:
> > > According to that URL from NetBSD that I posted above, they are still using
> > > LLVM 10.0 in NetBSD 10 ... which is also our current minimum version of
> > > Clang, so I assume we're still stuck with Clang v10 for a while?
> > 
> > Since I was CCed in this discussion - can I ask why qemu is targeting
> > compiler versions instead of C standard revisions?
> 
>  Hi!
> 
> QEMU already uses std=gnu11. The problem is that different compiler versions
> emit different warnings, and with older compilers, there are often warnings
> that are false positives (see e.g.
> https://lore.kernel.org/qemu-devel/87h5qn23v5.fsf@suse.de/ that just has
> been posted to the mailing list recently). The QEMU project tries to avoid
> supporting operating systems / build environments that are too old (see
> https://www.qemu.org/docs/master/about/build-platforms.html), we often just
> don't have the capacity in the developer community to handle that, so that's
> why we put compiler checks into place to avoid wrong expectations for the
> users.

Furthermore, the minimum GCC + CLang versions are what we use to
determine what GNU C standard revision we can set as our baseline.
For example see this previous commit:

  commit 8a9d3d564093dbd5a7339085406e840893944d21
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   Mon Jun 14 16:31:36 2021 -0700

    configure: Use -std=gnu11
    
    Now that the minimum gcc version is 7.5, we can use C11.
    This will allow lots of cleanups to the code, currently
    hidden behind macros in include/qemu/compiler.h.



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 :|



  reply	other threads:[~2026-03-11  9:32 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 15:51 [PULL 00/49] Misc HW patches for 2026-03-09 Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 01/49] hw/timer/hpet: Remove HPETState::hpet_offset_saved field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 02/49] hw/i386/pc: Remove deprecated pc-q35/pc-i440fx/xenfv 3.1 machines Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 03/49] hw/i386/pc: Remove PCMachineClass::pvh_enabled field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 04/49] hw/i386/x86: Remove @pvh_enabled argument in x86_load_linux() Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 05/49] hw/core/boards: Remove MachineClass::smbus_no_migration_support field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 06/49] hw/i386/pc: Remove pc_compat_3_1[] array Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 07/49] hw/i386/iommu: Remove IntelIOMMUState::dma_drain field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 08/49] target/i386/cpu: Remove X86CPU::intel_pt_auto_level field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 09/49] hw/core/machine: Remove the hw_compat_3_1[] array Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 10/49] hw/pci-bridge/pcie_rp: Remove PCIESlot::disable_acs field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 11/49] hw/i386/pc: Remove deprecated pc-q35-4.0[.1] and pc-i440fx-4.0 machines Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 12/49] hw/i386/pc: Remove pc_compat_4_0[] array Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 13/49] hw/core/machine: Remove the hw_compat_4_0[] array Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 14/49] hw/virtio: Remove VirtIOBalloon::qemu_4_0_config_size field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 15/49] hw/rtc/pl031: : Remove PL031State::migrate_tick_offset field Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 16/49] tests: fix leaks in dbus-display-test Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 17/49] ui/dbus: fix leak regression Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 18/49] ui/dbus: fix Unix.Map proxy leak Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 19/49] ui/dbus: fix pixman cleanup Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 20/49] coreaudio: Remove unnecessary explicit casts Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 21/49] coreaudio: Remove extra whitespaces Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 22/49] virtio-snd: remove a redundant memory allocation Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 23/49] virtio-snd: remove redundant fields Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 24/49] contrib/elf2dmp: Grow PDB URL buffer Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 25/49] vfio/pci: Grow buffer in vfio_pci_host_match() Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 26/49] tests: Clean up double comparisons to avoid compiler warning Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 27/49] meson: Add -Wformat-overflow=2 Philippe Mathieu-Daudé
2026-03-10 13:47   ` Fabiano Rosas
2026-03-10 14:37     ` Philippe Mathieu-Daudé
2026-03-10 15:20       ` Peter Maydell
2026-03-10 14:51     ` Peter Maydell
2026-03-10 15:17       ` Minimal GCC version for QEMU (was: Re: [PULL 27/49] meson: Add -Wformat-overflow=2) Thomas Huth
2026-03-10 15:30         ` Daniel P. Berrangé
2026-03-10 15:47           ` Minimal GCC version for QEMU Thomas Huth
2026-03-10 23:06             ` nia
2026-03-11  7:28               ` Thomas Huth
2026-03-11  9:31                 ` Daniel P. Berrangé [this message]
2026-03-11  9:37               ` Daniel P. Berrangé
2026-03-10 14:53     ` [PULL 27/49] meson: Add -Wformat-overflow=2 Peter Maydell
2026-03-10 15:23       ` Fabiano Rosas
2026-03-09 15:51 ` [PULL 28/49] net/passt: Only kill passt if it wrote a pidfile Philippe Mathieu-Daudé
2026-03-09 15:51 ` [PULL 29/49] net/passt: Don't try to read the pidfile if passt got a signal Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 30/49] hw/net/npcm_gmac: Catch accesses off the end of the register array Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 31/49] hw/sparc/sun4m: Don't set up dummy cpu interrupts Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 32/49] hw/sparc/sun4m: Use qdev GPIOs rather than qemu_allocate_irqs() Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 33/49] hw/timer/slavio_timer: Free resources allocated in instance_init Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 34/49] hw/qdev: Document qdev_get_dev_path() Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 35/49] hw: Make qdev_get_printable_name() consistently return freeable string Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 36/49] ati-vga: Remove src and dst stride mutation in ati_2d_blt Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 37/49] ati-vga: Use local variables for register values " Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 38/49] ati-vga: Introduce ATI2DCtx struct for 2D blit context Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 39/49] ati-vga: Extract setup_2d_blt_ctx from ati_2d_blt Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 40/49] ati-vga: Split ati_2d_do_blt " Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 41/49] ati-vga: Remove ATIVGAState param from ati_2d_do_blt Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 42/49] ati-vga: Implement scissor rectangle clipping for 2D operations Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 43/49] ati-vga: Implement HOST_DATA register writes Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 44/49] ati-vga: Implement HOST_DATA flush to VRAM Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 45/49] ati-vga: Simplify hw cursor drawing Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 46/49] ati-vga: Do not access pixel outside the screen Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 47/49] hw/i3c/dw-i3c: Fix memory leaks in error logging paths Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 48/49] hw/misc/sifive_e_aon: Don't leak timer Philippe Mathieu-Daudé
2026-03-09 15:52 ` [PULL 49/49] hw/misc/riscv_cpc: Free CPU array in instance_finalize Philippe Mathieu-Daudé
2026-03-10  9:31 ` [PULL 00/49] Misc HW patches for 2026-03-09 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abE2fnEDSg4z6y0B@redhat.com \
    --to=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=nia@netbsd.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.