qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PULL 01/22] configure: Bump minimum Clang version to 10.0
Date: Tue, 14 Feb 2023 12:21:27 +0100	[thread overview]
Message-ID: <20230214112148.646077-2-thuth@redhat.com> (raw)
In-Reply-To: <20230214112148.646077-1-thuth@redhat.com>

Anthony Perard recently reported some problems with Clang v6.0 from
Ubuntu Bionic (with regards to the -Wmissing-braces configure test).
Since we're not officially supporting that version of Ubuntu anymore,
we should better bump our minimum version check in the configure script
instead of using our time to fix problems of unsupported compilers.
According to repology.org, our supported distros ship these versions
of Clang (looking at the highest version only):

              Fedora 36: 14.0.5
      CentOS 8 (RHEL-8): 12.0.1
              Debian 11: 13.0.1
     OpenSUSE Leap 15.4: 13.0.1
       Ubuntu LTS 20.04: 12.0.0
          FreeBSD Ports: 15.0.7
          NetBSD pkgsrc: 15.0.7
               Homebrew: 15.0.7
            MSYS2 mingw: 15.0.7
            Haiku ports: 12.0.1

While it seems like we could update to v12.0.0 from that point of view,
the default version on Ubuntu 20.04 is still v10.0, and we use that for
our CI tests based via the tests/docker/dockerfiles/ubuntu2004.docker
file.

Thus let's make v10.0 our minimum version now (which corresponds to
Apple Clang version v12.0). The -Wmissing-braces check can then be
removed, too, since both our minimum GCC and our minimum Clang version
now handle this correctly.

Message-Id: <20230131180239.1582302-1-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/configure b/configure
index 64960c6000..00415f0b48 100755
--- a/configure
+++ b/configure
@@ -1018,7 +1018,7 @@ cat << EOF
   debug-tcg       TCG debugging (default is disabled)
   debug-info      debugging information
   safe-stack      SafeStack Stack Smash Protection. Depends on
-                  clang/llvm >= 3.7 and requires coroutine backend ucontext.
+                  clang/llvm and requires coroutine backend ucontext.
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -1138,12 +1138,12 @@ fi
 cat > $TMPC << EOF
 #if defined(__clang_major__) && defined(__clang_minor__)
 # ifdef __apple_build_version__
-#  if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
-#   error You need at least XCode Clang v10.0 to compile QEMU
+#  if __clang_major__ < 12 || (__clang_major__ == 12 && __clang_minor__ < 0)
+#   error You need at least XCode Clang v12.0 to compile QEMU
 #  endif
 # else
-#  if __clang_major__ < 6 || (__clang_major__ == 6 && __clang_minor__ < 0)
-#   error You need at least Clang v6.0 to compile QEMU
+#  if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
+#   error You need at least Clang v10.0 to compile QEMU
 #  endif
 # endif
 #elif defined(__GNUC__) && defined(__GNUC_MINOR__)
@@ -1156,7 +1156,7 @@ cat > $TMPC << EOF
 int main (void) { return 0; }
 EOF
 if ! compile_prog "" "" ; then
-    error_exit "You need at least GCC v7.4 or Clang v6.0 (or XCode Clang v10.0)"
+    error_exit "You need at least GCC v7.4 or Clang v10.0 (or XCode Clang v12.0)"
 fi
 
 # Accumulate -Wfoo and -Wno-bar separately.
@@ -1261,19 +1261,6 @@ EOF
   fi
 fi
 
-# Disable -Wmissing-braces on older compilers that warn even for
-# the "universal" C zero initializer {0}.
-cat > $TMPC << EOF
-struct {
-  int a[2];
-} x = {0};
-EOF
-if compile_object "-Werror" "" ; then
-  :
-else
-  QEMU_CFLAGS="$QEMU_CFLAGS -Wno-missing-braces"
-fi
-
 # Our module code doesn't support Windows
 if test "$modules" = "yes" && test "$mingw32" = "yes" ; then
   error_exit "Modules are not available for Windows"
-- 
2.31.1



  reply	other threads:[~2023-02-14 11:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 11:21 [PULL 00/22] qtest, s390x and misc patches Thomas Huth
2023-02-14 11:21 ` Thomas Huth [this message]
2023-02-14 11:21 ` [PULL 02/22] meson: Add missing libdw knobs Thomas Huth
2023-02-14 11:21 ` [PULL 03/22] meson: Disable libdw for static builds by default Thomas Huth
2023-02-14 11:21 ` [PULL 04/22] build: deprecate --enable-gprof builds and remove from CI Thomas Huth
2023-02-14 11:21 ` [PULL 05/22] tests/qtest/npcm7xx_pwm-test: Be less verbose unless V=2 Thomas Huth
2023-02-14 11:21 ` [PULL 06/22] hw/misc/sga: Remove the deprecated "sga" device Thomas Huth
2023-02-14 11:21 ` [PULL 07/22] include/hw: Do not include "hw/registerfields.h" in headers that don't need it Thomas Huth
2023-02-14 11:21 ` [PULL 08/22] Do not include "qemu/error-report.h" in headers that do not " Thomas Huth
2023-02-14 11:21 ` [PULL 09/22] tests/qtest: Skip PXE tests for missing devices Thomas Huth
2023-02-14 11:21 ` [PULL 10/22] tests/qtest: Do not run lsi53c895a test if device is not present Thomas Huth
2023-02-14 11:21 ` [PULL 11/22] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c Thomas Huth
2023-02-14 11:21 ` [PULL 12/22] tests/qtest: hd-geo-test: Check for missing devices Thomas Huth
2023-02-14 11:21 ` [PULL 13/22] test/qtest: Fix coding style in device-plug-test.c Thomas Huth
2023-02-14 11:21 ` [PULL 14/22] tests/qtest: Skip unplug tests that use missing devices Thomas Huth
2023-02-14 11:21 ` [PULL 15/22] tests/qtest: drive_del-test: Skip tests that require " Thomas Huth
2023-02-14 11:21 ` [PULL 16/22] tests/qtest: Check for devices in bios-tables-test Thomas Huth
2023-02-14 11:21 ` [PULL 17/22] tests/qtest: Do not include hexloader-test if loader device is not present Thomas Huth
2023-02-14 11:21 ` [PULL 18/22] tests/qemu-iotests: Require virtio-scsi-pci Thomas Huth
2023-02-14 11:21 ` [PULL 19/22] tests/qtest: bios-tables-test: Skip if missing configs Thomas Huth
2023-02-14 11:21 ` [PULL 20/22] tests/qtest: Don't build virtio-serial-test.c if device not present Thomas Huth
2023-02-14 11:21 ` [PULL 21/22] tests/tcg/s390x: Use -nostdlib for softmmu tests Thomas Huth
2023-02-14 11:21 ` [PULL 22/22] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() Thomas Huth
2023-02-15 14:05 ` [PULL 00/22] qtest, s390x and misc patches 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=20230214112148.646077-2-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).