Properly detect availability of flags in cmake/compilerFlags.cmake (#1252)
Instead of relying on fragile and complex logic to decide if a compiler flag is available or not, use the check_c_compiler_flag() macro provided by the CMake standard library. This for example avoids using -fcf-protection on architectures that don't support this option. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit dd2d181755a6e642c0a8e3225ef5407fff49eb3a) When resolving the conflict from applying the patch, I also took the liberty of re-indenting the snippet correcly and fixing mismatching HAS_FCF_PROTECTION and HAS_FSTACK_PROTECTOR_STRONG variables (the conditionals used GCC_ prefix but the variables were definded without it). Signed-off-by: Jan Tojnar <jtojnar@gmail.com>main
parent
ab6c91dd64
commit
bbe0b70840
Loading…
Reference in New Issue