From nobody Fri Nov 7 00:45:00 2025 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; dkim=fail; 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 1544629093421694.4411267933965; Wed, 12 Dec 2018 07:38:13 -0800 (PST) Received: from localhost ([::1]:45632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6aS-0003tb-4k for importer@patchew.org; Wed, 12 Dec 2018 10:38:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6MZ-0000qD-Bt for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX6MY-0000FY-05 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:51 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gX6MX-0000B2-Fg for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:49 -0500 Received: by mail-wr1-x434.google.com with SMTP id v13so18110137wrw.5 for ; Wed, 12 Dec 2018 07:23:45 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u10sm15878859wrr.33.2018.12.12.07.23.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 07:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=KobekzsIYNm2uErAL3Xuxn2uj9kQJAImsV1s69KEobU=; b=IBC8kvdYhIouEdebkDiZUr1CWflKSMMEvrrkiDZLGRLm3gW1nmNZR6FsafLzdlUitF 8mHQ/BA3FYvuSwENAMFnWNotHgNDgiKwpoZSnNF23wkrENe04PHp64tt7ycaIOblLflI l2llpoQF0ftmm6Iq0QbY09J9PPNnYU3TQlSCbZRc8iUnj+KFvGtqEPhKqtTWfsW+1SZe p00RdPZUXLUZvEVZ0aL9QZXD9KxTvXqfmWJCFGZPbWz5WnSZO3z4QlxCfZzUfk2Sc9AB QFAxSHGhp11E5mG/8wImn72rNItKt6bVJk9YCyOzxxzeTgCsqwsYfOFhVqvp6yr1ZdGr I81w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=KobekzsIYNm2uErAL3Xuxn2uj9kQJAImsV1s69KEobU=; b=Sa4qMlOxVmvKJcwlmjfvKpMw+otcSob1kqFE6ydspHaY2LgMhu0Asgkywh8rf/3YqE /+TF6mYTSi4NpYYZ5hCE+QUKQdWsAV44biARC1z7w5NBcuYr2yULrkLp9barQ/lGLHfp y/Tu9NC1DMuic9JSbcg8xYx4x8DF6X1ajGn1Bcpnr3moer1nLWB4IA7lp08Rc/dTeeZK HSk16+kvBtloGJbpouQAce4hYFS6X/sJIhDdm6ylhhxqeXN31dgHz4FdgrVH+X76UXWR 3EBqTKXxCGN8OAV54n/ot0XY70UbMOsuecstB2rqoHSFOn9Y0TwLQ5TiMx/lXRH+brOR v0nA== X-Gm-Message-State: AA+aEWZt9Us1GIkfaIAi4x6Hy0EPqij8YUIdUs5X3d8ipKbu8qQjqo2w JaNdS1K3cG/rMNeJKBaucD7DM3X/ X-Google-Smtp-Source: AFSGD/V+IwYSgl+uA/RpA7Z0AWQuG31Ukhe6KbJdEfIckZ4XuIdHPaQ5hclyVS00YpySly16NJzo+w== X-Received: by 2002:adf:f149:: with SMTP id y9mr19186651wro.284.1544628224257; Wed, 12 Dec 2018 07:23:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 16:22:45 +0100 Message-Id: <1544628195-37728-25-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1544628195-37728-1-git-send-email-pbonzini@redhat.com> References: <1544628195-37728-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 Subject: [Qemu-devel] [PULL 24/54] compiler.h: Add an explicit check for the 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: Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The questions about our minimum compiler requirement pops up every couple of months, and we then have to recall the details each time. So let's document this in a proper way, by adding a comment and check for the right compiler version to our compiler.h header. Signed-off-by: Thomas Huth Message-Id: <1543574620-17506-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/compiler.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 6b92710..6f32ec2 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,6 +22,14 @@ # define QEMU_GNUC_PREREQ(maj, min) 0 #endif =20 +/* + * We need at least GCC 4.1 for atomics support. Clang also supports these, + * and reports itself as GCC 4.2, so it passes this check, too. + */ +#if !QEMU_GNUC_PREREQ(4, 1) +#error QEMU needs a compiler that is compatible with GCC v4.1 or newer +#endif + #define QEMU_NORETURN __attribute__ ((__noreturn__)) =20 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) --=20 1.8.3.1