Sup, building an own kernel and removing: COMPAT_FREEBSD10 renders building lang/rust a funny process full of virtual hugs. A simple: file /usr/ports/lang/rust/work/rustc-1.32.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo reports: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, FreeBSD-style, with debug_info, not stripped which might be a problem if COMPAT_FREEBSD10 isn't present in the kernel. Booting the entire system with the GENERIC kernel solves the problem, though the problem is also solved booting the entire system installing another OS.
> which might be a problem if COMPAT_FREEBSD10 isn't present in the kernel. Many bootstrap compilers are built for older FreeBSD versions. Rust is no exception to this. Leave both COMPAT_FREEBSD10 and COMPAT_FREEBSD11 in your kernel config. There is very little reason to disable them. *** This bug has been marked as a duplicate of bug 234466 ***
And many other bootstrap compilers will compile code fine, e.g. openjdk8 which has the same problem, even when being launched on a machine without COMPAT_xxx. Rust, even when installing from pkg.freebsd.org, won't do anything if the COMPAT_xxx part is missing.