docs: pots/unix (standalone) has no instructions to build static linked micropython instance
Documentation URL
https://github.com/micropython/micropython/blob/master/ports/unix/README.md
Description
The ports/unix instructions not provide a way to build micropython with LDFLAGS -static to link ld statically. So even if you trying to build standalone binary it still build dynamic linked instance (e.g. ld.so.1). Dynamic linking to system ld.so.1 makes impossible to run binary on systems like Buildroot Linux
For make fully standalone static linked build you should directly modify Makefile cause make not handle LDFLAGS and docs not give instructions for this case.
Relative to issue: https://github.com/micropython/micropython/issues/17353
Code of Conduct
Yes, I agree
unix: Expand the build steps in the README.
Summary
-
Present the default build dependencies in one place at the top, and make a separate section about building standalone.
-
Add steps for the "minimal" variant as well.
-
Document that building standalone requires autoconf and libtool.
-
Allow MICROPY_STANDALONE to be set as an environment variable (makes for easier documentation as well, as it has to be set for multiple make invocations).
Closes #11313
Testing
I tested these changes by running various install and build steps in some throwaway Ubuntu 20.04 LTS containers (via podman run -it --rm ubuntu:20.04).
This work was funded through GitHub Sponsors.