diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-08 15:01:02 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-09 10:45:27 +0000 |
commit | 809696e3dd63088a49c543ab64f93eba1e558e66 (patch) | |
tree | 99152bbe512b99eb580777a58acbf5f95e4f8011 | |
parent | 4422e950826b3d65eaf1dcef4d56f0aee3639091 (diff) |
abe.sh: Move PATH setting to lib/globals.sh
Change-Id: I2fb173fa5656c35d0c7f398bb01fb1ee26cb9ed1
-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() |