-
Notifications
You must be signed in to change notification settings - Fork 20
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
Build static PIE binaries with clang #88
Conversation
Build for testing: |
Build for testing: |
Can you please add a table comparing binary sizes? Does RAM consumption change? |
The size difference is negligible and I don't think that any RAM consumption would change. I don't see any reason for it. And it wouldn't change the runtime efficiency either. Loading might be delayed by a few nanoseconds to fire up an RNG. Edit: the major difference in size is between compilers. From my observations, a ~7% increase in size is to be expected with clang. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that the increased binary size comes from switching from gcc to clang. Maybe we can experiment with some -O
options to reduce binary sizes independently from this PR. Approving this under the working hypothesis that this has no ill side effects but helps e.g., tools like AppImageLauncher. In case it turns out to be problematic, we'd have to revert it.
gcc is not capable of linking with -static-pie, therefore we switch to using clang.
You could file a bug upstream @ Alpine regarding the gcc compiler bug, then we could switch back. |
gcc is not capable of linking with -static-pie, therefore we switch to using clang.
This PR allows us to use https://github.com/io12/userland-execve-rust and apparently also AppImageLauncher's binfmt-bypass (via
TARGET_APPIMAGE
) to run AppImages with this static runtime.Fixes #87.