Thanks for the replies Justin and Stan.
First off, sorry I mistook the package I was using, it is kernel-devel for those kernels.
The build we run is actually part of our CI, we don't have access to the full kernel
on it, just to the sources available as part of the kernel-devel packages, so building the
driver as part of the kernel itself would come with some additional challenges that we
might not want to take on at the moment. We also build a separate eBPF probe that is not
failing so we might fallback to using just that for 5.18+ kernels.
It does strike me as weird that I've not been able to find anyone else having this
problem when building out of tree kernel modules. Guess I'll have to go hunt down what
piece of the code is trying to use cc_mkenc and try to get rid of it, since I have no
compelling argument for exporting the symbol other than "my module doesn't
compile"