Re: [PATCH] Add native windows on arm64 support - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Add native windows on arm64 support
Date
Msg-id Y419yaW1Q1uoXbtY@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Add native windows on arm64 support  (Niyas Sait <niyas.sait@linaro.org>)
Responses Re: [PATCH] Add native windows on arm64 support
Re: [PATCH] Add native windows on arm64 support
List pgsql-hackers
On Fri, Dec 02, 2022 at 11:09:15AM +0000, Niyas Sait wrote:
> I've attached a new revision of the patch (v5) and includes following
> changes,
>
> 1. Add support for meson build system
> 2. Extend MSVC scripts to handle ARM64 platform.
> 3. Add arm64 definition of spin_delay function.
> 4. Exclude arm_acle.h import with MSVC compiler.

Hmm.  There are still a few things that need some attention here:
- USE_SSE42_CRC32C_WITH_RUNTIME_CHECK should not be set for aarch64.
- This is missing updates for ICU.  Looking at the upstream code,
Build.Windows.ProjectConfiguration.props uses libARM64 and binARM64
for the output library and binary paths.
- This is missing updates for krb5.  For this case, I am seeing no
traces of packages for aarch64, so I guess that we could just fail
hard until someone cares enough to ping us about what to do here.
- There were zero changes in the docs, but we need to update at least
the section about architectures supported for the 64-bit builds.
- Last comes OpenSSL, that supports amd64_arm64 as build target (see
NOTES-WINDOWS.md), and the library names are libssl.lib and
libcrypto.lib.  Looking at
https://slproweb.com/products/Win32OpenSSL.html, there are
experimental builds for arm64 with OpenSSL 3.0.  Niyas or somebody
else, could you look at the contents of lib/VC/ and see what we could
rely on for the debug builds after installing this MSI?  We should
rely on something like lib/VC/sslcrypto64MD.lib or
lib/VC/sslcrypto32MD.lib, but for arm64.

With meson gaining in maturity, perhaps that's not the most urgent
thing as we will likely remove src/tools/msvc/ soon but I'd rather do
that right anyway as much as I can to avoid an incorrect state in the
tree at any time in its history.

-       USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => undef,
+       USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => $self->{platform} eq "ARM64" ? : 1 : undef,
Did you actually test this patch?  This won't work at all with perl,
per se the double colon after the question mark.

For now, please find attached an updated patch with all the fixes I
could come up with.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Optimize common expressions in projection evaluation
Next
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning