1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}ccac PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
- find_program(CMAKE_CXX_COMPILER ${CROSS_COMPILE}ccac PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
- find_program(CMAKE_ASM_COMPILER ${CROSS_COMPILE}ccac PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
- list(APPEND CMAKE_REQUIRED_FLAGS
- -c
- -HL
- -Hnosdata
- -Hnolib
- -Hnocrt
- -Hnoentry
- -Hldopt=-Bbase=0x0
- -Werror
- )
- string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
- set(NOSTDINC "")
- list(APPEND NOSTDINC ${TOOLCHAIN_HOME}/arc/inc)
- if(CONFIG_ARCMWDT_LIBC AND CONFIG_LIB_CPLUSPLUS)
- list(APPEND NOSTDINC ${TOOLCHAIN_HOME}/arc/lib/src/c++/inc)
- endif()
- foreach(isystem_include_dir ${NOSTDINC})
- list(APPEND isystem_include_flags -isystem "\"${isystem_include_dir}\"")
- endforeach()
- list(APPEND TOOLCHAIN_C_FLAGS -Hnocopyr -HL -Hnosdata -Hoff=Stackcheck_alloca)
- if(NOT CONFIG_ARCMWDT_LIBC)
- list(APPEND TOOLCHAIN_C_FLAGS -fno-builtin)
- endif()
|