diff options
-rwxr-xr-x | abe.sh | 9 | ||||
-rw-r--r-- | lib/globals.sh | 12 |
2 files changed, 13 insertions, 8 deletions
@@ -852,12 +852,6 @@ dump() fi } -# hosttools/ contains runtest (from dejagnu). We need it for testing -# the toolchain. -# destdir/ contains the toolchain components, some of which are needed -# during the build (eg. GCC uses binutils). -export PATH="${local_builds}/hosttools/${build}/bin:${local_builds}/destdir/${build}/bin:$PATH" - # do_ switches are commands that should be executed after processing all # other switches. do_dump= @@ -1278,7 +1272,8 @@ if [ ! -z "${do_manifest}" ]; then fi # Now that all parameters have been processed, initialize global variables -init_globals +# and $PATH. +init_globals_and_PATH # Check disk space. Each builds needs about 3.8G free if test x"${space_needed:-}" = x; then diff --git a/lib/globals.sh b/lib/globals.sh index 4f285155..386cc720 100644 --- a/lib/globals.sh +++ b/lib/globals.sh @@ -117,7 +117,7 @@ fi # # -init_globals() +init_globals_and_PATH() { # Prefix is the root for installing the toolchain. prefix="$local_builds/destdir/$host" @@ -125,6 +125,16 @@ init_globals() if [ x"$host" != x"$target" ]; then sysroots="$sysroots/$target" fi + + local host_bin + # hosttools/ contains runtest (from dejagnu). We need it for testing + # the toolchain. + # destdir/ contains the toolchain components, some of which are needed + # during the build (eg. GCC uses binutils). + host_bin="$local_builds/hosttools/$host/bin" + mkdir -p "$host_bin" "$prefix/bin" + + export PATH="$host_bin:$prefix/bin:$PATH" } import_manifest() |