armclang: ARM Compiler C library support
Support for ARM Compiler C library. This commit add support for the ARM Compiler C libary in: - Kconfig - libc/armstdc A new Kconfig symbol is added to allow a toolchain to specify if they support linking with the minimal C library. Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has newlib. The armclang toolchain selects the CMake scatter file generator and disables support for the LD linker template which is not supported by armlink. For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder with a minimal implementation to work with the ARM Compiler C library is added. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
28ba86d066
commit
36bb00d1f5
18 changed files with 377 additions and 9 deletions
|
@ -67,13 +67,11 @@ foreach(isystem_include_dir ${NOSTDINC})
|
|||
list(APPEND isystem_include_flags -isystem ${isystem_include_dir})
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags})
|
||||
set(CMAKE_REQUIRED_FLAGS ${isystem_include_flags})
|
||||
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
|
||||
# Load toolchain_cc-family macros
|
||||
|
||||
macro(toolchain_cc_nostdinc)
|
||||
if(NOT "${ARCH}" STREQUAL "posix")
|
||||
zephyr_compile_options( -nostdinc)
|
||||
endif()
|
||||
endmacro()
|
||||
if(CONFIG_ARMCLANG_STD_LIBC)
|
||||
# Zephyr requires AEABI portability to ensure correct functioning of the C
|
||||
# library, for example error numbers, errno.h.
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -D_AEABI_PORTABILITY_LEVEL=1)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue