| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Greg Burd <greg(at)burd(dot)me> |
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Lukas Fittl <lukas(at)fittl(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Bryan Green <dbryan(dot)green(at)gmail(dot)com> |
| Subject: | Re: Centralised architecture detection |
| Date: | 2026-06-30 21:31:47 |
| Message-ID: | 3079743.1782855107@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> Pushed. I shall now watch the buildfarm from a safe distance.
Sure enough, greenfly is not happy:
ccache /scratch/opt/llvm-22/bin/clang -Isrc/port/libpgport_srv.a.p -Isrc/include -I../pgsql/src/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -fno-strict-aliasing -fwrapv -fexcess-precision=standard -D_GNU_SOURCE -Wpointer-arith -Werror=vla -Werror=unguarded-availability-new -Wmissing-format-attribute -Wcast-function-type -Wformat-security -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -Wimplicit-fallthrough -Wdeclaration-after-statement -Wmissing-variable-declarations -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -Wno-cast-function-type-strict -march=rv64gcv -fPIC -DBUILDING_DLL -MD -MQ src/port/libpgport_srv.a.p/bsearch_arg.c.o -MF src/port/libpgport_srv.a.p/bsearch_arg.c.o.d -o src/port/libpgport_srv.a.p/bsearch_arg.c.o -c ../pgsql/src/port/bsearch_arg.c
In file included from ../pgsql/src/port/bsearch_arg.c:36:
../pgsql/src/include/c.h:162:2: error: "cannot identify target architecture"
162 | #error "cannot identify target architecture"
| ^
1 error generated.
So I was wrong to guess that every riscv64 platform predefines
__riscv64__. Greg, could you check what predefined architecture
symbols that compiler does supply? I'm tempted to blindly guess
that __riscv64 will work, but I'd rather not guess.
To save you having to look it up, something like this should
do the trick:
clang -dM -E - </dev/null | sort >clang-predefined-macros
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-06-30 21:38:00 | Re: DDL deparse |
| Previous Message | Fabrízio de Royes Mello | 2026-06-30 21:18:58 | Re: Improving display of octal GUCs |