[PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm) - Mailing list pgsql-hackers

From kenji uno
Subject [PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm)
Date
Msg-id CAKK3KjtMJL6+xKHJYUxf=UNc6=N0iE_TUEH_XSonuKu7Mmzv2g@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm)
List pgsql-hackers
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.

--
kenji uno (h8mastre@gmail.com)
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is this a typo?
Next
From: Fujii Masao
Date:
Subject: Re: Make PQgetResult() not return NULL on out-of-memory error