Skip to content

Commit b5caccb

Browse files
keith-packardcarlescufi
authored andcommitted
lib/picolibc: Use zephyr_libc_link_libraries to find toolchain lib
When using the toolchain C library, that must be added to the link command after all other libraries and modules in the system to resolve undefined symbols. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent 87a3060 commit b5caccb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libc/picolibc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(NOT CONFIG_PICOLIBC_USE_MODULE)
1313

1414
zephyr_compile_options(--specs=picolibc.specs)
1515
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
16-
zephyr_link_libraries(-T/dev/null --specs=picolibc.specs c -lgcc)
16+
zephyr_libc_link_libraries(-T/dev/null --specs=picolibc.specs c -lgcc)
1717
if(CONFIG_PICOLIBC_IO_FLOAT)
1818
zephyr_compile_definitions(PICOLIBC_DOUBLE_PRINTF_SCANF)
1919
zephyr_link_libraries(-DPICOLIBC_DOUBLE_PRINTF_SCANF)

0 commit comments

Comments
 (0)