-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
GCC Cross Compiler Strip #109295
Comments
I'm happy to sponsor a fix for this if its reasonable! |
@matthewbauer thought you might be interested in this one |
Yeah! So I can definitely merge #108060, but you're right that it doesn't actually strip true cross-compilation. @Ericson2314 originally introduced the TARGET_STRIP & STRIP distinction. It's possible we can just set "stripped" always to true, but I would want to make sure we aren't running "strip" on the wrong things. |
Yeah |
I marked this as stale due to inactivity. → More info |
Not stale |
I marked this as stale due to inactivity. → More info |
Not Stale, Still Relevant |
I thought this was done to prevent broken binaries, since (IIRC correctly) ARM binaries were sometimes broken when stripped. But maybe the situation has improved? |
So I tried cross-compiling a minimal all-stripped armv7l NixOS image and tested it a bit on a Raspberry PI 2, and it boots and works without any issue. Note that comments in compilers'
I'm not sure how to test that. |
Possible fix for cross-compiler stripping: #182513 |
Describe the bug
Currently cross compiler toolchains using gcc set dontStrip = true. This leads to larger closures, especially for C++ projects targeting other architectures using musl as the libc.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Additional context
The root of the problem seems to stem from strip.sh using the same strip binary for both libraries and binaries, where in a cross compiler toolchain what probably should happen is the target strip should be used against libraries, and the host strip should be used against binaries.
Notify maintainers
@Synthetica9
The text was updated successfully, but these errors were encountered: