fix endian check when cross-compiling
Originally committed as revision 10187 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
81717747ab
commit
9eebe68739
16
configure
vendored
16
configure
vendored
@ -1519,20 +1519,10 @@ EOF
|
|||||||
|
|
||||||
# ---
|
# ---
|
||||||
# big/little-endian test
|
# big/little-endian test
|
||||||
if ! enabled cross_compile; then
|
check_cc <<EOF || die "endian test failed"
|
||||||
check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
|
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
|
||||||
#include <inttypes.h>
|
|
||||||
int main(int argc, char ** argv){
|
|
||||||
volatile uint32_t i=0x01234567;
|
|
||||||
return (*((uint8_t*)(&i))) == 0x67;
|
|
||||||
}
|
|
||||||
EOF
|
EOF
|
||||||
else
|
strings $TMPO | grep -q BIGE && enable bigendian
|
||||||
# programs cannot be launched if cross compiling, so make a static guess
|
|
||||||
if test "$arch" = "powerpc" -o "$arch" = "mips" ; then
|
|
||||||
bigendian="yes"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# check availability of some header files
|
# check availability of some header files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user