refactor $cpu selection in various places

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
This commit is contained in:
Juan Quintela 2009-08-03 14:46:12 +02:00 committed by Anthony Liguori
parent ed968ff1a3
commit ea8f20f8de
1 changed files with 13 additions and 50 deletions

63
configure vendored
View File

@ -76,7 +76,6 @@ for opt do
;; ;;
esac esac
done done
# OS specific # OS specific
# Using uname is really, really broken. Once we have the right set of checks # Using uname is really, really broken. Once we have the right set of checks
# we can eliminate it's usage altogether # we can eliminate it's usage altogether
@ -135,57 +134,30 @@ fi
target_list="" target_list=""
case "$cpu" in case "$cpu" in
alpha|cris|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|sparc64)
cpu="$cpu"
;;
i386|i486|i586|i686|i86pc|BePC) i386|i486|i586|i686|i86pc|BePC)
cpu="i386" cpu="i386"
;; ;;
x86_64|amd64) x86_64|amd64)
cpu="x86_64" cpu="x86_64"
;; ;;
alpha)
cpu="alpha"
;;
armv*b) armv*b)
cpu="armv4b" cpu="armv4b"
;; ;;
armv*l) armv*l)
cpu="armv4l" cpu="armv4l"
;; ;;
cris)
cpu="cris"
;;
parisc|parisc64) parisc|parisc64)
cpu="hppa" cpu="hppa"
;; ;;
ia64)
cpu="ia64"
;;
m68k)
cpu="m68k"
;;
microblaze)
cpu="microblaze"
;;
mips)
cpu="mips"
;;
mips64)
cpu="mips64"
;;
ppc)
cpu="ppc"
;;
ppc64)
cpu="ppc64"
;;
s390*) s390*)
cpu="s390" cpu="s390"
;; ;;
sparc|sun4[cdmuv]) sparc|sun4[cdmuv])
cpu="sparc" cpu="sparc"
;; ;;
sparc64)
cpu="sparc64"
;;
*) *)
cpu="unknown" cpu="unknown"
;; ;;
@ -787,30 +759,21 @@ fi
else else
# if cross compiling, cannot launch a program, so make a static guess # if cross compiling, cannot launch a program, so make a static guess
if test "$cpu" = "armv4b" \ case "$cpu" in
-o "$cpu" = "hppa" \ armv4b|hppa|m68k|mips|mips64|ppc|ppc64|s390|sparc|sparc64)
-o "$cpu" = "m68k" \ bigendian=yes
-o "$cpu" = "mips" \ ;;
-o "$cpu" = "mips64" \ esac
-o "$cpu" = "ppc" \
-o "$cpu" = "ppc64" \
-o "$cpu" = "s390" \
-o "$cpu" = "sparc" \
-o "$cpu" = "sparc64"; then
bigendian="yes"
fi
fi fi
# host long bits test # host long bits test
hostlongbits="32" hostlongbits="32"
if test "$cpu" = "x86_64" \ case "$cpu" in
-o "$cpu" = "alpha" \ x86_64|alpha|ia64|sparc64|ppc64)
-o "$cpu" = "ia64" \ hostlongbits=64
-o "$cpu" = "sparc64" \ ;;
-o "$cpu" = "ppc64"; then esac
hostlongbits="64"
fi
# Check host NPTL support # Check host NPTL support
cat > $TMPC <<EOF cat > $TMPC <<EOF