From 9117a556969aef4f85a06aa087b6fcd5d50e260d Mon Sep 17 00:00:00 2001 From: Slawek Figiel Date: Thu, 12 Oct 2023 13:15:29 +0200 Subject: [PATCH] [#1169] Use proper 32-bit ARM architectures --- rakelib/40_dist.rake | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/rakelib/40_dist.rake b/rakelib/40_dist.rake index 6402be518..38c9b1a77 100644 --- a/rakelib/40_dist.rake +++ b/rakelib/40_dist.rake @@ -20,8 +20,23 @@ STORK_VERSION = stork_version def get_arch() arch = ENV["STORK_GOARCH"] || ARCH - if !ENV["STORK_GOARM"].nil? - arch = "#{arch}-armv#{ENV["STORK_GOARM"]}" + arm_version_raw = ENV["STORK_GOARM"] + if !arm_version_raw.nil? + arm_version = arm_version_raw.to_i + # The above architecture suffixes were not tested on BSD systems. + # They may not be suitable for this operating system family. + case arm_version + when 0 + fail "STORK_GOARM must be a number, got: #{arm_version_raw}" + when 5 + arch = "armel" + when 6..7 + arch = "armhf" + when 8 + puts "STORK_GOARCH is ignored for 64-bit ARM (armv8)" + else + fail "Unsupported STORK_GOARM value: #{arm_version_raw}" + end end arch end