| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Ensure USE_AVX... symbols are not defined if not building for x8 |
| Date: | 2026-06-04 14:37:41 |
| Message-ID: | E1wV9CX-0013HO-0C@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Ensure USE_AVX... symbols are not defined if not building for x86_64.
Various code assumed this was true already, and usually it is.
However, it emerges that in a "universal" (multi-architecture)
macOS build, configure will define USE_AVX2_WITH_RUNTIME_CHECK
if the build host is x86_64, and then the arm64 half of the
build fails.
Ideally we'd get pg_config.h to define this symbol conditionally
depending on defined(__x86_64__), but I don't see any way to
persuade Autoconf to do that. Instead, clean up the mess by
#undef'ing it again in c.h for not-x86_64 builds.
For consistency I made c.h also #undef the USE_AVX512... symbols.
Those are not actively broken, but it seems only happenstance
that configure's tests for them fail in a universal build.
Down the road we may have occasion to add more #undef's here.
This problem is new in v19, so no need for back-patch.
Reported-by: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
Reported-by: Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/15574903-87C9-478A-B2D7-CC8F4C275DBB@gmx.net
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e88bd2736f86d66dc75ad8b2f7edd799d20b7d53
Modified Files
--------------
src/include/c.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-06-04 15:16:46 | pgsql: Re-pgindent nodeModifyTable.c after commit 993a7aa0e4. |
| Previous Message | Peter Eisentraut | 2026-06-04 10:04:07 | pgsql: Small terminology fixes in comments |