Skip to content

Gain back space in small builds by using lib/libm instead of toolchain libm. #329

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

Merged
merged 2 commits into from
Oct 16, 2017

Conversation

dhalbert
Copy link
Collaborator

  1. Use lib/libm for small (non-Express builds) to gain back a lot of flash space.
  2. Add flag INTERNAL_LIBM to mpconfigboard.mk files to signal using lib/libm.
  3. Fix floating-point warnings in lib/libm
  4. Turn off -finline-limit, no longer needed due to 1.
  5. Add explicit flags for SPI_FLASH_FILESYSTEM and INTERNAL_FLASH_FILESYSTEM to mpconfigboard.mk files, so they don't need to know the name of the .c file that implements those. Makefile takes care of checking the flags and including the right files.

@dhalbert dhalbert self-assigned this Oct 15, 2017
@dhalbert dhalbert requested a review from tannewt October 15, 2017 18:09
@dhalbert dhalbert changed the base branch from master to 2.x October 15, 2017 19:12
@dhalbert
Copy link
Collaborator Author

Didn't start a test build, I think due to my specifying the wrong upstream branch initially. Looks like I can trigger by closing and reopening. Will try that.

@dhalbert dhalbert closed this Oct 15, 2017
@dhalbert dhalbert reopened this Oct 15, 2017
@tannewt
Copy link
Member

tannewt commented Oct 16, 2017

I poked Rosie and restarted Travis.

Why not use the internal libm for all builds? Seems like consistency might be better.

…flash space.

2. Add flag INTERNAL_LIBM to mpconfigboard.mk files to signal using lib/libm.
3. Fix floating-point warnings in lib/libm
4. Turn off -finline-limit, no longer needed due to 1.
5. Add explicit flags for SPI_FLASH_FILESYSTEM and INTERNAL_FLASH_FILESYSTEM
to mpconfigboard.mk files, so they don't need to know the name of the .c file
that implements those. Makefile takes care of checking the flags and including
the right files.
@dhalbert dhalbert force-pushed the 2.x_issue_325_libm branch 2 times, most recently from 01803d3 to 66db657 Compare October 16, 2017 15:20
@dhalbert
Copy link
Collaborator Author

@tannewt This is ready to look at again. Using internal libm for all atmel-samd builds now. Removed the pulseio addition on Gemma/Trinket: that will go in a new pull request.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for finding this! You struck code size gold!

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