=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <[email protected]> writes:
> Thomas Munro <[email protected]> writes:
>> Instead of repeating compilers' architecture macros throughout the tree
>> and sometimes getting it wrong, let's detect them in one central place,
>> and define our own macros of the form:
>>
>> PG_ARCH_{ARM,LOONGARCH,MIPS,PPC,RISCV,S390,SPARC,X86}
>> PG_ARCH_{ARM,LOONGARCH,MIPS,PPC,RISCV,S390,SPARC,X86}_{32,64}
Nathan Bossart reminded me of this thread after I'd independently
rediscovered the same thing [1]. I agree with standardizing on
just one spelling of these CPU-type macros. But I wonder why we
should invent our own instead of standardizing on gcc's spellings
(that is, __x86_64__ etc). The amount of code churn required for
this patch would drop drastically if we did it that way. And I
suspect it would be less likely that we'd need to fixup future patch
submissions than if we have a homegrown standard.
regards, tom lane
[1]
https://www.postgresql.org/message-id/flat/3035145.1780503430%40sss.pgh.pa.us