From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-trivial@nongnu.org, anthony.perard@citrix.com, berrange@redhat.com
Subject: [PATCH] configure: Bump minimum Clang version to 10.0
Date: Tue, 31 Jan 2023 19:02:39 +0100 [thread overview]
Message-ID: <20230131180239.1582302-1-thuth@redhat.com> (raw)
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 25 ++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/configure b/configure
index 9e407ce2e3..17732736ca 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
next reply other threads:[~2023-01-31 18:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 18:02 Thomas Huth [this message]
2023-01-31 18:11 ` [PATCH] configure: Bump minimum Clang version to 10.0 Richard Henderson
2023-01-31 18:31 ` Alex Bennée
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=20230131180239.1582302-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=anthony.perard@citrix.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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 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.