cmake: Toolchain abstraction: Introducing macro toolchain_cc_imacros

The macro is intended to abstract the -imacros compiler option for
inclusion of the autoconf.h header file. The abstraction allows for a
given toolchain to decide how the inclusion of the header file is to
be done.

The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.

No functional change expected.

Signed-off-by: Danny Oerndrup <daor@demant.com>
This commit is contained in:
Danny Oerndrup 2019-06-11 13:55:53 +02:00 committed by Alberto Escolar
commit 4ddbc0096a
6 changed files with 16 additions and 1 deletions

View file

@ -80,6 +80,7 @@ include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_cpp.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_asm.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_baremetal.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/${COMPILER}/target_warnings.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_imacros.cmake)
macro(toolchain_cc_security_fortify)
# No op, clang doesn't understand fortify at all