-
Notifications
You must be signed in to change notification settings - Fork 2.1k
LTO fixes #5742
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
LTO fixes #5742
Conversation
gcc-ar is a wrapper supplied by gcc for properly handling thin LTO objects.
(fixes problems with info-boards-supported etc)
No ROM cost, only fixes a linker error with non-nano newlib and LTO enabled.
@gebart Are you fine with me basically adopting your PR? I dropped the "LTO=yes" compatibility stuff and the WIP cortex fix commit from 3361. |
@kaspar030 sure, feel free to improve on this. I agree with dropping the Den 10 aug. 2016 4:40 PM skrev "Kaspar Schleiser" <notifications@github.com
|
); | ||
} | ||
|
||
void __attribute__((naked)) __attribute__((used)) isr_svc(void) { |
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.
Is it not dangerous to assume that these two functions will be placed in order and next to each other without any padding in the final binary? I'm sensing that we are relying on linker implementation specific behaviour here
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.
totally, I forgot the function call in pendsv. will fix.
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.
fixed
|
} | ||
|
||
void __attribute__((naked)) __attribute__((used)) isr_svc(void) { | ||
__asm__ volatile ( | ||
/* SVC handler entry point */ | ||
/* PendSV will continue from above and through this part as well */ |
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.
Reword or remove this comment.
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.
reworded
|
@gebart IMHO this can be merged, what do you think? |
I agree. Since LTO is still experimental it does not matter that it only produces working binaries for some of the platforms. |
Is that an ACK? :) |
Changes look fine, though it's missing SRC_NOLTO for kw2x and k60 (vector.c) if that causes the same build error as the other cortex vectors. If you feel like it you could rename vector.c -> vectors.c in kw2x and k60 to match all the other Cortex CPUs. |
did! |
ACK |
Murdock is happy -> go! |
- corrects and enhances changes introduces in RIOT-OS#5742
- corrects and enhances changes introduced in RIOT-OS#5742
- corrects and enhances changes introduced in RIOT-OS#5742
- corrects and enhances changes introduced in RIOT-OS#5742
Based on #3361.
This PR adds the possibility to exclude some files from being built with LTO, and applies this to some critical files on Cortex-M.
Some boards don't compile (all msp430, mulle, pba-d-01-kw2x), but as this is completely optional (have to manually add LTO=1 to the Makefile, still get a big fat warning), and the codesize savings are 5-10%, IMHO we should get this merged as is.