My setup for using an all-llvm toolchain is this:
`/etc/src.conf`:
```
CROSS_TOOLCHAIN=llvmroot
LLVM_ROOT=/usr/local/llvm16
```
`/usr/local/share/toolchains/llvmroot.mk` (I wonder why this file doesn't already exist somewhere… well maybe in the future the `llvm16.mk` etc. files would include the binutils):
```
X_COMPILER_TYPE=clang
XCC=${LLVM_ROOT}/bin/clang
XCXX=${LLVM_ROOT}/bin/clang++
XCPP=${LLVM_ROOT}/bin/clang-cpp
XLLVM_LINK=${LLVM_ROOT}/bin/llvm-link
XLD=${LLVM_ROOT}/bin/ld.lld
XAS=${LLVM_ROOT}/bin/llvm-as
XAR=${LLVM_ROOT}/bin/llvm-ar
XNM=${LLVM_ROOT}/bin/llvm-nm
XOBJCOPY=${LLVM_ROOT}/bin/llvm-objcopy
XRANLIB=${LLVM_ROOT}/bin/llvm-ranlib
XSTRINGS=${LLVM_ROOT}/bin/llvm-strings
XSIZE=${LLVM_ROOT}/bin/llvm-size
XSTRIPBIN=${LLVM_ROOT}/bin/llvm-strip
```
Confirming that the ifdefs happened by seeing the `freebsd4` symbol:
```
$ readelf -a /usr/obj/usr/home/val/base/amd64.amd64/sys/GENERIC/elf-vdso32.so.1
…
Symbol table '.dynsym' contains 3 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000230 0 NOTYPE GLOBAL DEFAULT 9 __vdso_ia32_sigcode@@FBSD_1.7 (2)
2: 0000000000000244 0 NOTYPE GLOBAL DEFAULT 9 __vdso_freebsd4_ia32_sigcode@@FBSD_1.7 (2)
```