From patchwork Mon Apr 27 18:31:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Storsjo X-Patchwork-Id: 185781 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp4655007ilf; Mon, 27 Apr 2020 11:32:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJ6BSqvWZx+dDqE0+tJ2i7eXJNSZfRvZ8VmrYY4DVdkLWf0DSvdahApxFh0CQS/kwWoNIig X-Received: by 2002:a17:902:b206:: with SMTP id t6mr24729684plr.270.1588012336741; Mon, 27 Apr 2020 11:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588012336; cv=none; d=google.com; s=arc-20160816; b=Z9IjJWcOEIOCr8oP1D9Bxq0loNJvwyd8K01BUiEwJYCP3Wyc/B+dhM2ME3+u5Qm5Ik 5et5cM+sswTWWd0m63lN1md4nQVrQqNb0ECR1OxEY+9Vk1KrOoE+GxAQfHXfCFGnqSsu ehh/wpzSY7Svv4Kr4/1fhmV20cWM95aoA27VmDBdPgmnj97Zo7MZv+OrvL4pGFw2CMoH NTEg+u0cUIi3Ms6kHmaHBQFD9ypW2pbge1eMEfHVQnDyGNjzzZKuTgZexnMlY2hKEJdp AdVR2Pm4J5usfOjluVBuaBb017S7bh9VAanwb2GrFSWfNWqJCzNYZpbqEziD/pBdBnUe b/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:mime-version:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=YSN2E0bnjGXZ05cbwnfvOxlWVX87FGHGq5NIqF2it3Y=; b=q9QJ667G2sCNyOUKY6gADuw+WpAb/1iTAXolgstqt+BNuOxsaL9ooUOobB5AqC3ZSq YTA8nAv4oFU+8DWizIQgqpRjK4k43UUNMBFVx0Iantoulu25T+RcigjgH7wZCAS+MB/W 1jic4W9pwf4A/XPPv3FiFJlObSKO86cwFP0Fdz27nQUu/GjM3TrDZUJk84nJbYbtJP5a yWJLH5+fe6vOhfbm6v8efLgrcBiUEQz9AnrNhxVBBccnb+K/rc9mfzzURe3P8JyQDUeb COk97VmuERJ+e6adbrWJmXw6LpkLj6bgLtF4IA+a4kZc/VUnJEzQSBqm0gRyI2sA2HxL bW2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VhCjySKl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=S+cBOGt9; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=DykmaYnD; spf=pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=valgrind-developers-bounces@lists.sourceforge.net Return-Path: Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id c3si11549515pga.15.2020.04.27.11.32.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Apr 2020 11:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VhCjySKl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=S+cBOGt9; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=DykmaYnD; spf=pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=valgrind-developers-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jT8Y0-0007Xw-AK; Mon, 27 Apr 2020 18:32:04 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jT8Xy-0007Xh-EQ for valgrind-developers@lists.sourceforge.net; Mon, 27 Apr 2020 18:32:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fU9DXlqE88wUCaYrm8ce0TAmmO/8xHA28zJktPvmS04=; b=VhCjySKlVmZNHTtSm0nNe4licd 9XLtwV9L7OsN9C1PdF7lQbEGlG5rIKpRWbH4EBLSxX+mK5zu7D/y5+PCxUzA3Porgz5uJhp3tl8su ZVQbA3x2sC0jw0y7l+5A+D1PjxxVTrkuBv/Bu/eZrYw6oUKVAcLY4UrCaOV59PjSiux0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc :MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fU9DXlqE88wUCaYrm8ce0TAmmO/8xHA28zJktPvmS04=; b=S+cBOGt9dtTZULXnqS971xcYFP waKmwQzJodY2MZ589PwmawnURSZOXAkV7A+iGv5ylkbM+UJ6h2w0rDSYxHt+GCGQzd9WOARTOu1za GA6WNCIxZTAVMvpJgrEV1fTjVeMnlTOLEkXjU/ZJBWsHDs9ObyNF7EGjh2zWC5LlQPig=; Received: from mail-lj1-f173.google.com ([209.85.208.173]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jT8Xw-00D64u-CX for valgrind-developers@lists.sourceforge.net; Mon, 27 Apr 2020 18:32:02 +0000 Received: by mail-lj1-f173.google.com with SMTP id y4so18707544ljn.7 for ; Mon, 27 Apr 2020 11:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=fU9DXlqE88wUCaYrm8ce0TAmmO/8xHA28zJktPvmS04=; b=DykmaYnDETj1df/qJDFhoqHdAGGuJnHSLK6dM9IxHbS1d8buWajLz8D/lkrDz/AJIT bOCkqytLlov9YKHLbDIK4PkxOqt266GFeROnpyCOHsn7T6kiV4lZUyMROcisfkMYm+sH 928ZAOF7LgPet8YbdEuOZo+bslXYiTH5zZgS08RZchXGJWMAm5c5+5ctNwkxEmg/+U6C 4FDQmD0KY2FTWKRmNTtTd22e/vdo0ZF0qrss57S8fFxvkSCdqZ1G09u4RhF4gdGFjcVE zY+yLasgpIL3g38Bvp/4wHPC6/PXZOJxMmQUcYLzsgKQrH6cJYa9oZqjzagTQjQ4bKoT Bb4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=fU9DXlqE88wUCaYrm8ce0TAmmO/8xHA28zJktPvmS04=; b=q+7ljs5dBWP2SwJw04NzrhqIGekWdQdm3qY3uiumyYYo92u29xNoJ+hClWsUpiIwo2 0fXaq/QS+g1oWZ+wQC1U4+VddrcnmHeRwquATFJEfQEi0Mh1vlcrWQP60ap90t6l03Kj 1c7j4uUdtoVsvxNsSb+f16yVRY2TgP+AOBVGt9Qv55bYCMORtkboGH8mfVH22Om8++1g 44x58BgpV5Cpf6tYSDKsAizcY9N3LulsOQUUONwhH68GFbvk1o8YZXR5gNWchAQvKCkz EpSl/f1l2vzB+q7p7XURK2WkT0w3yNiVIaT8+0G9mHBjhmDFX5YD/Junpj34lqHXmq3t npSQ== X-Gm-Message-State: AGi0PubIfSOKrW3GePjiFx5etZzBnM16+XQkZ0Q852nCJkklpWUTOfcv Aa9fmGntNg61IOJ6icQp628bTLmu2ao= X-Received: by 2002:a2e:2414:: with SMTP id k20mr14700754ljk.162.1588012313205; Mon, 27 Apr 2020 11:31:53 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id d3sm13524392lfq.63.2020.04.27.11.31.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 11:31:52 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: valgrind-developers@lists.sourceforge.net Date: Mon, 27 Apr 2020 21:31:51 +0300 Message-Id: <20200427183151.14368-1-martin@martin.st> X-Mailer: git-send-email 2.17.1 In-Reply-To: <2ff129a1-df51-36d4-1a63-11919ecf43e4@acm.org> References: <2ff129a1-df51-36d4-1a63-11919ecf43e4@acm.org> X-Spam-Score: -0.2 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.173 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.173 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.2 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1jT8Xw-00D64u-CX Subject: [Valgrind-developers] [PATCH v2] mingw: Fix arch detection ifdefs for non-x86 mingw platforms X-BeenThere: valgrind-developers@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical discussion for valgrind developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: valgrind-developers-bounces@lists.sourceforge.net Don't assume that __MINGW32__ implies x86; Windows runs on ARM/ARM64 as well, and there are mingw toolchains that target those architectures. This mirrors how the MSVC parts of the same expressions are written, as (defined(_WIN32) && defined(_M_IX86)) and (defined(_WIN64) && defined(_M_X64)) - not relying on _WIN32/_WIN64 or __MINGW32__/__MINGW64__ alone to indicate architecture. Change the __MINGW64__ and _WIN64 ifdefs into plain __MINGW32__ and _WIN32 as well, for clarity - these defines mostly imply platform. --- include/valgrind.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers diff --git a/include/valgrind.h b/include/valgrind.h index c8b24a38e..00e985dca 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -131,12 +131,13 @@ # define PLAT_x86_darwin 1 #elif defined(__APPLE__) && defined(__x86_64__) # define PLAT_amd64_darwin 1 -#elif (defined(__MINGW32__) && !defined(__MINGW64__)) \ +#elif (defined(__MINGW32__) && defined(__i386__)) \ || defined(__CYGWIN32__) \ || (defined(_WIN32) && defined(_M_IX86)) # define PLAT_x86_win32 1 -#elif defined(__MINGW64__) \ - || (defined(_WIN64) && defined(_M_X64)) +#elif (defined(__MINGW32__) && defined(__x86_64__)) \ + || (defined(_WIN32) && defined(_M_X64)) +/* __MINGW32__ and _WIN32 are defined in 64 bit mode as well. */ # define PLAT_amd64_win64 1 #elif defined(__linux__) && defined(__i386__) # define PLAT_x86_linux 1