-fcf-protection -mcet is incompatible with makecontext family functions since they can't properly set up and destroy shadow stack pointer. This change provides a mechanism to help detection shadow stack compatibility. The current proposal is to add -mcheck-shstk-compat option which will predefine __CHECK_SHSTK_COMPAT__ macro. The option will be set on by default. Then we can add a code
#if defined __SHSTK__ && defined __CHECK_SHSTK_COMPAT__ # error This source is incompatible with -mshstk #endif to <ucontext.h>. Ok for trunk? Igor
0001-Add-mcheck-shstk-compat.patch
Description: 0001-Add-mcheck-shstk-compat.patch