From 9d56d2dce6b949293d11d0af71ec4f03cd8cb6c1 Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 30 Sep 2008 19:44:32 +0000 Subject: [PATCH] Avoid (some) ppc cross-compilation problems [..snip..] A recent kvm merge with qemu brought code for 64bit power that broke cross compilation. The issue is caused by configure trying to execute target architecture binaries where configure is executed. [..snip..] The patch is based on Hollis's Blanchard idea. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5364 c046a42c-6fe2-441c-8c8c-71466251a162 --- configure | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 3859bc6c1d..a224e6a6b6 100755 --- a/configure +++ b/configure @@ -15,6 +15,7 @@ TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c" TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}" TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S" +TMPI="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.i" # default parameters prefix="" @@ -673,17 +674,8 @@ fi # ppc specific hostlongbits selection if test "$cpu" = "powerpc" ; then - cat > $TMPC < /dev/null; then - $TMPE - case $? in - 4) hostlongbits="32";; - 8) hostlongbits="64";; - *) echo "Couldn't determine bits per long value"; exit 1;; - esac + if $cc $ARCH_CFLAGS -dM -E - -o $TMPI 2>/dev/null