Message ID | 20240910174013.1433331-2-pierrick.bouvier@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp431466wrc; Tue, 10 Sep 2024 10:42:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVXILC6BWvWFgsgU1ZCQIPsMTXuCflFePogXwyhxpt3QEsX5gDy+luUU6eVD8ehcgASlQt0g==@linaro.org X-Google-Smtp-Source: AGHT+IEsT0cTWOl6jUC3bMBBbepT0xhMoolt3+3XfTYfGa8Zcesk5QW6p2uLczStQ07j0UI5Txes X-Received: by 2002:a05:620a:244a:b0:7a9:bd11:38d with SMTP id af79cd13be357-7a9bd110478mr944961285a.27.1725990144235; Tue, 10 Sep 2024 10:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725990144; cv=none; d=google.com; s=arc-20240605; b=BBuiBR8Jvz9qs513BoJPZZ3iuHvxWRe+/VLNqyAD6ZDBr/RJcO+FurDjGE53LdF9q+ vQIA/Cvk5Zxv4x3l6YB57uOF9KuMK1oiqdHK/bfGUgLUYX3LBHhs6YKrvLSpgqpVxACy IImbqUYXXAkRiDClEPeopXUlITnaho1cIv1vR6I+Un29ozzXmBWR7MY8z3qtEkHhHTWW kwWGaO3mthu/KlqllvFuCvBGWTSwQ5wodx+UauIjrCoevpyAH0/VKc4sLF5cUmIzXr2+ yEGWMZ1LmI0xPiL9ZD9Jlr3OjEqFJK/0TAVDnaDft6yuZLv+KNCPkgegA5w9kY2Cd5wy aL0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5Z1RdXPVj5atb8+PpKq/fmgLYxIn7PDouvny9pPcuV8=; fh=niU+Agd4Wp70L8xrJ0/IO4BQaJkQAaRxdsfKZE6Qk1g=; b=HP49Rl5Ag2xlFmsdvTo+Hi4JprTW3TQfw746NlKRnXsroJ+RBTujB//y6Bsof9DAxC +316DN2P62hcpaG9OvpXiEQkw2GUwewMm4EvBLhAiAW63Qy3xV1PKrGP3roVxv4hMaK7 P/yd9O3nG2VV0c8M8bqtjid0EkVhJjLYKbBDhLlPcqjzjL4iYOeTy+eZ+URIlSPlkyfE 4bqXVyHGNxzVm9z3ytCHQfkEh8IOc5QDU8ElTDP/4tyIbTXPeHDnUEHDYFgDVok74qge k7X5AzK5aCYMFyAjKFGExZN1bszNzMzbH+iVwcs+qD9f7Q7Bi/uT2S+NnE6oVywN9sjW 19hQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KQU66zSz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a9a79c4fa1si828007685a.71.2024.09.10.10.42.24 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 10:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KQU66zSz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1so4qr-0002wf-Ho; Tue, 10 Sep 2024 13:40:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1so4qo-0002bN-Tw for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:40:27 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1so4qm-0004sb-OK for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:40:26 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2d8f06c2459so3791173a91.0 for <qemu-devel@nongnu.org>; Tue, 10 Sep 2024 10:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725990023; x=1726594823; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Z1RdXPVj5atb8+PpKq/fmgLYxIn7PDouvny9pPcuV8=; b=KQU66zSz8WY+kPtomntX64bsSCZNxiUZ9vyp8nOClT/mC6AISHAfZHqs8+CcOuGV4/ Za92ZhRjMYNnB5xZbn7yp1ssqk+8c+aVyDRhhPL3elcv2M/Xlg3vEGSUSRtMMP7+Za6v RedqQxDg0ZYqsJKAq3qLr5PB1Q8++30fUiT+tvUtqh291fT8drIP3+02r73brZFEJsF5 OuC/31zZK2n4AYEYzwp8NgZRkNDs2EO9oW6fX95Qx8IybsaljEUEiP7dGxabHLjCUjL8 X7iGt9gTxOzcWndhHzweIJN6ApLtLtKXa+ELdyBFcUTlO9N0ZYavTnEAiyxuQ7PR+FsD c+9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725990023; x=1726594823; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Z1RdXPVj5atb8+PpKq/fmgLYxIn7PDouvny9pPcuV8=; b=XGBAeL0foZhzPFZMlOT2En90B4myjXFl3xHug2p2qMFVl3675uEgD4qJUMDd6NHPIz Mp/i+q6WULPxwgholl4OCm4IMIiJHpcpGZWZcKXjXf4EODXgGkwUXwM5KbwUm0PZHQpH w/uFt8TMYQi5D8m45qhB+uQlwY0mmIqs2HUVd4UE6wWi2SPYBb/54CVu2nBOuGCaQkGL Yjv8XyZGUOt5nIfNrb4VkNjyHy1afKJu4N142yhB8peE506/ne/wbvG7oC6b6+QYAaUh 2aNcEXVz902i4xxtnRN+MDHJ+qeIX03gSWTv+m+ds9Jw7ujwXP8pz2KsV9IZVfgjrrbX hiWg== X-Gm-Message-State: AOJu0YzswMM0OOWWlRrPYPJ2HVcjPIc7k7iDlm1HEDKxFvNPqP0BNx+9 j0mMMb+1yoCC0BtLDLMMubRNwValgO73OsEkJahRbwb+cv3qZbQ8QNKxNLWDUYEeP5XxwuGmtDR Bz4m2bg== X-Received: by 2002:a17:90a:3f8b:b0:2d8:ee39:47d with SMTP id 98e67ed59e1d1-2dad4efe336mr14872686a91.2.1725990022993; Tue, 10 Sep 2024 10:40:22 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2db04966d3asm6682751a91.38.2024.09.10.10.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:40:22 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta <wainersm@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, David Hildenbrand <david@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, qemu-s390x@nongnu.org, Beraldo Leal <bleal@redhat.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH v3 1/3] meson: hide tsan related warnings Date: Tue, 10 Sep 2024 10:40:11 -0700 Message-Id: <20240910174013.1433331-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910174013.1433331-1-pierrick.bouvier@linaro.org> References: <20240910174013.1433331-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
build qemu with gcc and tsan
|
expand
|
diff --git a/meson.build b/meson.build index fbda17c987e..8a587bd52cc 100644 --- a/meson.build +++ b/meson.build @@ -504,7 +504,15 @@ if get_option('tsan') prefix: '#include <sanitizer/tsan_interface.h>') error('Cannot enable TSAN due to missing fiber annotation interface') endif - qemu_cflags = ['-fsanitize=thread'] + qemu_cflags + tsan_warn_suppress = [] + # gcc (>=11) will report constructions not supported by tsan: + # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’" + # https://gcc.gnu.org/gcc-11/changes.html + # However, clang does not support this warning and this triggers an error. + if cc.has_argument('-Wno-tsan') + tsan_warn_suppress = ['-Wno-tsan'] + endif + qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags endif
When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan] 36 | #define smp_mb() ({ barrier(); __atomic_thread_fence(__ATOMIC_SEQ_CST); }) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)