We were using uname to determine if userspace was 32 or 64bit.
This fails when we have a 64bit kernel and a 32bit userspace.

Similar to x86, use a runtime test to determine if we are 32 or 64bit.

Signed-off-by: Anton Blanchard <[email protected]>
---

Index: strace-new/configure.ac
===================================================================
--- strace-new.orig/configure.ac
+++ strace-new/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
        ;;

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to