-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_isa()
in get-stack.sh
does not handle all possible outputs of uname -m
#5792
Comments
I think I can do this. |
What exactly does the function return? Does it return the instruction set of the given cpu as provided by |
I am not a 'scripter', but I think if you start at |
Oh that makes sense, thanks |
Does the following code look good enough? get_isa() {
if uname -m | grep -Eq 'armv[78]l?' ; then
echo arm
elif uname -m | grep -q aarch64 ; then
echo aarch64
elif uname -m | grep -q x86 ; then
echo x86
else
die "${uname -m} is not a supported instruction set"
fi
} I would have gone through and done checks for all the possible outputs for |
I didn't open up a PR for this code because I wanted to make sure it's actually addressing the issue. |
It looks good to me, but with one question. I don't know much about |
That's my Javascript coming out. Oops. |
get_isa()
inget-stack.sh
is as follows:get_isa()
is used byis_x86_64()
which, in turn, is used bydo_distro()
(called in the 'Linux' limb ofdo_os()
).get_isa()
assumes that if the output ofuname -m
(the machine hardware name) is notarmv6l
,armv7l
oraarch64
then it isx86_64
(orx86
). However, this Wikipedia table indicates that other values are possible whenuname -s
(the kernel name) isLinux
, includingarm6l
,sparc64
,ppc64
,i686
,ppc
,k1om
, and'mips
.It has been suggested that this is a 'bug waiting to happen'.
The text was updated successfully, but these errors were encountered: