diff options
Diffstat (limited to 'jenkins-helpers.sh')
-rw-r--r-- | jenkins-helpers.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index 2b089799..56c33e8a 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -1060,14 +1060,23 @@ print_gnu_target () set -euf -o pipefail local target="$1" - if [ x"$target" = x"native" ]; then - target=$(uname -m) - fi case "$target" in "aarch64") target="aarch64-linux-gnu" ;; "arm_eabi") target="arm-eabi" ;; "arm"*) target="arm-linux-gnueabihf" ;; "x86_64") target="x86_64-linux-gnu" ;; + "native") + case "$(uname -m)" in + "aarch64") target="aarch64-unknown-linux-gnu" ;; + "armv7l") target="armv7l-unknown-linux-gnueabihf" ;; + "armv8l") target="armv8l-unknown-linux-gnueabihf" ;; + "x86_64") target="x86_64-pc-linux-gnu" ;; + *) + echo "ERROR: Unknown native target $(uname -m)" >&2 + exit 1 + ;; + esac + ;; *) echo "ERROR: Unknown target $target" >&2; exit 1 ;; esac echo "$target" |