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


Reply via email to