Skip to content
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

Revert "Removed -nostdlib from LDFLAGS" #1419

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

gemenerik
Copy link
Member

@gemenerik gemenerik commented Oct 15, 2024

This reverts commit af0cbe5.

-nostdlib was added to LDFLAGS when we converted to kbuild. PR #1310 removed -nostdlib in order to make it possible to use the atof() function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). From what I can tell this occurs with newer version of newlib on e.g. Ubuntu 24.04.

420 days later, atof() is not being used anywhere internally. Discussion in #1299 is not very convincing on why atof() is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. However, it now causes linker warnings.

This PR fixes the linker warnings by reverting this commit. It comes with a bonus reduced flashed and RAM usage, but at a cost of losing the atof() fn.

I haven't been able to find a way, but am open to suggestions that preserve atof() functionality.

This reverts commit af0cbe5.

`-nostdlib` was added to LDFLAGS when we converted to kbuild.
PR #1310 removed -nostdlib in order to make it possible to use the `atof()` function.
However, this now causes similar linker warnings to those it was trying to solve (discussion 784).
420 days later, `atof()` is not being used anywhere internally. Discussion in #1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
@gemenerik gemenerik merged commit 55cff9b into master Oct 16, 2024
25 checks passed
@gemenerik gemenerik deleted the rik/linkerwarnings branch October 16, 2024 08:02
@gemenerik gemenerik restored the rik/linkerwarnings branch October 16, 2024 11:38
@gemenerik gemenerik deleted the rik/linkerwarnings branch October 16, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants