Skip to content

Strip host binaries #1724

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

shenki
Copy link
Contributor

@shenki shenki commented May 22, 2025

No description provided.

shenki added 2 commits May 22, 2025 21:58
GCC has an install target 'install-strip' that strips debug symbols at
install time. This reduces the installed size from ~4GB to ~2GB.

Enable strip on install by default but provide the option to disable it.

The downside of this is when GCC ICEs, we don't get a proper backtrace
any more.

Signed-off-by: Joel Stanley <[email protected]>
Reduces the binary size from ~65MB to ~17MB.

Signed-off-by: Joel Stanley <[email protected]>
@shenki shenki force-pushed the strip-host-binaries branch from c9a3a62 to 9784aee Compare May 22, 2025 12:28
@demin-han
Copy link
Contributor

binutils and gdb also support "install-strip" target, current PR only strips gcc.

Is gcc-xxx-stage1 necessary to use "make install-strip-gcc" ?

@@ -1392,6 +1394,7 @@ Optional Features:
--disable-gdb Don't build GDB, as it's not upstream
--enable-llvm Build LLVM (clang)
--enable-host-gcc Build host GCC to build cross toolchain
--disable-strip Do not strip debug symbols at install time
Copy link
Collaborator

Choose a reason for hiding this comment

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

Stripping is disabled by default. So I would expect enable-strip instead of disable-strip.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this needs to be documented in README.md.

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.

3 participants