Skip to content

Commit 81b5eea

Browse files
authored
Use uname -m instead of uname -p (#372)
On my Debian machine, uname -p returns "unknown" and the manpage says -p is non-portable. I do get x86_64 on from uname -m and that doesn't have the non-portable disclaimer on it. > Please add a description of your PR. > If this is a solution to an open challenge, please explain your solution. > > Don't forget to check our book to ensure your solution satisfy the overall > requirements as well as the challenge success criteria. > Resolves #ISSUE-NUMBER By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent c120797 commit 81b5eea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/kani-std-analysis/std-analysis.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
set -eu
1919

2020
# Test for platform
21-
PLATFORM=$(uname -sp)
21+
PLATFORM=$(uname -sm)
2222
if [[ $PLATFORM == "Linux x86_64" ]]
2323
then
2424
TARGET="x86_64-unknown-linux-gnu"
2525
# 'env' necessary to avoid bash built-in 'time'
2626
WRAPPER="env time -v"
27-
elif [[ $PLATFORM == "Darwin i386" ]]
27+
elif [[ $PLATFORM == "Darwin x86_64" ]]
2828
then
2929
TARGET="x86_64-apple-darwin"
3030
# mac 'time' doesn't have -v
3131
WRAPPER="time"
32-
elif [[ $PLATFORM == "Darwin arm" ]]
32+
elif [[ $PLATFORM == "Darwin arm64" ]]
3333
then
3434
TARGET="aarch64-apple-darwin"
3535
# mac 'time' doesn't have -v

0 commit comments

Comments
 (0)