cmake: xcc: remove TOOLCHAIN_LIBS

Following the footstep of GCC/Clang cmake code to remove
TOOLCHAIN_LIBS, xcc also has it removed and utilizes
something similar to c_library to link the HAL library.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2024-10-11 13:24:24 -07:00 committed by Anas Nashif
commit ac98d0e350
3 changed files with 2 additions and 8 deletions

View file

@ -40,12 +40,6 @@ foreach(file_name include/stddef.h include-fixed/limits.h)
list(APPEND NOSTDINC ${_OUTPUT})
endforeach()
list(APPEND TOOLCHAIN_LIBS
gcc
hal
)
# For CMake to be able to test if a compiler flag is supported by the
# toolchain we need to give CMake the necessary flags to compile and
# link a dummy C file.

View file

@ -5,4 +5,5 @@
set_linker_property(NO_CREATE PROPERTY c_library "-lc")
set_linker_property(NO_CREATE PROPERTY rt_library "-lgcc")
set_linker_property(NO_CREATE PROPERTY c++_library "-lstdc++")
set_linker_property(PROPERTY link_order_library "c;rt")
set_linker_property(NO_CREATE PROPERTY hal_library "-lhal")
set_linker_property(PROPERTY link_order_library "c;rt;hal")

View file

@ -130,7 +130,6 @@ function(toolchain_ld_link_elf)
${NO_WHOLE_ARCHIVE_LIBS}
$<TARGET_OBJECTS:${OFFSETS_LIB}>
-L${PROJECT_BINARY_DIR}
${TOOLCHAIN_LIBS}
${TOOLCHAIN_LD_LINK_ELF_DEPENDENCIES}
)