1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
From d9b26d69ee6cf695ca67bb8d23f31d1eb8d39796 Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
Date: Tue, 20 Feb 2018 23:58:09 -0600
Subject: Fix 32-bit big endian builds via -Oresolve-primitives -Ocps
Specify -Oresolve-primitives -Ocps during bootstrapping builds to fix
build failures on 32-bit big endian architectures.
Thanks to John David Anglin for reporting the problem and investigating
the problem, and to John Paul Adrian Glaubitz for helping devise the
solution.
Bug: https://debbugs.gnu.org/45214
Bug-Debian: https://bugs.debian.org/977223
---
bootstrap/Makefile.am | 9 ++++++++-
configure.ac | 3 +++
stage0/Makefile.am | 10 +++++++++-
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/bootstrap/Makefile.am b/bootstrap/Makefile.am
index a4634c447..0aa548c26 100644
--- a/bootstrap/Makefile.am
+++ b/bootstrap/Makefile.am
@@ -22,7 +22,14 @@
GUILE_WARNINGS = -W0
-GUILE_OPTIMIZATIONS = -O1
+
+if !DEB_GUILE_32_BIT_BIG_ENDIAN
+ $(info Note: not adjusting GUILE_OPTIMIZATIONS for 32-bit big-endian architecture)
+ GUILE_OPTIMIZATIONS = -O1
+else
+ $(info Note: adjusting GUILE_OPTIMIZATIONS for 32-bit big-endian architecture)
+ GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps
+endif
include $(top_srcdir)/am/bootstrap.am
diff --git a/configure.ac b/configure.ac
index 0dcb71cce..dc915ebaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,6 +374,9 @@ esac
AC_MSG_RESULT($SCM_PREBUILT_BINARIES)
AC_SUBST([SCM_PREBUILT_BINARIES])
+AM_CONDITIONAL([DEB_GUILE_32_BIT_BIG_ENDIAN],
+ [test "$SCM_PREBUILT_BINARIES" = 32-bit-big-endian])
+
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
diff --git a/stage0/Makefile.am b/stage0/Makefile.am
index 12029fb45..4228f607d 100644
--- a/stage0/Makefile.am
+++ b/stage0/Makefile.am
@@ -22,7 +22,15 @@
GUILE_WARNINGS = -W0
-GUILE_OPTIMIZATIONS = -O1
+
+if !DEB_GUILE_32_BIT_BIG_ENDIAN
+ $(info Note: not adjusting GUILE_OPTIMIZATIONS for 32-bit big-endian architecture)
+ GUILE_OPTIMIZATIONS = -O1
+else
+ $(info Note: adjusting GUILE_OPTIMIZATIONS for 32-bit big-endian architecture)
+ GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps
+endif
+
GUILE_BOOTSTRAP_STAGE = stage0
include $(top_srcdir)/am/bootstrap.am
|