openwrt-toolchain-imx6.cmake 670 B

1234567891011121314151617
  1. SET(CMAKE_SYSTEM_NAME Linux)
  2. SET(OWRT_STAGING_DIR /opt/devel/openwrt/openwrt.git/staging_dir)
  3. SET(OWRT_TARGET target-arm_cortex-a9+neon_musl_eabi)
  4. SET(OWRT_TOOLCHAIN toolchain-arm_cortex-a9+neon_gcc-7.4.0_musl_eabi)
  5. SET(OWRT_CROSS ${OWRT_STAGING_DIR}/${OWRT_TOOLCHAIN}/bin/arm-openwrt-linux-)
  6. SET(CMAKE_C_COMPILER ${OWRT_CROSS}gcc)
  7. SET(CMAKE_CXX_COMPILER ${OWRT_CROSS}g++)
  8. SET(CMAKE_FIND_ROOT_PATH ${OWRT_STAGING_DIR}/${OWRT_TARGET})
  9. SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  10. SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  11. SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  12. ADD_DEFINITIONS(-mcpu=cortex-a9 -mfpu=neon -g3 -fno-caller-saves -fhonour-copts -mfloat-abi=hard)