On FreeBSD 12.0, without binary compatibility enabled, bootstrap-openjdk8 fails when building openjdk8.
Bad system call (core dumped)
# file /usr/local/bootstrap-openjdk8/bin/javac
/usr/local/bootstrap-openjdk8/bin/javac: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, FreeBSD-style, stripped
# uname -a
FreeBSD myhostname 12.0-RELEASE-p6 FreeBSD 12.0-RELEASE-p6 MYKERNELNAME amd64
This port requires appropriate COMPAT_FREEBSDxx kernel options for FreeBSD 12.0 (and 11.x, presumably). Perhaps it could check and give a noticeable warning if not enabled in the running kernel. If currently undetectable, maybe sysctl entries could be added to communicate such functionality (or lack of) to userland, e.g. "compat.10x.enabled" (but adding such a feature is probably beyond the scope of this bug report).
Note #1: ktrace shows the failing syscall for be one for compat11. This seemes odd for a 10.3 binary. Maybe it is normal, but I thought it was worth mentioning in case it was a symptom of a hidden problem. I also had to enable COMPAT_FREEBSD11 in the kernel to get this port to work.
. . .
1067 javac CALL compat11.stat
1067 javac RET compat11.stat -1 errno 78 Function not implemented
1067 javac PSIG SIGSYS SIG_DFL code=SI_KERNEL
1067 javac NAMI "javac.core"
Note #2: It does not appear to require the misc/compat10x port (when used to build java/openjdk8).
I can't reproduce this on my 12.1 machine. Can you update to 12.1 and see if you still need the compat package?