Skip to content

Conversation

@statham-arm
Copy link
Contributor

PR #60, which introduced it, set the build flags -g -Oz for newlib-nano (both libc and libcxx), and -g -O2 for full newlib libcxx. -g was probably left over from development: in our production builds it's taking up a great deal of space, making the newlib-nano overlay archive more like ¾Gb than ¼Gb.

I've reverted the entire flags change for full newlib libcxx, putting it back to how it was before that PR. For newlib-nano, I've removed the -g, but kept -Oz, on the basis that optimizing for small size still seems sensible if someone's deliberately selecting the smallest version of newlib.

PR arm#60, which introduced it, set the build flags `-g -Oz` for
newlib-nano (both libc and libcxx), and `-g -O2` for full newlib
libcxx. `-g` was probably left over from development: in our
production builds it's taking up a great deal of space, making the
newlib-nano overlay archive more like ¾Gb than ¼Gb.

I've reverted the entire flags change for full newlib libcxx, putting
it back to how it was before that PR. For newlib-nano, I've removed
the `-g`, but kept `-Oz`, on the basis that optimizing for small size
still seems sensible if someone's deliberately selecting the smallest
version of newlib.
@statham-arm statham-arm requested review from dcandler and smithp35 May 28, 2025 13:41
@statham-arm statham-arm merged commit 59ea1b4 into arm:arm-software May 28, 2025
@statham-arm statham-arm deleted the newlib-debug-flags branch May 28, 2025 14:10
voltur01 added a commit to voltur01/arm-toolchain that referenced this pull request Jun 20, 2025
After -O2 optimization was removed in arm#349 it was reported that memory usage increased a lot arm#352

The proposed solution is to use -Os which is based on -O2, but takes care of code size that is important in embedded applications.

Change-Id: I1af61cea3a43a73de61077830a2292918c5f1b91
voltur01 added a commit that referenced this pull request Jun 20, 2025
After -O2 optimization was removed in
#349 it was reported that
memory usage increased a lot
#352

The proposed solution is to use -Os which is based on -O2, but takes
care of code size that is important in embedded applications.
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