summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>2022-06-10 17:52:08 -0300
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2022-06-29 13:25:22 +0000
commit29cd03e12e9601ff54771af6c5ca357ad8295a85 (patch)
tree17de4e911384b79f69371b840e592567ab078cd4
parent77b55bb008e46c934fe56b8299313f6183b4bb12 (diff)
tcwg-dev-build.sh: Fix default target value for native compilation
Using "aarch64-linux-gnu" causes trouble when building on an actual aarch64-linux-gnu machine: Abe detects the build triplet as "aarch64-unknown-linux-gnu" and since it's not the same as the target triplet, the code paths for non-native building get taken. Also, there is a check for "$target" = "native" in this script to skip manifest validation, and another one in MakeRelease.job so this patch makes those checks work. Note that with this patch, the target triplet used when building on an aarch64-linux-gnu machine is "aarch64-unknown-linux-gnu". Change-Id: I4b522e220436b5c38113c4e38e57c4d4e2d2726f
-rwxr-xr-xtcwg-dev-build.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tcwg-dev-build.sh b/tcwg-dev-build.sh
index 9b295e75..3a122725 100755
--- a/tcwg-dev-build.sh
+++ b/tcwg-dev-build.sh
@@ -7,12 +7,21 @@ scripts=$(dirname $0)
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
+# By default this script produces an aarch64-linux-gnu toolchain. If we're
+# already running on that platform, default to "native" so that this is clear
+# for this and other scripts.
+if [ "$(uname -s)" = "Linux" ] && [ "$(uname -m)" = "aarch64" ]; then
+ default_target="native"
+else
+ default_target="aarch64-linux-gnu"
+fi
+
abe_branch="${abe_branch-tested}"
dry_run="${dry_run-false}"
manifest="${manifest-}"
release_name="${release_name-default}"
buildnumber="${buildnumber-0}"
-target="${target-aarch64-linux-gnu}"
+target="${target-$default_target}"
version="${version-default}"
verbose="${verbose-true}"