From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154460616779571.7013279896687; Wed, 12 Dec 2018 01:16:07 -0800 (PST) Received: from localhost ([::1]:43300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0cg-0000vE-FG for importer@patchew.org; Wed, 12 Dec 2018 04:16:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ad-00087I-M1 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ab-00044e-O8 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:13:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8903) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ab-00044C-GX for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:13:57 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE0F93082194; Wed, 12 Dec 2018 09:13:56 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0080119C7D; Wed, 12 Dec 2018 09:13:55 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:45 +0100 Message-Id: <1544606032-16924-2-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 12 Dec 2018 09:13:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/8] configure: Add a test for the minimum compiler version X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" So far we only had implicit requirements for the minimum compiler version, e.g. we require at least GCC 4.1 for the support of atomics. However, such old compiler versions are not tested anymore by the developers, so they are not really supported anymore. Since we recently declared explicitly what platforms we intend to support, we can also get more explicit on the compiler version now. The supported distributions use the following version of GCC: RHEL-7: 4.8.5 Debian (Stretch): 6.3.0 Debian (Jessie): 4.8.4 OpenBSD (ports): 4.9.4 FreeBSD (ports): 8.2.0 OpenSUSE Leap 15: 7.3.1 Ubuntu (Xenial): 5.3.1 macOS (Homebrew): 8.2.0 So we can safely assume GCC 4.8 these days. For Clang, the situation is a little bit more ambiguous, since it is sometimes not available in the main distros but rather third party repositories. At least Debian Jessie uses version 3.5, and EPEL7 for RHEL7 uses 3.4, so let's use 3.4 as minimum Clang version now - we still can adjust this later if necessary. Unfortunately Apple uses different version numbers for the Clang that is included in their Xcode suite, so we need to check the version numbers for Xcode separately. Xcode 5.1 seems to be the first one that has been shipped with LLVM 3.4, so use this version as the minimum there. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- configure | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/configure b/configure index 0a3c6a7..7621c00 100755 --- a/configure +++ b/configure @@ -1840,6 +1840,31 @@ if test "$bogus_os" =3D "yes"; then error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')" fi =20 +# Check whether the compiler matches our minimum requirements: +cat > $TMPC << EOF +#if defined(__clang_major__) && defined(__clang_minor__) +# ifdef __apple_build_version__ +# if __clang_major__ < 5 || (__clang_major__ =3D=3D 5 && __clang_minor__ = < 1) +# error You need at least XCode Clang v5.1 to compile QEMU +# endif +# else +# if __clang_major__ < 3 || (__clang_major__ =3D=3D 3 && __clang_minor__ = < 4) +# error You need at least Clang v3.4 to compile QEMU +# endif +# endif +#elif defined(__GNUC__) && defined(__GNUC_MINOR__) +# if __GNUC__ < 4 || (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ < 8) +# error You need at least GCC v4.8 to compile QEMU +# endif +#else +# error You either need GCC or Clang to compiler QEMU +#endif +int main (void) { return 0; } +EOF +if ! compile_prog "" "" ; then + error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v= 5.1)" +fi + gcc_flags=3D"-Wold-style-declaration -Wold-style-definition -Wtype-limits" gcc_flags=3D"-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifie= rs $gcc_flags" gcc_flags=3D"-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_= flags" --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606161228834.724268830643; Wed, 12 Dec 2018 01:16:01 -0800 (PST) Received: from localhost ([::1]:43298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ca-0000pY-1h for importer@patchew.org; Wed, 12 Dec 2018 04:16:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ad-00087E-LI for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ac-000457-Js for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:13:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58000) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ac-00044m-Dz for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:13:58 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB64C83F3F; Wed, 12 Dec 2018 09:13:57 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0135519C7D; Wed, 12 Dec 2018 09:13:56 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:46 +0100 Message-Id: <1544606032-16924-3-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 12 Dec 2018 09:13:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/8] configure: Remove obsolete check for Clang < 3.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since we have got a check for Clang >=3D 3.4 now, we do not need to check for older Clang versions in the configure test for 128-bit ints anymore. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- configure | 5 ----- 1 file changed, 5 deletions(-) diff --git a/configure b/configure index 7621c00..ca364f6 100755 --- a/configure +++ b/configure @@ -5148,11 +5148,6 @@ fi =20 int128=3Dno cat > $TMPC << EOF -#if defined(__clang_major__) && defined(__clang_minor__) -# if ((__clang_major__ < 3) || (__clang_major__ =3D=3D 3) && (__clang_mino= r__ < 2)) -# error __int128_t does not work in CLANG before 3.2 -# endif -#endif __int128_t a; __uint128_t b; int main (void) { --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15446061646001023.9405035992423; Wed, 12 Dec 2018 01:16:04 -0800 (PST) Received: from localhost ([::1]:43299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0cd-0000sO-4B for importer@patchew.org; Wed, 12 Dec 2018 04:16:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ae-00087v-Ju for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ad-00045g-KQ for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47706) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ad-00045E-CJ for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:13:59 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A97DDA82C; Wed, 12 Dec 2018 09:13:58 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F295B19C7D; Wed, 12 Dec 2018 09:13:57 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:47 +0100 Message-Id: <1544606032-16924-4-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 12 Dec 2018 09:13:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/8] configure: Remove old -fno-gcse workaround for GCC 4.6.x and 4.7.[012] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that we require at least GCC 4.8, we don't need this als workaround for 4.6 and 4.7 anymore. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- Makefile.target | 3 --- configure | 17 +---------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/Makefile.target b/Makefile.target index 4d56298..44ec4b6 100644 --- a/Makefile.target +++ b/Makefile.target @@ -158,9 +158,6 @@ GENERATED_FILES +=3D hmp-commands.h hmp-commands-info.h =20 endif # CONFIG_SOFTMMU =20 -# Workaround for http://gcc.gnu.org/PR55489, see configure. -%/translate.o: QEMU_CFLAGS +=3D $(TRANSLATE_OPT_CFLAGS) - dummy :=3D $(call unnest-vars,,obj-y) all-obj-y :=3D $(obj-y) =20 diff --git a/configure b/configure index ca364f6..0886f45 100755 --- a/configure +++ b/configure @@ -1936,21 +1936,7 @@ else QEMU_CFLAGS=3D"$QEMU_CFLAGS -Wno-missing-braces" fi =20 -# Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC and -# large functions that use global variables. The bug is in all releases of -# GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fixed in -# 4.7.3 and 4.8.0. We should be able to delete this at the end of 2013. -cat > $TMPC << EOF -#if __GNUC__ =3D=3D 4 && (__GNUC_MINOR__ =3D=3D 6 || (__GNUC_MINOR__ =3D= =3D 7 && __GNUC_PATCHLEVEL__ <=3D 2)) -int main(void) { return 0; } -#else -#error No bug in this compiler. -#endif -EOF -if compile_prog "-Werror -fno-gcse" "" ; then - TRANSLATE_OPT_CFLAGS=3D-fno-gcse -fi - +# Static linking is not possible with modules or PIE if test "$static" =3D "yes" ; then if test "$modules" =3D "yes" ; then error_exit "static and modules are mutually incompatible" @@ -6983,7 +6969,6 @@ echo "LIBS_QGA+=3D$libs_qga" >> $config_host_mak echo "TASN1_LIBS=3D$tasn1_libs" >> $config_host_mak echo "TASN1_CFLAGS=3D$tasn1_cflags" >> $config_host_mak echo "POD2MAN=3D$POD2MAN" >> $config_host_mak -echo "TRANSLATE_OPT_CFLAGS=3D$TRANSLATE_OPT_CFLAGS" >> $config_host_mak if test "$gcov" =3D "yes" ; then echo "CONFIG_GCOV=3Dy" >> $config_host_mak echo "GCOV=3D$gcov_tool" >> $config_host_mak --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606501220589.1604267089268; Wed, 12 Dec 2018 01:21:41 -0800 (PST) Received: from localhost ([::1]:43333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0i4-0005xP-4Y for importer@patchew.org; Wed, 12 Dec 2018 04:21:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0af-00088a-Fs for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ae-00046W-HT for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42606) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ae-000462-AU for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:00 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA55E356E7; Wed, 12 Dec 2018 09:13:59 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1B7F19C7D; Wed, 12 Dec 2018 09:13:58 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:48 +0100 Message-Id: <1544606032-16924-5-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 12 Dec 2018 09:13:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/8] tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Both GCC v4.8 and Clang v3.4 (our minimum versions) support __builtin_unreachable(), so we can remove the version check here now. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- tcg/tcg.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index f4efbaa..f9a56a9 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -230,11 +230,9 @@ typedef uint64_t tcg_insn_unit; =20 #if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS # define tcg_debug_assert(X) do { assert(X); } while (0) -#elif QEMU_GNUC_PREREQ(4, 5) +#else # define tcg_debug_assert(X) \ do { if (!(X)) { __builtin_unreachable(); } } while (0) -#else -# define tcg_debug_assert(X) do { (void)(X); } while (0) #endif =20 typedef struct TCGRelocation { --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606345327734.9364843287102; Wed, 12 Dec 2018 01:19:05 -0800 (PST) Received: from localhost ([::1]:43316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0fW-0003pP-DY for importer@patchew.org; Wed, 12 Dec 2018 04:19:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ag-00089U-DF for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0af-00047M-MP for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41606) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0af-00046p-Ff for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:01 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB111307D855; Wed, 12 Dec 2018 09:14:00 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F35A119C7D; Wed, 12 Dec 2018 09:13:59 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:49 +0100 Message-Id: <1544606032-16924-6-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 12 Dec 2018 09:14:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/8] audio/alsaaudio: Remove compiler check around pragma X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Both GCC v4.8 and Clang v3.4 support the -Waddress option, so we do not need the compiler version check here anymore. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- audio/alsaaudio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 362a227..635be73 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -28,9 +28,7 @@ #include "audio.h" #include "trace.h" =20 -#if QEMU_GNUC_PREREQ(4, 3) #pragma GCC diagnostic ignored "-Waddress" -#endif =20 #define AUDIO_CAP "alsa" #include "audio_int.h" --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606516654534.9635435261104; Wed, 12 Dec 2018 01:21:56 -0800 (PST) Received: from localhost ([::1]:43334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0iJ-00068s-5e for importer@patchew.org; Wed, 12 Dec 2018 04:21:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0ah-0008Av-KM for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ag-00048h-HL for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56042) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ag-000485-Bg for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:02 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8D0788302; Wed, 12 Dec 2018 09:14:01 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2D4D19C7D; Wed, 12 Dec 2018 09:14:00 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:50 +0100 Message-Id: <1544606032-16924-7-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 12 Dec 2018 09:14:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/8] includes: Replace QEMU_GNUC_PREREQ with "__has_builtin || !defined(__clang__)" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since we require GCC version 4.8 or newer now, we can be sure that the builtin functions are always available on GCC. And for Clang, we can check the availablility with __has_builtin instead. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- include/qemu/compiler.h | 2 +- include/qemu/host-utils.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 6b92710..1593bca 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -127,7 +127,7 @@ #define __has_builtin(x) 0 /* compatibility with non-clang compilers */ #endif =20 -#if __has_builtin(__builtin_assume_aligned) || QEMU_GNUC_PREREQ(4, 7) +#if __has_builtin(__builtin_assume_aligned) || !defined(__clang__) #define HAS_ASSUME_ALIGNED #endif =20 diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h index 38da849..4cd170e 100644 --- a/include/qemu/host-utils.h +++ b/include/qemu/host-utils.h @@ -207,7 +207,7 @@ static inline int cto64(uint64_t val) */ static inline int clrsb32(uint32_t val) { -#if QEMU_GNUC_PREREQ(4, 7) +#if __has_builtin(__builtin_clrsb) || !defined(__clang__) return __builtin_clrsb(val); #else return clz32(val ^ ((int32_t)val >> 1)) - 1; @@ -223,7 +223,7 @@ static inline int clrsb32(uint32_t val) */ static inline int clrsb64(uint64_t val) { -#if QEMU_GNUC_PREREQ(4, 7) +#if __has_builtin(__builtin_clrsbll) || !defined(__clang__) return __builtin_clrsbll(val); #else return clz64(val ^ ((int64_t)val >> 1)) - 1; --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606679819129.38106350507417; Wed, 12 Dec 2018 01:24:39 -0800 (PST) Received: from localhost ([::1]:43354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0kn-0000Bc-V2 for importer@patchew.org; Wed, 12 Dec 2018 04:24:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0aj-0008CR-CJ for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ah-00049I-J5 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ah-00048r-Dg for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:03 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A95AC308212B; Wed, 12 Dec 2018 09:14:02 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F15E219940; Wed, 12 Dec 2018 09:14:01 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:51 +0100 Message-Id: <1544606032-16924-8-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 12 Dec 2018 09:14:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 7/8] Remove QEMU_ARTIFICIAL macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The code that used it has already been removed a while ago with commit dc41aa7d34989b552ef ("tcg: Remove GET_TCGV_* and MAKE_TCGV_*"). Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- include/qemu/compiler.h | 6 ------ scripts/checkpatch.pl | 1 - scripts/cocci-macro-file.h | 1 - 3 files changed, 8 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 1593bca..261842b 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -28,12 +28,6 @@ =20 #define QEMU_SENTINEL __attribute__((sentinel)) =20 -#if QEMU_GNUC_PREREQ(4, 3) -#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial)) -#else -#define QEMU_ARTIFICIAL -#endif - #if defined(_WIN32) # define QEMU_PACKED __attribute__((gcc_struct, packed)) #else diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 60f6f89..a892a6c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -202,7 +202,6 @@ our $Attribute =3D qr{ QEMU_NORETURN| QEMU_WARN_UNUSED_RESULT| QEMU_SENTINEL| - QEMU_ARTIFICIAL| QEMU_PACKED| GCC_FMT_ATTR }x; diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index 9f2e72e..7e200a1 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -23,7 +23,6 @@ #define QEMU_NORETURN __attribute__ ((__noreturn__)) #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define QEMU_SENTINEL __attribute__((sentinel)) -#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial)) #define QEMU_PACKED __attribute__((gcc_struct, packed)) =20 #define cat(x,y) x ## y --=20 1.8.3.1 From nobody Wed May 1 13:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544606345259533.5770358107383; Wed, 12 Dec 2018 01:19:05 -0800 (PST) Received: from localhost ([::1]:43315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0fR-0003iv-10 for importer@patchew.org; Wed, 12 Dec 2018 04:18:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX0aj-0008CW-E7 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX0ai-00049s-HG for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX0ai-00049S-B7 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 04:14:04 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA52A31256C4; Wed, 12 Dec 2018 09:14:03 +0000 (UTC) Received: from thuth.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F025C19940; Wed, 12 Dec 2018 09:14:02 +0000 (UTC) From: Thomas Huth To: Peter Maydell Date: Wed, 12 Dec 2018 10:13:52 +0100 Message-Id: <1544606032-16924-9-git-send-email-thuth@redhat.com> In-Reply-To: <1544606032-16924-1-git-send-email-thuth@redhat.com> References: <1544606032-16924-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 12 Dec 2018 09:14:03 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 8/8] i2c: Move typedef of bitbang_i2c_interface to i2c.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and bitbang_i2c.h an error even if they are identical. Move it to a common place to allow building with this clang version. Reported-by: Thomas Huth Signed-off-by: BALATON Zoltan Acked-by: David Gibson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- hw/i2c/bitbang_i2c.h | 2 -- include/hw/i2c/i2c.h | 2 ++ include/hw/i2c/ppc4xx_i2c.h | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/i2c/bitbang_i2c.h b/hw/i2c/bitbang_i2c.h index 3a7126d..9443021 100644 --- a/hw/i2c/bitbang_i2c.h +++ b/hw/i2c/bitbang_i2c.h @@ -3,8 +3,6 @@ =20 #include "hw/i2c/i2c.h" =20 -typedef struct bitbang_i2c_interface bitbang_i2c_interface; - #define BITBANG_I2C_SDA 0 #define BITBANG_I2C_SCL 1 =20 diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index 5dc1661..cf4c45a 100644 --- a/include/hw/i2c/i2c.h +++ b/include/hw/i2c/i2c.h @@ -82,6 +82,8 @@ int i2c_recv(I2CBus *bus); =20 DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr); =20 +typedef struct bitbang_i2c_interface bitbang_i2c_interface; + /* lm832x.c */ void lm832x_key_event(DeviceState *dev, int key, int state); =20 diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h index 0891a9c..b3450ba 100644 --- a/include/hw/i2c/ppc4xx_i2c.h +++ b/include/hw/i2c/ppc4xx_i2c.h @@ -31,9 +31,6 @@ #include "hw/sysbus.h" #include "hw/i2c/i2c.h" =20 -/* from hw/i2c/bitbang_i2c.h */ -typedef struct bitbang_i2c_interface bitbang_i2c_interface; - #define TYPE_PPC4xx_I2C "ppc4xx-i2c" #define PPC4xx_I2C(obj) OBJECT_CHECK(PPC4xxI2CState, (obj), TYPE_PPC4xx_I2= C) =20 --=20 1.8.3.1