Commit 37b77748 authored by mru's avatar mru

fix endian check when cross-compiling


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10187 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b305ffd1
...@@ -1519,20 +1519,10 @@ EOF ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment