Skip to content

Commit 9dcbd21

Browse files
committed
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 <[email protected]>
1 parent 3fa0711 commit 9dcbd21

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

cmake/compiler/xcc/target.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ foreach(file_name include/stddef.h include-fixed/limits.h)
4040
list(APPEND NOSTDINC ${_OUTPUT})
4141
endforeach()
4242

43-
list(APPEND TOOLCHAIN_LIBS
44-
gcc
45-
hal
46-
)
47-
48-
4943
# For CMake to be able to test if a compiler flag is supported by the
5044
# toolchain we need to give CMake the necessary flags to compile and
5145
# link a dummy C file.

cmake/linker/xt-ld/linker_libraries.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
set_linker_property(NO_CREATE PROPERTY c_library "-lc")
66
set_linker_property(NO_CREATE PROPERTY rt_library "-lgcc")
77
set_linker_property(NO_CREATE PROPERTY c++_library "-lstdc++")
8-
set_linker_property(PROPERTY link_order_library "c;rt")
8+
set_linker_property(NO_CREATE PROPERTY hal_library "-lhal")
9+
set_linker_property(PROPERTY link_order_library "c;rt;hal")

cmake/linker/xt-ld/target.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ function(toolchain_ld_link_elf)
130130
${NO_WHOLE_ARCHIVE_LIBS}
131131
$<TARGET_OBJECTS:${OFFSETS_LIB}>
132132
-L${PROJECT_BINARY_DIR}
133-
${TOOLCHAIN_LIBS}
134133

135134
${TOOLCHAIN_LD_LINK_ELF_DEPENDENCIES}
136135
)

0 commit comments

Comments
 (0)