-
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
make: fix linking #5757
make: fix linking #5757
Conversation
Dunno if that's still true, but once upon a time (probably in 2014) GCC considered all the interrupt handlers as unused, and removed them. Turns out boards are rather boring if you don't have any external interrupts. Since then there was a lot of work to make -fLTO and --gc-sections work, so probably this problem was fixed. too. |
@Kijewski The issue with missing ISRs or interrupt vectors is solved by marking the functions with |
e33bca3
to
1893e5a
Compare
|
@kaspar030 what makes this still WIP? |
Feature freeze -> postponed |
1d4bbe8
to
69c0833
Compare
69c0833
to
8fd6515
Compare
@cladmi I created a proof of concept for switching to using |
@gebart Cool :) Using The work done by @kaspar030 will help for the modules that would break if not handled as libraries. Do you remember if other modules required to be moved to EXTRA_LIBS ? |
Closing in favour of #8711. |
Ever wondered why exactly files needed to be put into "UNDEF" in order to link correctly?
When considering archives, ld only considers objects in archives if there is at least one symbol in them needed elsewhere. Also, it doesn't seem to consider a symbol if it already found a weak symbol before.
In the current make system, this leads to:
Both feel hacky to me.
This PR encloses processing of module-archives in "--whole-archive", causing all objects to be always considered for linking. That way, the UNDEF-objects are not needed anymore.
Unfortunately this always overrides all defined isr defined in periph_*, as they are currently all always built. So to not get somewhat bloated binaries, this depends on
#5065#7241.Also, the config module breaks, so #5756 is also required.(#5756 merged)