Skip to content

Conversation

@TheAssassin
Copy link
Member

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.

@github-actions
Copy link

Build for testing:
artifacts i686
artifacts x86_64
artifacts armhf
artifacts aarch64
Use at your own risk.

@github-actions
Copy link

Build for testing:
artifacts x86_64
artifacts i686
artifacts armhf
artifacts aarch64
Use at your own risk.

@probonopd
Copy link
Member

Can you please add a table comparing binary sizes? Does RAM consumption change?

@TheAssassin
Copy link
Member Author

TheAssassin commented Nov 28, 2024

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.

Copy link
Member

@probonopd probonopd left a 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.
@TheAssassin
Copy link
Member Author

You could file a bug upstream @ Alpine regarding the gcc compiler bug, then we could switch back.

@TheAssassin TheAssassin merged commit c811634 into main Dec 2, 2024
17 checks passed
@probonopd probonopd deleted the fix-pie branch December 2, 2024 20:57
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