On Sat, Jan 16, 2016 at 12:49:12AM +0100, Martin Jambor wrote: > bootstrapping on i686-linux revealed the need for the following simple > patch. I've run into two types of compilation errors on > powerpc-ibm-aix (no htolenn functions and ASM_GENERATE_INTERNAL_LABEL > somehow expanding to undeclared rs6000_xcoff_strip_dollar). I plan to > workaround them quickly by making most of the contents of hsa-*.c > files compiled only conditionally (and leave potential hsa support on > non-linux platforms for later), but I will not have time to do the > change and test it properly until Monday. > > But that will hopefully really be it,
IMHO you'd be best to write your own helpers for conversion to little endian (and back). gcc configure already has AC_C_BIGENDIAN (dunno how it handles pdp endian host though, so not sure if it is safe to rely on that), for recent GCC you can use __BYTE_ORDER__ macro to check endianity and __builtin_bswap*. So perhaps just #if GCC_VERSION >= 4006 // use __BYTE_ORDER__ and __builtin_bswap or nothing #else // provide a safe slower default, with shifts and masking #endif As for rs6000_xcoff_strip_dollar, look at other sources that use it what headers they do include, bet you want to #include "tm_p.h" to make it work. Jakub