[PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm)

From: kenji uno <h8mastre(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH] Fix msvc_gendef.pl for aarch64 (Windows on Arm)
Date: 2025-11-11 05:11:40
Message-ID: CAKK3KjtMJL6+xKHJYUxf=UNc6=N0iE_TUEH_XSonuKu7Mmzv2g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(at)exe(dot)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(at)gmail(dot)com)

Attachment Content-Type Size
msvc_gendef.patch text/plain 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-11-11 05:20:45 Re: Make PQgetResult() not return NULL on out-of-memory error
Previous Message Tom Lane 2025-11-11 04:59:53 Re: Is this a typo?