From 84a1efeabd56b080a2a63acb783a9bbc35513873 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 7 Jan 2015 16:15:22 -0500 Subject: [PATCH] configure.ac: reject 'universal' builds AC_C_BIGENDIAN can return 'universal' as the result in the case that we are trying to do a universal build on Mac OS. This has to be opted into explicitly by using multiple -arch CFLAGS. Previously, we detected this result and fell back to doing our own check based on the endianness of the build machine, hardcoding that. This means that universal builds might successfully build, but the binaries would never actually run correctly on the 'opposite' arch. This check was added because of a bug in the intial implementation of this detection in autoconf, which was inappropriately identifying non-macos compilers as 'universal'. That was hitting ppc64 systems. See https://bugzilla.redhat.com/show_bug.cgi?id=449944 for more info. Commit b0e687ef42e21b1eb7af18c4eaebcd41b0bd5632 in autoconf ("Limit AC_C_BIGENDIAN univeral checks to Mac OS X") solved this issue in 2008, so let's remove our workaround. For good measure, if we detect "universal" in the result, error out. https://bugzilla.gnome.org/show_bug.cgi?id=742548 --- configure.ac | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index b0929d0e2..4c2fc4598 100644 --- a/configure.ac +++ b/configure.ac @@ -762,17 +762,7 @@ AM_CONDITIONAL(HAVE_SUNSTUDIO_VISIBILITY, [test x$g_have_sunstudio_visibility = # check for bytesex stuff AC_C_BIGENDIAN if test x$ac_cv_c_bigendian = xuniversal ; then -AC_TRY_COMPILE([#include ], [#if __BYTE_ORDER == __BIG_ENDIAN -#else -#error Not a big endian. -#endif], - ac_cv_c_bigendian=yes - ,AC_TRY_COMPILE([#include ], [#if __BYTE_ORDER == __LITTLE_ENDIAN -#else -#error Not a little endian. -#endif], - ac_cv_c_bigendian=no - ,AC_MSG_WARN([Could not determine endianness.]))) + AC_MSG_ERROR([Universal builds not supported: see https://bugs.gnome.org/742548]) fi