Skip to content
Snippets Groups Projects
Commit dd7e63af authored by Diego Biurrun's avatar Diego Biurrun
Browse files

configure: Restore original endianness test

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.
parent 80a4e6a4
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment