diff --git a/cmake/platforms/cross_generic_gcc.cmake b/cmake/platforms/cross_generic_gcc.cmake index 9e8a22c31..862ec2506 100644 --- a/cmake/platforms/cross_generic_gcc.cmake +++ b/cmake/platforms/cross_generic_gcc.cmake @@ -1,9 +1,10 @@ set (CMAKE_SYSTEM_NAME "Generic" CACHE STRING "") -include (CMakeForceCompiler) - -CMAKE_FORCE_C_COMPILER ("${CROSS_PREFIX}gcc" GNU) -CMAKE_FORCE_CXX_COMPILER ("${CROSS_PREFIX}g++" GNU) +set (CMAKE_C_COMPILER "${CROSS_PREFIX}gcc") +set (CMAKE_CXX_COMPILER "${CROSS_PREFIX}g++") +# _exit is in the BSP rather than in libgcc, leaving this out +# causes errors in try_compile on ARM generic. +set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE STRING "") set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER CACHE STRING "")