RMerl/asuswrt-merlin — pull request #611 by ppuryear (2014-04-29 06:31:31+00:00)
Title: Use a pkg-config wrapper during cross-compilation.

See #421 and #609. This prevents the build system from trying to use headers and libraries
on the host machine when building for a different architecture.

The build system doesn't actually use pkg-config, but several configure scripts complain if it's missing. This wrapper script works by pointing pkg-config at `$STAGEDIR`, which is empty during compilation, effectively ensuring pkg-config won't find any libraries. (The directory used is essentially arbitrary as long as it doesn't have any pkg-config data; I'm open to other ideas.)

I put the script in `release/tools` because the build system always adds that directory to the PATH, and because the script is the same for both MIPS and ARM, so it doesn't need to be in both of their respective toolchain directories. Again, I'm open to any better ideas here.