[PATCH] Fix build on MINGW on ARM64

From: Lars Kanis <lars(at)greiz-reinsdorf(dot)de>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix build on MINGW on ARM64
Date: 2025-02-01 19:22:32
Message-ID: CAHXCYb2OjNHtoGVKyXtXmw4B3bUXwJX6M-Lcp1KcMCRUMLOocA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This patch limits the workaround of using __buildin_setjmp on the
Windows MINGW platform. This workaround is only necessary for legacy
MSVCRT based toolchain, but not for UCRT based. It is not available at
all on clang on ARM64 resulting in the following compiler error:

error: __builtin_longjmp is not supported for the current target

This patch is used since years in MSYS2 packages:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-postgresql/postgresql-14.0-use-mingw-setjmp-on-ucrt.patch

It is also used in ruby-pg to allow compiling for
aarch64-w64-windows-gnu: https://github.com/ged/ruby-pg/pull/626/files

It would be nice if this patch could be merged upstream.

--
Regards, Lars

Attachment Content-Type Size
0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch application/octet-stream 1.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-02-02 01:44:12 Cross-type index comparison support in contrib/btree_gin
Previous Message Andrey Borodin 2025-02-01 17:29:06 Re: more backtraces