From patchwork Sat Apr 4 20:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Storsjo X-Patchwork-Id: 185200 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp2021359ilr; Sat, 4 Apr 2020 13:36:24 -0700 (PDT) X-Google-Smtp-Source: APiQypIcaQvzHb5bB8i6B0PXXiSUtUWePaRmjPqdj/VlGYF99Ih3InGgAz1tORvgOieDyaoh8nAD X-Received: by 2002:a17:902:8e84:: with SMTP id bg4mr13281754plb.11.1586032584066; Sat, 04 Apr 2020 13:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586032584; cv=none; d=google.com; s=arc-20160816; b=JDfLrqWSrxy4BIvOMkcF/iQim/rCA55YNz6uVvd3s/PrZTKNwAMfDxXKG0Rpd88v5/ O8YDQdbufyeKDpNS3UHDv82UcVMY7AmB2qo7TtFT/R6klQUurig5NLm+J20Uo+Lv/cuj LxDQElwA951i57IdQ7UEqoLGfYAvBhI/3n06xdVyliMz1ptqRfcbGEEQtgjfog2oOhDS 9H8puUUNYCuSpdqP9I0s5P/cRO96UMpdF326UIKGa0nbzwojzyYINd9/Eyh5QQppMzve usUaZQ9vrPzAnnLKJqoyKLBl0grWjIclOCywBBxrCGvA8F8hJzHFlN5uyEPCGOSvgK1e okPQ== 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:message-id:date:to:from:dkim-signature :dkim-signature:dkim-signature; bh=zP7x9Ddoik8u4R+xQfsaasBiNj2BeKexXFMvormqUZ8=; b=LnoUbQf7lTVfNfF0WHLThV1BmNJncsYXzNHD8iSswkEwkqFxPzzYAYK9pqbUA8T3c1 GbAwT6stgrIzXq+Wu7jCWAlQqDgNuO8w+AmwdXgB/tuqI3lgjdUyi7hYD3ULD88aAYrg YzX53+XsVQDlTlq25aPvjtwqg7f5aReFSDJlHeNmitpcTmEJ2Wm4L0Ry9lSkNAHlP2kc X7ceYFKL8fG4gj4AhUFzOgtNY25zRwww3WbE1J0fdb7CTJpfCDGb8xLFazuerMNmXeRb QhL5zxUONvZQ3qfd/ABm4Kh1C7ycDgCt+VMJ6onD56VXZ40gyHpLlkFWS6+cKq1h3pLM ccGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="K5I+i+/6"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="jgIXzCk/"; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=UDP9tQIO; 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 e1si9074455pgd.433.2020.04.04.13.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Apr 2020 13:36:24 -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="K5I+i+/6"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="jgIXzCk/"; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=UDP9tQIO; 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jKpWH-0003IO-2y; Sat, 04 Apr 2020 20:35:57 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jKpWF-0003I5-FV for valgrind-developers@lists.sourceforge.net; Sat, 04 Apr 2020 20:35:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BZwcyMUzZhW6KFqTjZngvFifvW/tYNbjv7XoUrRui4U=; b=K5I+i+/6T0t/1x9WR81KVEyBVA Z1O1O5po4nxFXI9Dg2WIe/lDjYKO6thtW3MN1T7Nq/jJ6TohB3j6on8KZFkFCPENpSTsERNL7Z49l 395CsmhurxdHPTvApD40M346rUAv7lCAEXOKGC5CpfTdGONCmh2UyA4AYPscS81NpOOw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BZwcyMUzZhW6KFqTjZngvFifvW/tYNbjv7XoUrRui4U=; b=jgIXzCk/3mcoHj1ePlHtYiYJc8 3LSkvQD9v69tx3rHP8lVP546cyY6EbczbzYV4/EgT1aATZWSgqOJt7yLeRwrBJM5TFckOnYBKsg30 BVMIEe+oJy/mpKfkNvMdAlTKJtnEuGshZ1lmiHEgvNopxLNdEfP3t3NJwygwmGDLDlmw=; Received: from mail-lj1-f194.google.com ([209.85.208.194]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jKpWA-007Nbl-1e for valgrind-developers@lists.sourceforge.net; Sat, 04 Apr 2020 20:35:55 +0000 Received: by mail-lj1-f194.google.com with SMTP id p14so10527866lji.11 for ; Sat, 04 Apr 2020 13:35:49 -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; bh=BZwcyMUzZhW6KFqTjZngvFifvW/tYNbjv7XoUrRui4U=; b=UDP9tQIOeqUXSFDBRnASdcMGaUIytcU06o874zoi1a5oCKmnXz5OCzNq/I7q/BGCOX l7j3B192fF7RZ5z/xgeZ/mUinyUtuukvJxuqA7r4oHAIybiaHyfQ6KoxYscgev0eb7h8 blxMmldvT4PeC5GOdoXrtqEvq7R5BCFAV1bec+pIPwhZu2T51c7tF1g17H+0SLur+aq+ PGknqLEg5ghSIw4O1/9VyhrY6y+hYszwYOPtdIHxbgyIy6AxCVmka8ag9fTu3qakuCVJ tkJGp4HC3CNODjJzXwO8MYVXVXkXwFUm6hRoh8zm2UPMCVhxQXq8X0SDHa7OkzMWXFDQ 7YUw== 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; bh=BZwcyMUzZhW6KFqTjZngvFifvW/tYNbjv7XoUrRui4U=; b=lWTKuoQMrbrpt4v7sF9qwraFB4mciaoASkLggaz4fHHKAe0bLFMRyvX7yAnb/82V0e URemhH/VesrlsqbjdeVX8x7QDlz5PSbUXK5ty2AQA7sV+88Yyn6e1Iqg9jlNYGRRN3YP ojshTnJEyAK8jWznqVCaYxB+rXFODVTFnzsmLXmIyTBZ8fPmDIUlbx5MGanYU3nSkbuM rd0+Q3pYr3XpaVQxWjKDzg0OhQfdqFkJK715L/NGzo1OeCMrJb3NANpN6S/qWggCKQu4 o+LoG8Uytn5FC54ulP8lVhsW0X0viUgnLdNWK6zu1HBl118hNLc4thim3OS7asLCIHNT FlzA== X-Gm-Message-State: AGi0PubFUanZt8BxrKWX73VAPHDmTVQNrlXMuQHTWL3r8KKXeRwsdxIX 2wGTQ5grxP9lczFBC2slw0cw9M06dQY= X-Received: by 2002:a2e:2e14:: with SMTP id u20mr8316878lju.73.1586032542709; Sat, 04 Apr 2020 13:35:42 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id u7sm8643034lfb.84.2020.04.04.13.35.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 13:35:42 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: valgrind-developers@lists.sourceforge.net Date: Sat, 4 Apr 2020 23:35:41 +0300 Message-Id: <20200404203541.628-1-martin@martin.st> X-Mailer: git-send-email 2.17.1 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.194 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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.194 listed in list.dnswl.org] X-Headers-End: 1jKpWA-007Nbl-1e Subject: [Valgrind-developers] [PATCH] 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 part 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. --- include/valgrind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 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..e8195c1ce 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -131,11 +131,11 @@ # 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__) \ +#elif (defined(__MINGW64__) && defined(__x86_64__)) \ || (defined(_WIN64) && defined(_M_X64)) # define PLAT_amd64_win64 1 #elif defined(__linux__) && defined(__i386__)