diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-09-12 03:39:55 -0400 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2010-09-15 15:36:00 +0000 |
commit | 6d12afdac423ccdc9182022987130a3346a6405f (patch) | |
tree | 659a7223dab8e751e3b98f03f62b631d41165507 /m4 | |
parent | 260e571343b12221ad848a9c972fc5518d66ef2c (diff) | |
download | strace-6d12afdac423ccdc9182022987130a3346a6405f.tar.gz |
Fix long long little endian detection when cross-compiling
The long long endian detection code does an AC_TRY_RUN() and since that
doesn't work when cross-compiling, it sets a fallback value. However,
rather than do any sort of default endian detection, the code simply
sets it to "no". This probably breaks most little endian systems out
there when cross-compiling for them. It certainly breaks Blackfin
systems. So use the common endian detection code provided by autoconf
and key off of that when cross-compiling.
* configure.ac: Call AC_C_BIGENDIAN.
* m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling
logic based on ac_cv_c_bigendian.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/long_long.m4 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/m4/long_long.m4 b/m4/long_long.m4 index 98ca3707e..5c5c80aec 100644 --- a/m4/long_long.m4 +++ b/m4/long_long.m4 @@ -57,8 +57,12 @@ int main () { return 0; return 1; } -]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[# Should try to guess here -ac_cv_have_little_endian_long_long=no +]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[ +if test "x$ac_cv_c_bigendian" = "xyes"; then + ac_cv_have_little_endian_long_long=no +else + ac_cv_have_little_endian_long_long=yes +fi ])]) AC_MSG_RESULT($ac_cv_have_little_endian_long_long) if test "$ac_cv_have_little_endian_long_long" = yes |