You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow apps or boards to define a set of external libraries to be linked into the zephyr binary,
but inside the -Wl,--whole-archive part of the link command.
For ex. an app may want to link the libraries
/path/lib_a.a /path/lib_b.a & /path/lib_c.a
where these libraries may use each other.
Background:
Currently it is only possible to add them after the --no-whole-archive part of the link command.
Which means the linker will ignore any symbol inside these libraries it has not seen some use for yet.
So, if for ex. lib_b is the first one using some symbol in lib_a but lib_a was listed first, the symbol won't be found.
[The old fashion solution, is to order the libraries carefully and list them as many times as needed, but that is what the --whole-archive linker option is meant to avoid]
The text was updated successfully, but these errors were encountered:
We have discussed this offline. There are several ways to achieve the same effect, but none that seem
cleaner than adding them to whole-archive.
Solution proposal:
Introduce a "Zephyr external library" concept to the CMake extensions.
These libraries are conceptually Zephyr libraries (so they are for instance added to the list of libraries to be --whole-archive'd), but they have a property set on them so that they are allowed to be source-less (Zephyr libraries are normally not allowed to be source-less).
A Zephyr library not having source files is usually due to a
misconfiguration and will lead to an obscure error message. But
imported Zephyr libraries don't have source files so we need to skip
the source file when a library is imported.
An imported Zephyr library is normally used to reference externally
built code, either prebuilt or recursively built through an external
build system.
This fixeszephyrproject-rtos#5497
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
A Zephyr library not having source files is usually due to a
misconfiguration and will lead to an obscure error message. But
imported Zephyr libraries don't have source files so we need to skip
the source file when a library is imported.
An imported Zephyr library is normally used to reference externally
built code, either prebuilt or recursively built through an external
build system.
This fixes#5497
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Allow apps or boards to define a set of external libraries to be linked into the zephyr binary,
but inside the -Wl,--whole-archive part of the link command.
For ex. an app may want to link the libraries
/path/lib_a.a /path/lib_b.a & /path/lib_c.a
where these libraries may use each other.
Background:
Currently it is only possible to add them after the --no-whole-archive part of the link command.
Which means the linker will ignore any symbol inside these libraries it has not seen some use for yet.
So, if for ex. lib_b is the first one using some symbol in lib_a but lib_a was listed first, the symbol won't be found.
[The old fashion solution, is to order the libraries carefully and list them as many times as needed, but that is what the --whole-archive linker option is meant to avoid]
The text was updated successfully, but these errors were encountered: