toolchain: add wrapper logic
The way android builds things is via relative paths everywhere and with
the working directory of the top level checkout. When we go to build
external packages though, they often need to be in a different working
directory which means all of the relative paths break.
Add a compiler wrapper to merge the existing android env vars and the
relative paths to create absolute paths we can leverage.
Further, android will pass flags to the system paths during compile and
link. If those aren't used, then the build/link will fail in weird ways.
Unfortunately, some build systems might filter/sort flags, so add those
to the wrapper too rather than try and track down/fix every build system.
TEST=built packages and they worked in qemu
2 files changed