Portable way to `strip` during `install` while cross-compiling

295 Views Asked by At

When install -s is run, it calls strip program as is, resulting in host-provided version of this program to be run, which breaks cross-compilation scenarios where target-specific version of strip must be called. To achieve such a goal, host-specific techniques need to be used, as far as I can see:

  • GNU install accepts --strip-program parameter to specify the binary path;

  • BSD install relies on STRIPBIN environment variable.

Why do they all use completely different approaches for the same very basic tasks? Why doesn't either of them use STRIP environment variable which is usually employed in Makefiles? Or am I missing some other, uniform method for this task?

0

There are 0 best solutions below