2017-10-03 22:31:55 +08:00
|
|
|
zephyr_cc_option_ifdef(CONFIG_LTO -flto)
|
|
|
|
|
|
|
|
zephyr_compile_options(
|
2018-01-02 06:13:36 +08:00
|
|
|
-Wno-format-truncation
|
2017-10-03 22:31:55 +08:00
|
|
|
-fno-freestanding
|
|
|
|
-Wno-undef
|
|
|
|
-Wno-implicit-function-declaration
|
|
|
|
-m32
|
|
|
|
-MMD
|
|
|
|
-MP
|
|
|
|
${TOOLCHAIN_C_FLAGS}
|
|
|
|
${ARCH_FLAG}
|
|
|
|
-include ${PROJECT_SOURCE_DIR}/arch/posix/include/posix_cheats.h
|
|
|
|
)
|
|
|
|
|
2017-11-22 21:28:52 +08:00
|
|
|
zephyr_compile_options_ifdef(CONFIG_COVERAGE
|
|
|
|
-fprofile-arcs
|
|
|
|
-ftest-coverage
|
|
|
|
)
|
|
|
|
zephyr_link_libraries_ifdef(CONFIG_COVERAGE
|
|
|
|
-lgcov
|
|
|
|
)
|
|
|
|
|
2017-12-30 22:20:08 +08:00
|
|
|
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
|
2017-10-03 22:31:55 +08:00
|
|
|
|
|
|
|
zephyr_ld_options(
|
|
|
|
-ldl
|
|
|
|
-pthread
|
|
|
|
-m32
|
|
|
|
)
|
|
|
|
|
|
|
|
# About the -include directive: The reason to do it this way, is because in this
|
|
|
|
# manner it is transparent to the application. Otherwise posix_cheats.h needs to
|
|
|
|
# be included in all the applications' files which define main( ), and in any
|
|
|
|
# app file which uses the pthreads like API provided by Zephyr
|
|
|
|
# ( include/posix/pthread.h / kernel/pthread.c ) [And any future API added to
|
|
|
|
# Zephyr which will clash with the native POSIX API] . It would also need to
|
|
|
|
# be included in a few zephyr kernel files.
|
|
|
|
|
|
|
|
|
|
|
|
add_subdirectory(soc)
|
|
|
|
add_subdirectory(core)
|
|
|
|
|
|
|
|
# Override the flag used with linker.cmd
|
|
|
|
# "-Wl,--just-symbols linker.cmd" instead of "-T linker.cmd"
|
|
|
|
set_property(GLOBAL PROPERTY TOPT -Wl,--just-symbols)
|