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

Re: Confused about mips integer types



Richard B. Kreckel wrote:
> Hi,
>
> I just found a package of mine broke on Mips:
> <http://experimental.debian.net/fetch.php?&pkg=cln&ver=1.2.0%7Ebeta1-1&arch=mips&stamp=1191118968&file=log&as=raw>
>
> The first interesting part is this:
> ../include/cln/object.h:29:1: warning: "cl_word_alignment" redefined
> ../include/cln/object.h:26:1: warning: this is the location of the previous 
> definition
>
> So, after including include/cln/config.h generated by autoconf from 
> include/cln/config.h.in, both __mips__ and __mips64__ were defined.
>
> The next interesting part is:
> ../include/cln/number.h:226: error: 'cl_FN_tag' was not declared in this 
> scope
>
> Reading include/cln/object.h it becomes clear that the system's pointer 
> size was 4 bytes, not 8.
>
> Strange. Doesn't __mips64__ imply 64 bit wide pointers?

__mips64__ is whatever the build system of cln likes it to be, note the
triling underscores.

The compiler predefines __mips__ (always), and __mips64 when it uses
64bit wide registers (i.e. with -mabi=n32 or -mabi=64).

The pointer width depends on the ABI. o32 ABI and n32 ABI share the
same C type widths (they are ILP32). long long is mapped to a register
pair in o32, and to a single register in n32. n64 is LP64.

Debian currently uses exclusively o32 ABI.


Thiemo



Reply to: