1set(CMAKE_SYSTEM_NAME Linux)
2set(CMAKE_SYSTEM_PROCESSOR x86_64)
3
4set(CMAKE_C_COMPILER    gcc)
5set(CMAKE_CXX_COMPILER  g++)
6set(AS                  as)
7set(AR                  ar)
8set(OBJCOPY             objcopy)
9set(OBJDUMP             objdump)
10set(SIZE                size)
11
12set(THREADX_ARCH "linux")
13set(THREADX_TOOLCHAIN "gnu")
14
15set(LINUX_FLAGS "-g -pthread")
16
17set(CMAKE_C_FLAGS   "${LINUX_FLAGS} " CACHE INTERNAL "c compiler flags")
18set(CMAKE_CXX_FLAGS "${LINUX_FLAGS} -fno-rtti -fno-exceptions" CACHE INTERNAL "cxx compiler flags")
19set(CMAKE_ASM_FLAGS "${LINUX_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
20set(CMAKE_EXE_LINKER_FLAGS "${LINUX_FLAGS} ${LD_FLAGS} -Wl,--gc-sections" CACHE INTERNAL "exe link flags")
21
22SET(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug compiler flags")
23SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags")
24SET(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags")
25
26SET(CMAKE_C_FLAGS_RELEASE "-O3" CACHE INTERNAL "c release compiler flags")
27SET(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE INTERNAL "cxx release compiler flags")
28SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
29
30# this makes the test compiles use static library option so that we don't need to pre-set linker flags and scripts
31set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
32