Re: Compile error on the aarch64 platform: Missing asm/hwcap.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steven Niu <niushiji(at)gmail(dot)com>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, 高增琦 <pgf00a(at)gmail(dot)com>, "tmunro(at)postgresql(dot)org" <tmunro(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Compile error on the aarch64 platform: Missing asm/hwcap.h
Date: 2025-11-17 20:31:37
Message-ID: 958335.1763411497@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> ... I'm inclined to think
> it's better to do something like

> +#if defined(__linux__) && (defined(__aarch64__) ? !defined(HWCAP_CRC32) : !defined(HWCAP2_CRC32))

> or perhaps that's too unreadable and we should break it out into
> multiple #if's.

I tried it as a nest of #ifdef's and decided that was none too
readable either, so pushed it as above. Thanks for the report!

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-11-17 20:34:10 Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Previous Message Noah Misch 2025-11-17 20:22:25 Re: Updating IPC::Run in CI?