The build (both in sys/conf/files.arm64 and in sys/modules/armv8crypto/Makefile) passes an explicit -march=armv8-a+crypto which overrides -march=morello+c64 (or -march=morello, though so long as it's not dealing with user pointers there won't be silent ABI incompatibility with a hybrid kernel) and thus -mabi=purecap is an error (assertion failure, though https://git.morello-project.org/morello/llvm-project/-/merge_requests/76 when finally merged will turn that into a proper error). Unfortunately, whilst assembly has .arch_extension crypto to just add features, -march=+crypto isn't a thing and I'm not aware of an equivalent, so I believe the rules will either have to do ${CFLAGS:C/-march=.*/&+crypto} (though we don't always pass that upstream... it seems +crypto can also be applied to -mcpu but I'm not sure if we even always pass at least one of those) or get the right -march baseline some other way.
NB: to reproduce the module build failure, comment out the broken_modules.append("armv8crypto") in cheribuild's cheribsd.py (and obviously just add it to the kernel config to test files.arm64)
The build (both in sys/conf/files.arm64 and in sys/modules/armv8crypto/Makefile) passes an explicit -march=armv8-a+crypto which overrides -march=morello+c64 (or -march=morello, though so long as it's not dealing with user pointers there won't be silent ABI incompatibility with a hybrid kernel) and thus -mabi=purecap is an error (assertion failure, though https://git.morello-project.org/morello/llvm-project/-/merge_requests/76 when finally merged will turn that into a proper error). Unfortunately, whilst assembly has
.arch_extension crypto
to just add features,-march=+crypto
isn't a thing and I'm not aware of an equivalent, so I believe the rules will either have to do${CFLAGS:C/-march=.*/&+crypto}
(though we don't always pass that upstream... it seems +crypto can also be applied to -mcpu but I'm not sure if we even always pass at least one of those) or get the right -march baseline some other way.