aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-23 19:17:46 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-23 19:17:46 +0000
commit810260a8f334d6faa2749a3729f180dff8bae76b (patch)
tree01cd1f45b6e6c5e2c92763fbc364a2acbe4177a1 /configure
parente0e6c8c057efab0de1b4fa90e1c40deb5b22ad20 (diff)
Preliminary PPC64/Linux host support
ppc64.ld from Heikki Lindholm's patch http://marc.info/?l=qemu-devel&m=114086179024634&w=2 Issues: x86_64 tripple faults shortly after decompressing the kernel No immediate versions of most 64 bit operations More... git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4932 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 25 insertions, 2 deletions
diff --git a/configure b/configure
index b00df86f2b..cc4ff9b77c 100755
--- a/configure
+++ b/configure
@@ -637,6 +637,24 @@ if test "$cpu" = "x86_64" \
hostlongbits="64"
fi
+# ppc specific hostlongbits selection
+if test "$cpu" = "powerpc" ; then
+ cat > $TMPC <<EOF
+int main(void){return sizeof(long);}
+EOF
+
+ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
+ $TMPE
+ case $? in
+ 4) hostlongbits="32";;
+ 8) hostlongbits="64";;
+ *) echo "Couldn't determine bits per long value";;
+ esac
+ else
+ echo hostlongbits test failed
+ fi
+fi
+
# check gcc options support
cat > $TMPC <<EOF
int main(void) {
@@ -995,8 +1013,13 @@ case "$cpu" in
echo "#define HOST_MIPS64 1" >> $config_h
;;
powerpc)
- echo "ARCH=ppc" >> $config_mak
- echo "#define HOST_PPC 1" >> $config_h
+ if test "$hostlongbits" = "32"; then
+ echo "ARCH=ppc" >> $config_mak
+ echo "#define HOST_PPC 1" >> $config_h
+ else
+ echo "ARCH=ppc64" >> $config_mak
+ echo "#define HOST_PPC64 1" >> $config_h
+ fi
;;
s390)
echo "ARCH=s390" >> $config_mak