cmake: check_compiler_flag: Fix bug where checks were aliased
cmake: check_compiler_flag: Fix bug where checks were aliased

Fix a bug where different compiler checks were aliased and therefore
the test results were incorrectly re-used.

The 'check' string is used by CMake internally to cache test results,
but when testing linker flags the check string has been aliased
between the different linker checks. To fix the aliasing issue we add
the CMAKE_REQUIRED_FLAGS variable to the 'check' string. The aliasing
issue disappears because the linker flag-under-test is in
'CMAKE_REQUIRED_FLAGS'.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

zephyriot/zephyr,galak/zephyr,ldts/zephyr,ldts/zephyr,explora26/zephyr,Vudentz/zephyr,galak/zephyr,kraj/zephyr,punitvara/zephyr,punitvara/zephyr,nashif/zephyr,Vudentz/zephyr,kraj/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,punitvara/zephyr,finikorg/zephyr,mbolivar/zephyr,explora26/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,zephyriot/zephyr,mbolivar/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,finikorg/zephyr,mbolivar/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,zephyriot/zephyr,finikorg/zephyr,Vudentz/zephyr,ldts/zephyr,explora26/zephyr,explora26/zephyr,ldts/zephyr,nashif/zephyr,kraj/zephyr,explora26/zephyr,kraj/zephyr,zephyriot/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,galak/zephyr,mbolivar/zephyr