summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
authorTorbjorn Granlund <torbjorng@google.com>2016-01-15 22:42:09 +0100
committerTorbjorn Granlund <torbjorng@google.com>2016-01-15 22:42:09 +0100
commit51962f82eb86d8f454fd6fdf1027c28d5f1bfc55 (patch)
treeae527db80b1bdb0b49441116bebc052dcc5cbd5d /config.guess
parenta4be9cd9ce45296494de9677931e4971cde9240d (diff)
downloadgmp-51962f82eb86d8f454fd6fdf1027c28d5f1bfc55.tar.gz
(s390): Don't assume /proc/cpuinfo exists.
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess27
1 files changed, 14 insertions, 13 deletions
diff --git a/config.guess b/config.guess
index 3fb921926..d812157ad 100755
--- a/config.guess
+++ b/config.guess
@@ -1053,19 +1053,20 @@ EOF
;;
s390*-*-*)
- model=`grep "^processor 0: version =" /proc/cpuinfo | sed -e 's/.*machine = //'`
- case $model in
- 2064 | 2066) zcpu="z900" ;;
- 2084 | 2086) zcpu="z990" ;;
- 2094 | 2096) zcpu="z9" ;;
- 2097 | 2098) zcpu="z10" ;;
- 2817 | 2818 | *) zcpu="z196" ;;
- esac
- case "$guess_full" in
- s390x-*-*) exact_cpu=${zcpu} ;;
- s390-*-*) exact_cpu=${zcpu}esa ;;
- esac
- ;;
+ if test -f /proc/cpuinfo; then
+ model=`grep "^processor 0: version =" /proc/cpuinfo | sed -e 's/.*machine = //'`
+ case $model in
+ 2064 | 2066) zcpu="z900" ;;
+ 2084 | 2086) zcpu="z990" ;;
+ 2094 | 2096) zcpu="z9" ;;
+ 2097 | 2098) zcpu="z10" ;;
+ 2817 | 2818 | *) zcpu="z196" ;;
+ esac
+ case "$guess_full" in
+ s390x-*-*) exact_cpu=${zcpu} ;;
+ s390-*-*) exact_cpu=${zcpu}esa ;;
+ esac
+ ;;
esac