diff options
author | Anton Blanchard <anton@samba.org> | 2013-07-11 12:03:57 +1000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-07-12 14:34:12 +0000 |
commit | 9afc2ee682d2f9fd3ad938756c841d7f0eed5f21 (patch) | |
tree | 70318179fb66d15ea95d075a5408c28a3289aab1 | |
parent | 9459dfb891af6ef376a2a78d4a272b9a396ea484 (diff) | |
download | strace-9afc2ee682d2f9fd3ad938756c841d7f0eed5f21.tar.gz strace-9afc2ee682d2f9fd3ad938756c841d7f0eed5f21.tar.bz2 strace-9afc2ee682d2f9fd3ad938756c841d7f0eed5f21.tar.xz |
powerpc: enhance 32/64bit detection
We were using uname to determine if userspace was 32 or 64bit.
This fails when we have a 64bit kernel and a 32bit userspace.
* configure.ac (powerpc*): Similar to x86, use a runtime test
to determine if we are 32 or 64bit.
Signed-off-by: Anton Blanchard <anton@samba.org>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 03e49fe..b3b62e8 100644 --- a/configure.ac +++ b/configure.ac @@ -54,7 +54,11 @@ alpha*) powerpc*) arch=powerpc AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) - if test $host_cpu = powerpc64; then + AC_TRY_COMPILE( +[#ifndef __LP64__ +# error 32 bit +#endif], [], ppc_bits=64, ppc_bits=32) + if test "$ppc_bits" = "64"; then AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) fi ;; |