Re: Broken build on macOS (Universal / Intel): cpuid instruction not available

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <johncnaylorls@gmail.com>
Cc: Jakob Egger <jakob@eggerapps.at>, pgsql-hackers <pgsql-hackers@postgresql.org>, Tobias Bussmann <t.bussmann@gmx.net>
Date: 2026-05-07T16:22:04Z
Lists: pgsql-hackers
I wrote:
> ... The code in HEAD doesn't have
> that guard, and is essentially assuming that every x86 platform
> wil provide HAVE__GET_CPUID or HAVE__CPUID.

Independently of whether macOS multi-arch is something we consider
supportable, I think the aforesaid assumption is a bad idea.
Can't we make pg_cpuid() return zeroes if it doesn't know how to
get the info, analogously to what pg_cpuid_subleaf() does?

			regards, tom lane