Allow target autodetection to work when cross-compiling.
authorAlexis Ballier <alexis.ballier@gmail.com>
Sat, 12 May 2012 19:45:13 +0000 (15:45 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 14 May 2012 18:23:03 +0000 (11:23 -0700)
commit871bd23e4c41bb0fb94b72832b270766de540dea
treefb7dae0d443561db224844b9191a91cf8a738986
parent44d35f7b257cc3e737a38eb9537d57c3e0479885
Allow target autodetection to work when cross-compiling.

Allow CHOST to override the gcc -dumpmachine output. This allows to
use the target autodetection code when cross compiling by setting the
CHOST variable.

On Gentoo, we would like to support easy cross-compilation, and for
libvpx this would basically mean copying the code in
build/make/configure.sh to setup the right --target option. It seems a
lot easier to let it guess by itself.

Another option I considered was using CROSS-gcc instead but this would
not work for our multilib setups: They use gcc -m32 to build 32bits
binaries and gcc -m32 -dumpmachine will output the 64bits version,
which would then make libvpx wrongly believe it is building for a
64bits architecture.

Change-Id: I05a19be402228f749e23be7473ca53ae74fd2186
build/make/configure.sh