aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-18 16:58:09 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-18 18:38:22 +0100
commit8309c3899aee9429df51eba4566c67d0cc27f68c (patch)
tree0bd884752f981177eca30d711c41dcd28d263289
parentc5b65f7e2bd907a5b7061a42959c485d69ba1ac6 (diff)
downloadgnu-guix-8309c3899aee9429df51eba4566c67d0cc27f68c.tar
gnu-guix-8309c3899aee9429df51eba4566c67d0cc27f68c.tar.gz
gnu: commencement: Use GMP 6.0.0a for bootstrapping.
* gnu/packages/multiprecision.scm (gmp-6.0): New variable. * gnu/packages/commencement.scm (gcc-boot0, gcc-final): Use it. * gnu/packages/patches/gmp-arm-asm-nothumb.patch: New file, reinstated from before e414a7d. * gnu-system.am (dist_patch_DATA): Add it.
-rw-r--r--gnu-system.am1
-rw-r--r--gnu/packages/commencement.scm6
-rw-r--r--gnu/packages/multiprecision.scm18
-rw-r--r--gnu/packages/patches/gmp-arm-asm-nothumb.patch21
4 files changed, 43 insertions, 3 deletions
diff --git a/gnu-system.am b/gnu-system.am
index 0fff8def1d..0e53ce229b 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -491,6 +491,7 @@ dist_patch_DATA = \
gnu/packages/patches/glibc-locale-incompatibility.patch \
gnu/packages/patches/glibc-o-largefile.patch \
gnu/packages/patches/glibc-versioned-locpath.patch \
+ gnu/packages/patches/gmp-arm-asm-nothumb.patch \
gnu/packages/patches/gmp-faulty-test.patch \
gnu/packages/patches/gnucash-price-quotes-perl.patch \
gnu/packages/patches/gnutls-doc-fix.patch \
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8aa32e859d..eda04325f0 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -231,7 +231,7 @@
(package-full-name lib)
char-set:letter)
,(package-name lib)))
- (list gmp mpfr mpc))))
+ (list gmp-6.0 mpfr mpc))))
(alist-cons-after
'install 'symlink-libgcc_eh
(lambda* (#:key outputs #:allow-other-keys)
@@ -245,7 +245,7 @@
(symlink "libgcc.a" "libgcc_eh.a"))))
,phases))))))
- (inputs `(("gmp-source" ,(package-source gmp))
+ (inputs `(("gmp-source" ,(package-source gmp-6.0))
("mpfr-source" ,(package-source mpfr))
("mpc-source" ,(package-source mpc))
("binutils-cross" ,binutils-boot0)
@@ -636,7 +636,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
("static-bash" ,static-bash-for-glibc)
,@(package-native-inputs gcc-boot0)))
- (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp)))
+ (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
("mpfr-source" ,(package-source mpfr))
("mpc-source" ,(package-source mpc))
("ld-wrapper" ,ld-wrapper-boot3)
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 3be612ae62..ad507706db 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -60,6 +60,24 @@ cryptography and computational algebra.")
(license lgpl3+)
(home-page "http://gmplib.org/")))
+(define-public gmp-6.0
+ ;; We keep this one around to bootstrap GCC, to work around a compilation
+ ;; issue on ARM. See
+ ;; <https://gmplib.org/list-archives/gmp-bugs/2015-December/003848.html>.
+ (package
+ (inherit gmp)
+ (version "6.0.0a")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gmp/gmp-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
+ (patches (map search-patch
+ '("gmp-arm-asm-nothumb.patch"
+ "gmp-faulty-test.patch")))))))
+
(define-public mpfr
(package
(name "mpfr")
diff --git a/gnu/packages/patches/gmp-arm-asm-nothumb.patch b/gnu/packages/patches/gmp-arm-asm-nothumb.patch
new file mode 100644
index 0000000000..666cf58cf6
--- /dev/null
+++ b/gnu/packages/patches/gmp-arm-asm-nothumb.patch
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1396602422 -7200
+# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40
+# Parent 0194a75b56b21a9196626430af86c5bd9110c42d
+Conditionalise ARM asm on !__thumb__.
+
+diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c
+--- a/mpn/generic/div_qr_1n_pi1.c Thu Apr 03 23:58:51 2014 +0200
++++ b/mpn/generic/div_qr_1n_pi1.c Fri Apr 04 11:07:02 2014 +0200
+@@ -130,7 +130,7 @@
+ "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC)
+ #endif
+
+-#if defined (__arm__) && W_TYPE_SIZE == 32
++#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
+ #define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \
+ __asm__ ( "adds %2, %5, %6\n\t" \
+ "adcs %1, %3, %4\n\t" \
+