-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makefiles: introduce 'LIBS' variable #11111
Conversation
My test script output reports no changed values:
|
I'm having trouble understanding the LIBS variable. In #8711 it is used to differentiate between modules that generate a If In any case, this "static" and "dyncamic" libraries name, even if it comes from the ld manual, is very confusing, since in the end everything is statically linked. |
I picked the same name as in the It should point to archives that must be linked as "libraries" without The issue is that the documentation does not name them but only describe a usage:
All help on naming these with references is welcome. |
What about "NO_WHOLE_ARCHIVE" and explain that: "by default, modules and packages produce archives that are then linked with the or something like that. |
If I need to read the documentation to understand what should go in a variable, then the name is wrong. And I find There should be a "high level" concept that would describe what type of modules should go in without thinking about the exact link arguments. And currently, the things that should go in are not What I consider a bug, is needing to rely on this for some of the things we do that should not require it in the first place, and that we link as "archives libraries" things when they should not. But I lack the high level concept. |
It goes somehow with "use all objects from archive" or "link only what is used". I find some infos that talk about "shared object and static library" and the other archives are handled as shared objects. |
|
This introduced the LIBS variables to declare a module as a static library. It is a requirement to allow handling linking differently between static libraries and shared libraries in upcoming pull requests. Co-authored-by: Joakim Nohlgård <joakim.nohlgard@eistec.se>
9acd3d5
to
2890ff3
Compare
Update the documentation to replace 'SHARED' by 'OBJECTS', 'ARCHIVE'.
I updated the documentation and internal handling for With this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash, then we run on CI and then we merge.
I still question the name
I would expect somehow that With the naming I would be more maybe to a The output of the test is still "as expected":
|
Is naming still the problem? Maybe @jcarrano or @MrKevinWeiss can help with it? |
Meh, I have seen worse naming. I'd say lets move forward - as long as it is documented it will be OK. |
@cladmi, squash this. Let's get over all this naming stuff and get the functionality in. |
yup, please do! |
I somehow still do not like
If we ignore For me, this list has two goal, we know that some libraries cannot be linked with But the main one, is to more easily enable linking with whole archive in RIOT without fixing anything. I would even first list all modules that define a Including the new linking should get the same binary size and symbols for everything by removing everything that could change it. |
@kaspar030 opinions on this? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Contribution description
This introduced the LIBS variables to declare a module as a static
library.
It is a requirement to allow handling linking differently between
static libraries and shared libraries in upcoming pull requests.
Co-authored-by: Joakim Nohlgård joakim.nohlgard@eistec.se
This is split of #8711 and modified as some specific handling done for
USEPKG
is not necessary anymore.I took the name "static libraries" and "shared libraries" from
man ld
in the--whole-archive
section.Testing procedure
Compiling should sill work in the same way and the output of
BASELIBS
should not have changed.To simplify testing, I comment
APPDEPS
in the pic32 boards as it contains the full path and is not relevant for this test:and compare the value of
BASELIBS
.I use https://gist.github.com/cladmi/9818888da7412a9195ec0d4c3c2a8b8a to compare the output and it should see no difference:
There are currently /bin/sh: 1: Syntax error: Missing '))' messages but they are unrelated.
Issues/PRs references
This is a split and refactored out of #8711
Depends on #11109 refactoring