Skip to content
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

Support for static binaries via the menu? #539

Open
rubyFeedback opened this issue Jan 26, 2025 · 5 comments
Open

Support for static binaries via the menu? #539

rubyFeedback opened this issue Jan 26, 2025 · 5 comments

Comments

@rubyFeedback
Copy link

The README mentions LDFLAGS="--static", so strictly speaking my request here is not necessary.

However had, in the old busybox interface (make menuconfig), one option was to compile everything in a static binary. So this is just a convenience option perhaps, if one entry could be added there where we can compile statically. I often forget setting LDFLAGS, so having this in the main menu would be nice, just like busybox. At any rate, thank you for reading this request.

@landley
Copy link
Owner

landley commented Jan 27, 2025 via email

@enh-google
Copy link
Collaborator

Speaking of, I have a TODO item to collate CONFIG_WGET_LIBTLS,
CONFIG_TOYBOX_LIBCRYPTO, and CONFIG_TOYBOX_LIBZ into a single toggle
saying to use internal implementations even when library versions of
things like libz are available in the build environment.

note that you might only have some subset of the libraries available but still want to use them -- android has the latter two, for example, but not the former -- so even if the user-visible knob is just "yes"/"no", internally you'll still need to cope with the different possible combinations.

(you'd have noticed this anyway, since libtls and libcrypto are mutually exclusive in wget :-) )

@landley
Copy link
Owner

landley commented Jan 28, 2025 via email

@enh-google
Copy link
Collaborator

On 1/27/25 08:47, enh-google wrote:
It would have to autodetect what's available and use the builtins for
the rest. I wouldn't be doing it to simplify the plumbing, it would be
to simplify the user experience of people running menuconfig.

yeah, that makes sense.

(Although
between __has_include() header probes and the existing --as-needed
library dropout logic, it might still wind up simpler anyway?)

that would certainly work for Android and let me just delete stuff. i don't know if there's anyone who has a library but doesn't want toybox to use it? (or whether you should care enough to support them even if they do exist. they can always carry a local patch.)

@landley
Copy link
Owner

landley commented Jan 30, 2025 via email

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

No branches or pull requests

3 participants