ARC: MWDT: link mwdt libc only if it is required
We don't need MWDT libc if we are using minimal one provided by Zephyr. So let's avoid linking mwdt libc if CONFIG_MINIMAL_LIBC is enabled. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
ce47512c09
commit
22e0bef358
1 changed files with 12 additions and 0 deletions
|
@ -125,6 +125,18 @@ macro(toolchain_ld_baremetal)
|
|||
zephyr_ld_options(-Hnocrt)
|
||||
endif()
|
||||
|
||||
# There are two options:
|
||||
# - We have full MWDT libc support and we link MWDT libc - this is default
|
||||
# behavior and we don't need to do something for that.
|
||||
# - We use minimal libc provided by Zephyr itself. In that case we must not
|
||||
# link MWDT libc, but we still need to link libmw
|
||||
if(CONFIG_MINIMAL_LIBC)
|
||||
zephyr_ld_options(
|
||||
-Hnolib
|
||||
-Hldopt=-lmw
|
||||
)
|
||||
endif()
|
||||
|
||||
# Funny thing is if this is set to =error, some architectures will
|
||||
# skip this flag even though the compiler flag check passes
|
||||
# (e.g. ARC and Xtensa). So warning should be the default for now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue