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

Re: Reg. endianity, 32/64-bit and GCC macros.



Kumar Appaiah wrote:
> Dear Debian MIPS list,
> 
> I am the maintainer for the new package libitpp (source), a C++
> library with functions for mathematical operations and signal
> processing. Now, the problem is that it doesn't build on mips and mipsel:
> refer http://buildd.debian.org/fetch.cgi?pkg=libitpp;ver=3.10.8-1;arch=mips;stamp=1169391648
> 
> Now, I have contacted upstream, and they want to know the
> following. I've tried to do some finding out, but please confirm:
> 
> 1. Confirm endianity: debian-mips is big-endian and debian-mipsel is
>    little-endian, right?

Correct.

> 2. Confirm 32/64-bit? I am not sure about both mips and mipsel.

Both are 32bit, o32 ABI.

> 3. Are __mips__ and __MIPSEL__ sufficient macros to confirm this
>    platform on GCC?

__mips__ is defined for both endiannesses, and for all three relevant
linux ABIs per endianness.

The test for endianness is #ifdef __MIPSEB__ / __MIPSEL__,
the test for ABI is _MIPS_SIM == _ABIO32 / _ABIN32 / _ABI64.


Thiemo



Reply to: