When compiling the progenitor version of the kernel using gcc 12.2.0, the following error appears.
main.c:(.text+0x1d8): undefined reference to `__stack_chk_fail'
This could be fixed by either adding the -fno-stack-protector flag to KERNEL_FLAGS or by implementing the __stack_chk_fail function. A possible implementation could be:
void __stack_chk_fail() {
print("Stack check failed!");
while (1);
}