| From: | "Greg Burd" <greg(at)burd(dot)me> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| 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-07-01 11:39:40 |
| Message-ID: | c0b5e15e-1c58-4de3-9c66-aa04f53e9bfb@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Jun 30, 2026, at 5:31 PM, Tom Lane wrote:
> I wrote:
>> Pushed. I shall now watch the buildfarm from a safe distance.
>
> Sure enough, greenfly is not happy:
That's a good thing, and the reason it exists. :)
> 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
Attached, happy to help out.
> regards, tom lane
best.
-greg
| Attachment | Content-Type | Size |
|---|---|---|
| clang-predefined-macros | application/octet-stream | 13.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Burd | 2026-07-01 11:43:16 | Re: Centralised architecture detection |
| Previous Message | solai v | 2026-07-01 11:31:36 | Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement |