I'm going to build psqlODBC (Arm64X binaries) for use with Windows 11 on Arm.
The problem is that the `
msvc_gendef.pl` generates the wrong `postgres.def` for aarch64 (Windows).
Currently, for aarch64, the preceding underscore is removed like for x86.
However, the expected functionality for aarch64 is the same as for x64: keep the preceding underscore.
This causes linker errors such as:
> postgres.def : error LNK2001: unresolved external symbol brin_parallel_build_main [C:\repos\postgresql-17.0\build-last-try-3\src\backend\22e3565@@postgres@exe.vcxproj]
Example from src/backend/access/brin/brin.c:
> /*
> * Perform work within a launched parallel process.
> */
> void
> _brin_parallel_build_main(dsm_segment *seg, shm_toc *toc)
> {
> // ...
> }
The attached file is a patch to fix this issue.