Hi, On 2006-03-30, Bruno Haible wrote:
Dmitry Khutornoy wrote:
/* Integers of type long have 32 bits. */ #define long_bitsize 32 /* Pointers of type char * have 32 bits. */ #define pointer_bitsize 32
OK, you are compiling in PowerPC 32-bit mode, but CLN's configuration was confused because you have a 64-bit CPU.
The immediate workaround for you is to change include/cln/config.h so that it defines __rs6000__ and not __powerpc64__, do a "make clean" and "make".
The fix should be to add code to m4/general.m4 to distinguish 32-bit and 64-bit PowerPC, like it's already done for Sparc / Sparc64. Can someone please do that? I don't have the time.
According to the GCC sources, __powerpc64__ is a builtin define. So, I wonder if this patch is safe to apply without being able to do any testing whatsoever: Index: general.m4 =================================================================== RCS file: /home/cvs/cln/m4/general.m4,v retrieving revision 1.3 diff -u -r1.3 general.m4 --- general.m4 13 Jun 2006 18:31:18 -0000 1.3 +++ general.m4 5 Dec 2007 21:01:39 -0000 @@ -200,6 +200,21 @@ else host_cpu=i386 fi +dnl PowerPC64 is another case where 'uname -m' and userland may disagree. + powerpc64 ) + AC_CACHE_CHECK([for 64-bit userland on powerpc64], cl_cv_host_powerpc64, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#if !defined __powerpc64__ +# error __powerpc64__ not defined +#endif +]]) +], [cl_cv_host_powerpc64=yes], [cl_cv_host_powerpc64=no]) +]) +if test $cl_cv_host_powerpc64 = yes; then + host_cpu=powerpc64 +else + host_cpu=powerpc +fi ;; esac dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>