diff options
author | P. 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) |
commit | e16054ac6d09feff4595ed8d15c3376ea053fbe0 (patch) | |
tree | fda07d466c891bed331dbfe06993acb10bc3ecce | |
parent | 83c0dcec10b0b9de1ffbab6ed4a27c9fff00c344 (diff) |
Only set toolchain prefix when cross building.
-rw-r--r-- | src/ob-buildenv.sh | 8 |
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., |