]> git.sesse.net Git - ffmpeg/commitdiff
configure: Restore original endianness test
authorDiego Biurrun <diego@biurrun.de>
Thu, 8 Mar 2018 10:47:04 +0000 (11:47 +0100)
committerDiego Biurrun <diego@biurrun.de>
Thu, 8 Mar 2018 13:02:30 +0000 (14:02 +0100)
Previously the bit pattern for the endianness test was declared as a
global, instead of a local, variable. This ensures that the pattern
appears unchanged in the object file and is not optimized out.

configure

index d59fc6fd1ae2914925ee61b195f49ddef827ba95..b91be3210284b33e42ead0203ac82b071ab2f24e 100755 (executable)
--- a/configure
+++ b/configure
@@ -4211,7 +4211,10 @@ done
 
 check_cc pragma_deprecated "" '_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")'
 
-require_cc "endian test" "" "unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'"
+# The global variable ensures the bits appear unchanged in the object file.
+test_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
 
 check_gas() {