Working with releng/12.1 revision 354894 on amd64. Problem also occurs with stable/12 revision 354853 on amd64. I can build the GENERIC kernel just fine. As soon as I try to remove BPF the kernel fails to link. The following simple kernel config is enough to demonstrate the problem: include GENERIC ident NOBPF nodevice bpf
It seems r297816 should handle the case when DEV_BPF is not defined.
If it is only that commit I'll fix it. If there's more I'll bounce it back to the pool.
A commit references this bug: Author: bz Date: Sun Nov 24 23:21:47 UTC 2019 New revision: 355070 URL: https://svnweb.freebsd.org/changeset/base/355070 Log: Allow kernel to compile without BPF. r297816 added some bpf magic for VIMAGE unconditionally which no longer allows kernels to compile without bpf (but with other networking). Add the missing ifdef checks and allow a kernel to compile without bpf again. PR: 242136 Reported by: dave mischler.com MFC after: 2 weeks Changes: head/sys/net/if.c
(In reply to Andrey V. Elsukov from comment #1) Thanks for the diag finding the commit in question ae@!
I can confirm that this change fixes the problem in head, and that the differences used as a patch to stable/12/sys/net/if.c as of r355849 fixes the problem in stable/12. When might the MFC be completed?
A commit references this bug: Author: bz Date: Tue Jan 7 16:58:39 UTC 2020 New revision: 356455 URL: https://svnweb.freebsd.org/changeset/base/356455 Log: MFC r355070: Allow kernel to compile without BPF. r297816 added some bpf magic for VIMAGE unconditionally which no longer allows kernels to compile without bpf (but with other networking). Add the missing ifdef checks and allow a kernel to compile without bpf again. PR: 242136 Reported by: dave mischler.com Changes: _U stable/12/ stable/12/sys/net/if.c
A commit references this bug: Author: bz Date: Tue Jan 7 17:02:50 UTC 2020 New revision: 356456 URL: https://svnweb.freebsd.org/changeset/base/356456 Log: MFC r355070: Allow kernel to compile without BPF. r297816 added some bpf magic for VIMAGE unconditionally which no longer allows kernels to compile without bpf (but with other networking). Add the missing ifdef checks and allow a kernel to compile without bpf again. PR: 242136 Reported by: dave mischler.com MFC after: 2 weeks Changes: _U stable/11/ stable/11/sys/net/if.c
Thanks a lot for reporting! The problem should be fixed in HEAD and stable/12 and stable/11 and with that fixed in any upcoming releases as well.