How to build with cross gcc?

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Wed, 30 Apr 2025 05:58:11 UTC
I tried to build locally with the gcc cross toolchain.  For that, I
installed the amd64-gcc14-14.1.0 (BTW, why is it still at 14.1 instead
of 14.2?) on my stable/14 amd64 workstation.  Then, in the srec/ of
very latest checkout of main, I did

exa% MAKEOBJDIRPREFIX=/tmp/obj/ make -j 16 -s buildworld __MAKE_CONF=/dev/null SRCCONF=/dev/null TARGET=amd64 TARGET_ARCH=amd64 CROSS_TOOLCHAIN=amd64-gcc14 

The result is
x86_64-unknown-freebsd13.5-cpp14: fatal error: cannot execute 'cc1': posix_spawnp: No such file or directory
compilation terminated.
--- key_prot.h ---
*** [key_prot.h] Error code 1
make[4]: stopped in /usr/home/kostik/work/DEV/src/include/rpcsvc

So it seems there are issues due to use of -B option, lets try to cover it.
I created the following symlinks:

exa% pwd
/usr/local/x86_64-unknown-freebsd13.5/bin
exa% ls -l cc1 cc1plus liblto_plugin.so 
lrwxr-xr-x  1 root wheel 60 Apr 30 08:49 cc1 -> /usr/local/libexec/gcc/x86_64-unknown-freebsd13.5/14.1.0/cc1
lrwxr-xr-x  1 root wheel 64 Apr 30 08:49 cc1plus -> /usr/local/libexec/gcc/x86_64-unknown-freebsd13.5/14.1.0/cc1plus
lrwxr-xr-x  1 root wheel 73 Apr 30 08:49 liblto_plugin.so -> /usr/local/libexec/gcc/x86_64-unknown-freebsd13.5/14.1.0/liblto_plugin.so

Which resulted in the failure in the next attempt:
/usr/home/kostik/work/DEV/src/lib/libc/rpc/key_call.c:82:1: error: unknown type name 'cryptkeyres'
   82 | cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, void *arg) = 0;
      | ^~~~~~~~~~~
/usr/home/kostik/work/DEV/src/lib/libc/rpc/key_call.c:83:1: error: unknown type name 'cryptkeyres'
   83 | cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, void *arg) = 0;
and so on overflowing the compiler tolerance to the number of errors.

What is the right way to build with gcc?