summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-11 13:57:19 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-11 13:57:19 (EDT)
commite16054ac6d09feff4595ed8d15c3376ea053fbe0 (patch)
treefda07d466c891bed331dbfe06993acb10bc3ecce /src
parent83c0dcec10b0b9de1ffbab6ed4a27c9fff00c344 (diff)
Only set toolchain prefix when cross building.
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildenv.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ob-buildenv.sh b/src/ob-buildenv.sh
index 56902e5..68a6443 100644
--- a/src/ob-buildenv.sh
+++ b/src/ob-buildenv.sh
@@ -56,7 +56,13 @@ setup_build_helper()
setup_toolchain()
{
- tool_prefix="${OPK_HOST_ARCH}-"
+ # This check is done to allow at least native building on unsupported OSes.
+ # It may be removed in the future.
+ if [ "${OPK_BUILD_ARCH}" != "${OPK_HOST_ARCH}" ]; then
+ tool_prefix="${OPK_HOST_ARCH}-"
+ else
+ tool_prefix=''
+ fi
# Set toolchain environment variables.
# NB: This is written for GNU Binutils and GCC and won't work for, e.g.,