Re: Centralised architecture detection

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Burd <greg(at)burd(dot)me>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Lukas Fittl <lukas(at)fittl(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Subject: Re: Centralised architecture detection
Date: 2026-07-01 00:31:40
Message-ID: CA+hUKGKGex0tmyJFhyqg8QhFy_pNEQVAMCG=dC-o0ACGeMEBuw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 1, 2026 at 9:31 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-07-01 00:38:58 Re: Remove radius from initdb authentication methods
Previous Message Peter Smith 2026-06-30 23:49:13 Re: Support EXCEPT for ALL SEQUENCES publications