Many extern struct pcpu <something>__pcpu declarations were copied/pasted in sources. The issue is the definition is MD, but it cannot be provided by machine/pcpu.h due to actual struct pcpu defined in sys/pcpu.h later than the inclusion of machine/pcpu.h. There is no way around it, due to machine/pcpu.h supplying part of struct pcpu fields.
To work around the problem, add a new machine/pcpu_aux.h header, which should fill any needed MD definitions after struct pcpu definition is completed. This allows to remove copies of __pcpu spread around the source.
While there, fix bhyve.
[I only handled x86 and riscv, the later was not compiled. I will finish the patch after the discussion]