Package: cln
Version: 1.1.9-1.1
Severity: normal
Tags: patch

When building 'cln' on ppc64/unstable,
I get the following error:

 g++ -O2 -fno-exceptions -finline-limit=1000 -I../include -I../include -I./base 
-c ./base/cl_N_err_d0.cc  -fPIC -DPIC -o .libs/cl_N_err_d0.o
In file included from ../include/cln/number.h:8,
                 from ./base/cl_N.h:6,
                 from ./base/cl_N_err_d0.cc:7:
../include/cln/object.h:32:4: error: #error "Define cl_word_alignment for your 
CPU!"
../include/cln/object.h: In function 'cl_boolean 
cln::cl_pointer_p(cln::cl_uint)':
../include/cln/object.h:76: error: 'cl_word_alignment' was not declared in this 
scope
../include/cln/object.h: In function 'cl_boolean 
cln::cl_immediate_p(cln::cl_uint)':
../include/cln/object.h:80: error: 'cl_word_alignment' was not declared in this 
scope
make[3]: *** [cl_N_err_d0.lo] Error 1
make[3]: Leaving directory `/cln-1.1.9/src'

With the attached patch 'cln' can be compiled on ppc64.

Regards
Andreas Jochens

diff -urN ../tmp-orig/cln-1.1.9/include/cln/modules.h ./include/cln/modules.h
--- ../tmp-orig/cln-1.1.9/include/cln/modules.h 2004-09-06 19:46:35.000000000 
+0000
+++ ./include/cln/modules.h     2005-07-26 08:27:17.000000000 +0000
@@ -64,7 +64,7 @@
   #endif
   // Globalize a label defined in the same translation unit.
   // See macro ASM_GLOBALIZE_LABEL in the gcc sources.
-  #if defined(__i386__) || defined(__m68k__) || defined(__mips__) || 
defined(__mipsel__) || defined(__mips64__) || defined(__alpha__) || 
defined(__rs6000__) || defined(__x86_64__) || defined(__s390__)
+  #if defined(__i386__) || defined(__m68k__) || defined(__mips__) || 
defined(__mipsel__) || defined(__mips64__) || defined(__alpha__) || 
defined(__rs6000__) || defined(__powerpc64__) || defined(__x86_64__) || 
defined(__s390__)
     // Some m68k systems use "xdef" or "global" or ".global"...
     #define CL_GLOBALIZE_LABEL(label)  __asm__("\t.globl " label);
   #endif
@@ -142,7 +142,7 @@
   #if defined(__arm__)
     #define CL_JUMP_TO(addr)  ASM_VOLATILE("mov pc,%0" : : "r" ((void*)(addr)))
   #endif
-  #if defined(__rs6000__) || defined(__powerpc__) || defined(__ppc__)
+  #if defined(__rs6000__) || defined(__powerpc__) || defined(__ppc__) || 
defined(__powerpc64__)
     //#define CL_JUMP_TO(addr)  ASM_VOLATILE("mtctr %0\n\tbctr" : : "r" 
((void*)(addr)))
     #define CL_JUMP_TO(addr)  ASM_VOLATILE("b " ASM_UNDERSCORE_PREFIX #addr)
   #endif
diff -urN ../tmp-orig/cln-1.1.9/include/cln/object.h ./include/cln/object.h
--- ../tmp-orig/cln-1.1.9/include/cln/object.h  2004-09-27 20:14:42.000000000 
+0000
+++ ./include/cln/object.h      2005-07-26 06:19:42.000000000 +0000
@@ -25,7 +25,7 @@
 #if defined(__i386__) || defined(__mips__) || defined(__mipsel__) || 
defined(__sparc__) || defined(__hppa__) || defined(__arm__) || 
defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || 
defined(__s390__)
   #define cl_word_alignment  4
 #endif
-#if defined(__alpha__) || defined(__mips64__) || defined(__sparc64__) || 
defined(__ia64__) || defined(__x86_64__)
+#if defined(__alpha__) || defined(__mips64__) || defined(__powerpc64__) || 
defined(__sparc64__) || defined(__ia64__) || defined(__x86_64__)
   #define cl_word_alignment  8
 #endif
 #if !defined(cl_word_alignment)
diff -urN ../tmp-orig/cln-1.1.9/include/cln/types.h ./include/cln/types.h
--- ../tmp-orig/cln-1.1.9/include/cln/types.h   2004-10-20 20:51:38.000000000 
+0000
+++ ./include/cln/types.h       2005-07-26 08:28:40.000000000 +0000
@@ -48,7 +48,7 @@
     #undef HAVE_LONGLONG
    #endif
   #endif
-  #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__mips64__) || 
defined(__sparc64__) || defined(__ia64__) || defined(__x86_64__))
+  #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__mips64__) || 
defined(__powerpc64__) || defined(__sparc64__) || defined(__ia64__) || 
defined(__x86_64__))
     // 64 bit registers in hardware
     #define HAVE_FAST_LONGLONG
   #endif
@@ -85,7 +85,7 @@
   #define signean_minus -1
 
 // Integer type used for counters.
-  #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) 
|| defined(__x86_64__)))
+  #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) 
|| defined(__powerpc64__) || defined(__x86_64__)))
     #define intCsize long_bitsize
     typedef long           sintC;
     typedef unsigned long  uintC;
@@ -119,7 +119,7 @@
     typedef int sintD;
     typedef unsigned int uintD;
   #else  // we are not using GMP, so just guess something reasonable
-    #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || 
defined(__ia64__) || defined(__x86_64__)))
+    #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || 
defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__)))
       #define intDsize 64
       typedef sint64  sintD;
       typedef uint64  uintD;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to