Skip to content
Commit fb3d201c authored by Sebastian Bøe's avatar Sebastian Bøe Committed by Carles Cufí
Browse files

cmake: STACK_CANARIES: Re-write how compatibility is checked



This re-write fixes several issues with how we were checking for
compatibility with the canary flags:

If a compiler did not support any stack canaries, but a user had still
enabled them, this would silently result in no canaries being added
instead of error-ing out as it should have.

Compatiblity for '-mstack-protector-guard=global' was unnecessarily
being tested twice, once in 'check_c_compiler_flag' and once in
'zephyr_cc_option'.

Compatibility was being tested with 'check_c_compiler_flag' which is
slower than 'zephyr_check_compiler_flag' because it does not cache
it's results.

Signed-off-by: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent 38a77799
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment