Re: Centralised architecture detection - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Centralised architecture detection
Date
Msg-id CA+hUKGKGex0tmyJFhyqg8QhFy_pNEQVAMCG=dC-o0ACGeMEBuw@mail.gmail.com
Whole thread
In response to Re: Centralised architecture detection  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jul 1, 2026 at 9:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So I was wrong to guess that every riscv64 platform predefines
> __riscv64__.  Greg, could you check what predefined architecture
> symbols that compiler does supply?  I'm tempted to blindly guess
> that __riscv64 will work, but I'd rather not guess.

No riscv here, but poking around, it looks like it's supposed to be
__riscv, and then __riscv_xlen == 32 or 64, or perhaps pointer size
check?  Not like the others, but this seems to have come down from the
RISCV project.

https://lists.riscv.org/g/sig-toolchains/attachment/688/0/riscv-toolchain.pdf
https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc

It looks like they didn't want __riscv32 and __riscv64?

https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/E8EO-Fd4t3s



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Next
From: Feng Wu
Date:
Subject: Re: [PATCH v2] Avoid internal error for invalid interval typmods