autoconf
[Top][All Lists]
Advanced

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

AC_C_BIGENDIAN answers "universal" on powerpc-aix


From: Peter O'Gorman
Subject: AC_C_BIGENDIAN answers "universal" on powerpc-aix
Date: Wed, 13 Aug 2008 13:13:15 -0500
User-agent: Mutt/1.5.17 (2007-11-01)

Hi,

"checking whether byte ordering is bigendian... universal" is not the
correct answer on powerpc-ibm-aix. The question is not really correct
either (yes/no question, answer is neither yes nor no), but that is
beside the point.

As far as I know, it is only possible to built differently endian output
on Mac OS X with Apple's gcc. Would a patch to limit the check for
universal to when __APPLE_CC__ is defined be accepted?

xlc on powerpc-aix defines __BIG_ENDIAN__. While this is normally not a
problem (the define in config.h will end up correct), it can be an issue
when the result of the test is used as in Glib:

case xyes in
x$ac_cv_c_bigendian)
  g_byte_order=G_BIG_ENDIAN
  g_bs_native=BE
  g_bs_alien=LE
  ;;
*)
  g_byte_order=G_LITTLE_ENDIAN
  g_bs_native=LE
  g_bs_alien=BE
  ;;
esac

This means that glib thinks powerpc-aix is little-endian. On darwin, I
would expect to have to deal with universal binary issues, it came as a
bit of a surprise on aix though.

Peter
-- 
Peter O'Gorman
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]