summaryrefslogtreecommitdiff
path: root/Build/source/libs/gmp/gmp-src/configgmp.guess
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gmp/gmp-src/configgmp.guess')
-rwxr-xr-xBuild/source/libs/gmp/gmp-src/configgmp.guess175
1 files changed, 89 insertions, 86 deletions
diff --git a/Build/source/libs/gmp/gmp-src/configgmp.guess b/Build/source/libs/gmp/gmp-src/configgmp.guess
index 744e11e4947..49ecca08d7c 100755
--- a/Build/source/libs/gmp/gmp-src/configgmp.guess
+++ b/Build/source/libs/gmp/gmp-src/configgmp.guess
@@ -3,7 +3,7 @@
# GMP config.guess wrapper.
-# Copyright 2000-2006, 2008, 2011-2015 Free Software Foundation, Inc.
+# Copyright 2000-2006, 2008, 2011-2016 Free Software Foundation, Inc.
#
# This file is part of the GNU MP Library.
#
@@ -172,35 +172,49 @@ EOF
fi
;;
-arm*-*-*)
- cpu_code=`sed -n 's/^CPU part.*\(0x.*\)$/\1/p' /proc/cpuinfo 2>/dev/null | head -n 1 2>/dev/null`
- case "$cpu_code" in
- 0xa10 | 0xa11 | 0xb11) # v4 strongarm/sa1100
+arm*-*-* | aarch64-*-*)
+ cpu_code=`sed -n 's/^CPU part.*\(0x.*\)$/\1/p' /proc/cpuinfo 2>/dev/null | sort -r | head -n 1 2>/dev/null`
+ cpu_implementer=`sed -n 's/^CPU implementer.*\(0x.*\)$/\1/p' /proc/cpuinfo 2>/dev/null | head -n 1 2>/dev/null`
+ case "${cpu_implementer}_${cpu_code}" in
+ 0x53_0x001) exact_cpu=armexynosm1 ;;
+ 0x51_0x800) exact_cpu=armcortexa57 ;;
+ 0x43_0x0a1) exact_cpu=armthunderx ;;
+ 0x50_0x000) exact_cpu=armxgene1 ;;
+ esac
+ if test -z "$exact_cpu"; then
+ case "$cpu_code" in
+ 0xa10 | 0xa11 | 0xb11) # v4 strongarm/sa1100
exact_cpu="armsa1";;
- 0x915 | 0x925 | \
- 0x920 | 0x922 | 0x940) # v4
+ 0x915 | 0x925 | \
+ 0x920 | 0x922 | 0x940) # v4
exact_cpu="arm9tdmi";;
- 0x210 | 0x290 | 0x2d0 | \
- 0x212 | 0x292 | 0x2d2 | \
- 0x411) exact_cpu="armxscale";; # v5 pxa2xx
- 0x926 | 0x946 | 0x966 | 0x968) # v5te/v5tej
+ 0x210 | 0x290 | 0x2d0 | \
+ 0x212 | 0x292 | 0x2d2 | \
+ 0x411) exact_cpu="armxscale";; # v5 pxa2xx
+ 0x926 | 0x946 | 0x966 | 0x968) # v5te/v5tej
exact_cpu="arm9te";;
- 0xa20 | 0xa22 | 0xa26) # v5te
+ 0xa20 | 0xa22 | 0xa26) # v5te
exact_cpu="arm10";;
- 0xb02) exact_cpu="arm11mpcore";; # v6
- 0xb36) exact_cpu="arm1136";; # v6
- 0xb56) exact_cpu="arm1156";; # v6t2
- 0xb76) exact_cpu="arm1176";; # v6
- 0xc05) exact_cpu="armcortexa5";; # v7a
- 0xc07) exact_cpu="armcortexa7";; # v7a
- 0xc08) exact_cpu="armcortexa8";; # v7a
- 0xc09) exact_cpu="armcortexa9";; # v7a
- 0xc0f) exact_cpu="armcortexa15";; # v7a
- 0xc14) exact_cpu="armcortexr4";; # v7r
- 0xc15) exact_cpu="armcortexr5";; # v7r
- 0xc23) exact_cpu="armcortexm3";; # v7m
- *) exact_cpu=$guess_cpu;;
- esac
+ 0xb02) exact_cpu="arm11mpcore";; # v6
+ 0xb36) exact_cpu="arm1136";; # v6
+ 0xb56) exact_cpu="arm1156";; # v6t2
+ 0xb76) exact_cpu="arm1176";; # v6
+ 0xc05) exact_cpu="armcortexa5";; # v7a
+ 0xc07) exact_cpu="armcortexa7";; # v7a
+ 0xc08) exact_cpu="armcortexa8";; # v7a
+ 0xc09) exact_cpu="armcortexa9";; # v7a
+ 0xc0f) exact_cpu="armcortexa15";; # v7a
+ 0xc14) exact_cpu="armcortexr4";; # v7r
+ 0xc15) exact_cpu="armcortexr5";; # v7r
+ 0xc23) exact_cpu="armcortexm3";; # v7m
+
+ 0xd04) exact_cpu="armcortexa35";; # v8-32
+ 0xd03) exact_cpu="armcortexa53";; # v8
+ 0xd07) exact_cpu="armcortexa57";; # v8
+ 0xd08) exact_cpu="armcortexa72";; # v8
+ *) exact_cpu=$guess_cpu;;
+ esac
+ fi
exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo 2>/dev/null | head -n 1 2>/dev/null`"
;;
@@ -243,7 +257,8 @@ main ()
switch ((getcpuid(3LL) >> 24) & 0xFF) {
case 0x07: puts ("itanium"); break;
case 0x1F: puts ("itanium2"); break; /* McKinley, Madison */
- case 0x20: puts ("itanium2"); break; /* Montecito */
+ case 0x20: puts ("itanium2"); break; /* Montecito, Montvale, Tukwila */
+ case 0x21: puts ("itanium2"); break; /* Poulson */
}
}
return 0;
@@ -377,41 +392,43 @@ rs6000-*-* | powerpc*-*-*)
# (as noted below). But the man page says the command is still "under
# development", so it doesn't seem wise to use it just yet, not while
# there's an alternative.
- #
+
+ # Grep the /proc/cpuinfo pseudo-file.
+ # Anything unrecognised is ignored, since of course we mustn't spit out
+ # a cpu type config.sub doesn't know.
+ if test -z "$exact_cpu" && test -f /proc/cpuinfo; then
+ x=`grep "^cpu[ ]" /proc/cpuinfo | head -n 1`
+ x=`echo $x | sed -n 's/^cpu[ ]*:[ ]*\([A-Za-z0-9]*\).*/\1/p'`
+ x=`echo $x | sed 's/PPC//'`
+ case $x in
+ 601) exact_cpu="power" ;;
+ 603ev) exact_cpu="powerpc603e" ;;
+ 604ev5) exact_cpu="powerpc604e" ;;
+ 970??) exact_cpu="powerpc970" ;;
+ 603 | 603e | 604 | 604e | 750 | 821 | 860)
+ exact_cpu="powerpc$x" ;;
+ POWER[4-9]*)
+ exact_cpu=`echo $x | sed -e "s;POWER;power;" -e "s;[a-zA-Z]*$;;"` ;;
+ esac
+ fi
+
# Try to read the PVR. mfpvr is a protected instruction, NetBSD, MacOS
# and AIX don't allow it in user mode, but the Linux kernel does.
#
- # Using explicit bytes for mfpvr avoids worrying about assembler syntax
- # and underscores. "char"s are used instead of "int"s to avoid worrying
- # whether sizeof(int)==4 or if it's the right endianness.
- #
# Note this is no good on AIX, since a C function there is the address of
# a function descriptor, not actual code. But this doesn't matter since
# AIX doesn't allow mfpvr anyway.
#
- eval $set_cc_for_build
- cat >$dummy.c <<\EOF
+ if test -z "$exact_cpu"; then
+ eval $set_cc_for_build
+ cat >$dummy.c <<\EOF
#include <stdio.h>
-struct {
- int n; /* force 4-byte alignment */
- char a[8];
-} getpvr = {
- 0,
- {
- 0x7c, 0x7f, 0x42, 0xa6, /* mfpvr r3 */
- 0x4e, 0x80, 0x00, 0x20, /* blr */
- }
-};
int
main ()
{
- unsigned (*fun)();
unsigned pvr;
- /* a separate "fun" variable is necessary for gcc 2.95.2 on MacOS,
- it gets a compiler error on a combined cast and call */
- fun = (unsigned (*)()) getpvr.a;
- pvr = (*fun) ();
+ asm ("mfpvr %0" : "=r" (pvr));
switch (pvr >> 16) {
case 0x0001: puts ("powerpc601"); break;
@@ -424,6 +441,8 @@ main ()
case 0x000a: puts ("powerpc604e"); break; /* 604ev5 */
case 0x000c: puts ("powerpc7400"); break;
case 0x0041: puts ("powerpc630"); break;
+ case 0x003f: puts ("power7"); break;
+ case 0x004b: puts ("power8"); break;
case 0x0050: puts ("powerpc860"); break;
case 0x8000: puts ("powerpc7450"); break;
case 0x8001: puts ("powerpc7455"); break;
@@ -434,34 +453,16 @@ main ()
return 0;
}
EOF
- if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
- # This style construct is needed on AIX 4.3 to suppress the SIGILL error
- # from (*fun)(). Using $SHELL -c $dummy 2>/dev/null doesn't work.
- { x=`$dummy`; } 2>/dev/null
- if test -n "$x"; then
- exact_cpu=$x
+ if ($CC_FOR_BUILD $dummy.c -o $dummy) >/dev/null 2>&1; then
+ # This style construct is needed on AIX 4.3 to suppress the SIGILL error
+ # from (*fun)(). Using $SHELL -c $dummy 2>/dev/null doesn't work.
+ { x=`$dummy`; } 2>/dev/null
+ if test -n "$x"; then
+ exact_cpu=$x
+ fi
fi
fi
- # Grep the linux kernel /proc/cpuinfo pseudo-file.
- # Anything unrecognised is ignored, since of course we mustn't spit out
- # a cpu type config.sub doesn't know.
- if test -z "$exact_cpu" && test -f /proc/cpuinfo; then
- x=`grep "^cpu[ ]" /proc/cpuinfo | head -n 1`
- x=`echo $x | sed -n 's/^cpu[ ]*:[ ]*\([A-Za-z0-9]*\).*/\1/p'`
- x=`echo $x | sed 's/PPC//'`
- case $x in
- 601) exact_cpu="power" ;;
- 603ev) exact_cpu="powerpc603e" ;;
- 604ev5) exact_cpu="powerpc604e" ;;
- 970??) exact_cpu="powerpc970" ;;
- 603 | 603e | 604 | 604e | 750 | 821 | 860)
- exact_cpu="powerpc$x" ;;
- POWER[4-9]*)
- exact_cpu=`echo $x | sed -e "s;POWER;power;" -e "s;[a-zA-Z]*$;;"` ;;
- esac
- fi
-
if test -z "$exact_cpu"; then
# On AIX, try looking at _system_configuration. This is present in
# version 4 at least.
@@ -1067,18 +1068,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
+ fi
;;
esac