Hello Josh and Christophe,
Josh wrote:
> since you already supply precompiled static proot binaries, I
> probably don't have to convince you anymore that static proot
> binaries are useful :)
>
> To convince downstream distributions to also
> supply a static binary alongside their dynamically compiled ones, it
> would be great if your makefile could provide a target which
> statically links the proot binary. What do you think?
I assume you want static linking to get of portable binary. In that
case, static linking is not enough; you also have to use libraries
that don't rely on kernel features that are not too recent, otherwise
users might get the error "FATAL: kernel too old" from the startup
code embedded in your binary.
This is reason why the static versions of proot I provide are
statically linked against a C library that assumes a 2.6.0 Linux
kernel:
https://github.com/cedric-vincent/proot-static-build/blob/master/GNUmakefile#L58
Please note that this C library is not that old, it just ensures it
doesn't use features that were not available in Linux 2.6.0.
Cédric.