Develop Linux* Applications for Compatibility between Intel® Itanium®-Based Systems and the IBM POWER* architecture


Help to ensure that Linux applications under development are cross-compatible between Itanium®-based systems and the IBM POWER* architecture.


Write endian-neutral code, using standard APIs. Not developing in an endian-neutral way will result in an application that will need to be recompiled to adhere to the endian dependencies of the processor type (POWER* processors prefer big-endian, while Intel® architecture prefers little-endian).

Endianness refers to how a data element and its individual bytes are addressed in memory. It describes the location of the most significant bytes and least significant bytes of an address. Endianness is dictated by the CPU architecture of the system. The operating system does not dictate the endian model implemented, but rather the endian model implemented by the architecture dictates how the operating system is implemented. Endianness is similar to ordering in written languages. For example, the English language is read from left to right, while Hebrew is read from right to left. Big endianness indicates forward-byte ordering: the lowest address (or leftmost) in a multi-byte value is the most significant byte. Little endianness indicates that the lowest address (or rightmost) in a multi-byte value is the least-significant byte.

If an application was developed using standard APIs, then the application should recompile for Linux using the GNU gcc and g++ compilers. It is important to check that there are no APIs in the applications that are supported by AIX* but not Linux. AIX is POSIX* and UNIX98* compliant, while Linux is not currently compliant.


This KnowledgeBase item contains text drawn verbatim from the following sources:

AIX Affinity with Linux []*

Porting Solaris Applications to Linux*: Endian Issues


For more complete information about compiler optimizations, see our Optimization Notice.