[glib] configure.ac: reject 'universal' builds
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] configure.ac: reject 'universal' builds
- Date: Sat, 10 Jan 2015 23:00:51 +0000 (UTC)
commit 84a1efeabd56b080a2a63acb783a9bbc35513873
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Jan 7 16:15:22 2015 -0500
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 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b0929d0..4c2fc45 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 <endian.h>], [#if __BYTE_ORDER == __BIG_ENDIAN
-#else
-#error Not a big endian.
-#endif],
- ac_cv_c_bigendian=yes
- ,AC_TRY_COMPILE([#include <endian.h>], [#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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]