summary refs log tree commit diff
path: root/gnu/packages/multiprecision.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-12-31 04:17:45 -0500
committerMark H Weaver <mhw@netris.org>2015-01-07 12:34:19 -0500
commit24aaf2f257e6b611d3759ffc53c29828efce1917 (patch)
treeaaf7c0355f43ad403b88037cfe30e348fe66b5e4 /gnu/packages/multiprecision.scm
parent76e639a00fecb194e2fefc267e2e97c5845434b2 (diff)
downloadguix-24aaf2f257e6b611d3759ffc53c29828efce1917.tar.gz
gnu: gmp: Apply fixes for armhf.
* gnu/packages/patches/gmp-arm-asm-nothumb.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/multiprecision.scm (gmp): Add patch.  Include --build triplet
  in configure args when building natively.
* gnu/packages/commencement.scm (gcc-final): Use bootstrap guile to
  build gmp-source.
Diffstat (limited to 'gnu/packages/multiprecision.scm')
-rw-r--r--gnu/packages/multiprecision.scm15
1 files changed, 13 insertions, 2 deletions
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 377d922a09..ddbfc79965 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +23,7 @@
   #:use-module (gnu packages m4)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
 (define-public gmp
@@ -35,7 +37,8 @@
                             version ".tar.xz"))
             (sha256
              (base32
-              "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))))
+              "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
+            (patches (list (search-patch "gmp-arm-asm-nothumb.patch")))))
    (build-system gnu-build-system)
    (native-inputs `(("m4" ,m4)))
    (outputs '("out" "debug"))
@@ -43,7 +46,15 @@
                 '(;; Build a "fat binary", with routines for several
                   ;; sub-architectures.
                   "--enable-fat"
-                  "--enable-cxx")))
+                  "--enable-cxx"
+
+                  ;; FIXME: gmp-6.0.0a's config.guess fails on
+                  ;; multi-core armhf systems.
+                  ,@(if (%current-target-system)
+                        '()
+                        (let ((triplet
+                               (nix-system->gnu-triplet (%current-system))))
+                          (list (string-append "--build=" triplet)))))))
    (synopsis "Multiple-precision arithmetic library")
    (description
     "GMP is a library for arbitrary precision arithmetic, operating on