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>
This commit is contained in:
parent
87a30609da
commit
b5caccb2ba
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ if(NOT CONFIG_PICOLIBC_USE_MODULE)
|
||||||
|
|
||||||
zephyr_compile_options(--specs=picolibc.specs)
|
zephyr_compile_options(--specs=picolibc.specs)
|
||||||
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
|
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
|
||||||
zephyr_link_libraries(-T/dev/null --specs=picolibc.specs c -lgcc)
|
zephyr_libc_link_libraries(-T/dev/null --specs=picolibc.specs c -lgcc)
|
||||||
if(CONFIG_PICOLIBC_IO_FLOAT)
|
if(CONFIG_PICOLIBC_IO_FLOAT)
|
||||||
zephyr_compile_definitions(PICOLIBC_DOUBLE_PRINTF_SCANF)
|
zephyr_compile_definitions(PICOLIBC_DOUBLE_PRINTF_SCANF)
|
||||||
zephyr_link_libraries(-DPICOLIBC_DOUBLE_PRINTF_SCANF)
|
zephyr_link_libraries(-DPICOLIBC_DOUBLE_PRINTF_SCANF)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue