summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2018-03-08 11:47:04 +0100
committerDiego Biurrun <diego@biurrun.de>2018-03-08 14:02:30 +0100
commitdd7e63af93b2430b5d42b87a966160c66736342c (patch)
tree574d2e5804eb1a8b925d63c1106b91b3bdcd26fc /configure
parent80a4e6a46f21256e9bf508ead686563616945ad5 (diff)
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure b/configure
index d59fc6fd1a..b91be32102 100755
--- 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() {