Skip to content

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

Merged
tannewt merged 2 commits into
adafruit:2.xfrom
dhalbert:2.x_issue_325_libm
Oct 16, 2017
Merged

tannewt merged 2 commits into
adafruit:2.xfrom
dhalbert:2.x_issue_325_libm

Conversation

@dhalbert

Copy link
Copy Markdown
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
Copy Markdown
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

tannewt commented Oct 16, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

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