crt: Check for compiler support for `no_stack_protector`

This commit contains two changes:

1. `no_stack_protector` is applied only when one of the `-fstack-protector*`
   options is in effect, for example, when someone builds the CRT with such
   an option in their `CFLAGS`.

2. When the attribute is required but is not supported by the compiler, it
   results in broken executables. Now in this case an error is triggered.

Signed-off-by: LIU Hao <lh_mouse@126.com>
(cherry picked from commit f6f95ec556ff0ada2d65b5e1fcc2a30a56da4cab)
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed