diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-02-24 10:19:47 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-24 10:20:21 +0200 |
commit | 9be173c6774fbec6cf8acd573faa039dd4129fc6 (patch) | |
tree | abfea4e731bb8eac61810431830d885d8039b823 | |
parent | 32dbf36f0e4775bd39fadf27ca978577a739a50a (diff) | |
download | abuild-9be173c6774fbec6cf8acd573faa039dd4129fc6.tar.gz abuild-9be173c6774fbec6cf8acd573faa039dd4129fc6.tar.bz2 abuild-9be173c6774fbec6cf8acd573faa039dd4129fc6.tar.xz abuild-9be173c6774fbec6cf8acd573faa039dd4129fc6.zip |
functions.sh: set host compiler when cross-compiling
We chose to use kernel style HOST* instead of the gcc's
*_FOR_HOST.
-rw-r--r-- | functions.sh.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/functions.sh.in b/functions.sh.in index d04c776..3e1840c 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -133,6 +133,13 @@ readconfig() { # setup cross-compiler if [ -z "$CROSS_COMPILE" ]; then export CROSS_COMPILE="${CHOST}-" + export HOSTCC="$CC" + export HOSTCXX="$CXX" + export HOSTLD="$LD" + export HOSTCPPFLAGS="$CPPFLAGS" + export HOSTCXXFLAGS="$CXXFLAGS" + export HOSTCFLAGS="$CFLAGS" + export HOSTLDFLAGS="$LDFLAGS" export CC=${CROSS_COMPILE}gcc export CXX=${CROSS_COMPILE}g++ export LD=${CROSS_COMPILE}ld |