[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: PPC not getting __WORDSIZE set



On Mon, 2009-11-02 at 23:34 +0100, Jakub Jelinek wrote:
> On Mon, Nov 02, 2009 at 05:15:50PM -0500, Bryan Kearney wrote:
> > Word of warning.. I am no too familiar with C across platforms.  I am  
> > trying to package ruby-ffi (spec file is at [1]) and when I do a scratch  
> > build in Koji [2] it runs fine on x86 but is failing in ppc_64. It  
> > appears that __WORDSIZE is not being set [3]. I looked at the CFLags for  
> > the x86_64 and they are the same, so I assumed things would run fine.  
> > Can anyone point me at what to look at next?
> 
> __WORDSIZE is a glibc internal macro, packages shouldn't be using it.
> Whether it is defined or not depends on whether any of the headers that are
> included needed to check that macro or not.
> 
> You should be using __LP64__ or similar macros instead.

atropine:~% : | cpp -dM | grep -c LP     
0

What header defines __ILP32__ or __LP64__?

Of course there's also:

atropine:~% : | cpp -dM | grep SIZEOF
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 4
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG_DOUBLE__ 12
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_LONG_LONG__ 8

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]