Re: Broken build on macOS (Universal / Intel): cpuid instruction not available - Mailing list pgsql-hackers

From John Naylor
Subject Re: Broken build on macOS (Universal / Intel): cpuid instruction not available
Date
Msg-id CANWCAZZNu5nLzeeNs8TyC6Xs4HKzHni=yeTqCH7_QNpktR2nMQ@mail.gmail.com
Whole thread
In response to Re: Broken build on macOS (Universal / Intel): cpuid instruction not available  (Tobias Bussmann <t.bussmann@gmx.net>)
Responses Re: Broken build on macOS (Universal / Intel): cpuid instruction not available
List pgsql-hackers
On Fri, May 8, 2026 at 3:26 PM Tobias Bussmann <t.bussmann@gmx.net> wrote:
> > Am 08.05.2026 um 05:48 schrieb John Naylor <johncnaylorls@gmail.com>:
> >
> > Jakob and Tobias, how far do you get with the attached, at least for
> > the target x86 case?
>
> thanks! I tried the patch and it fixes the universal build that broke with
> 16743db (and make check passes for both architectures). It remains to be

Great! I've pushed that fix.

> analysed how useful these universal builds are given the lack of
> optimisations for one of the architectures, but at least they are possible
> again, as they were previously.

Taking a quick look at the configure output you provided, certain
optimizations will be lacking on both architectures:

checking for _mm_crc32_u8 and _mm_crc32_u32... no
checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... no
checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with
CFLAGS=-march=armv8-a+crc+simd... no
checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with
CFLAGS=-march=armv8-a+crc... no
...
checking which CRC-32C implementation to use... slicing-by-8

But compiler builtins seem to work:

checking for builtin __atomic int32 atomic operations... yes
checking for builtin __atomic int64 atomic operations... yes

--
John Naylor
Amazon Web Services



pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Re: pg_stat_io_histogram
Next
From: Andrew Dunstan
Date:
Subject: Re: Fix wrong error message from pg_get_tablespace_ddl()