qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCHv2] configure: verify stdio.h


From: Måns Rullgård
Subject: [Qemu-devel] Re: [PATCHv2] configure: verify stdio.h
Date: Wed, 27 Jan 2010 21:48:14 +0000
User-agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (Instant Classic, linux)

"Michael S. Tsirkin" <address@hidden> writes:

> Heh, configure script runs the program it's built
> in a couple of places. This probably does not
> work for cross-builds:
>
>       if compile_prog "" "" ; then
>       $TMPE && bigendian="yes"
>       else
>       echo big/little test failed
>       fi
>
> likely works by luck for build to intel, because error
> is interpreted as little-endian.

In FFmpeg we check the endianness like this:

check_cc <<EOF || die "endian test failed"
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian

This works on every combination of build and target system we use.

-- 
Måns Rullgård
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]