On Sun, Jun 28, 2015 at 10:39:32PM +0200, Ludovic Courtès wrote:
> Could you post the relevant excerpt of the build log, or
> ‘test-suite.log’?
Well, I tried to build it by hand, and it worked; then I tried again with
a recent git version, and it also worked.
Since I noticed a "FIXME" in the gmp package, I worked on that. The
attached patch backports a fix to config.guess in the gmp trunk that
correctly detects the neon architecture on multicore arm machines, instead
of explicitly passing the build triplet.
For testing purposes and your scrutiny, I added a new package gmp-arm; as
indicated in the log message, my real intent is to modify the gmp package
itself, which should be done in a new core-updates cycle. This would also
be the occasion to update mpfr.
Andreas
>From 42af05881facd3eac843133b9aac49de36716003 Mon Sep 17 00:00:00 2001
From: Andreas Enge <privat@xobs-novena>
Date: Fri, 3 Jul 2015 22:01:27 +0200
Subject: [PATCH] gnu: gmp: Patch detection of multicore ARM neon.
* gnu/packages/patches/gmp-arm-neon.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/multiprecision.scm (gmp)[source]: Use it.
[arguments]: Drop the field.
---
gnu-system.am | 1 +
gnu/packages/multiprecision.scm | 16 ++++++++++++++++
gnu/packages/patches/gmp-arm-neon.patch | 16 ++++++++++++++++
3 files changed, 33 insertions(+)
create mode 100644 gnu/packages/patches/gmp-arm-neon.patch
diff --git a/gnu-system.am b/gnu-system.am
index a3c56a8..61385f2 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -447,6 +447,7 @@ dist_patch_DATA =
\
gnu/packages/patches/glibc-ldd-x86_64.patch \
gnu/packages/patches/glibc-locales.patch \
gnu/packages/patches/gmp-arm-asm-nothumb.patch \
+ gnu/packages/patches/gmp-arm-neon.patch \
gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
gnu/packages/patches/gobject-introspection-cc.patch \
gnu/packages/patches/gobject-introspection-girepository.patch \
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index da52b2b..da257ed 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -66,6 +66,22 @@ cryptography and computational algebra.")
(license lgpl3+)
(home-page "http://gmplib.org/")))
+(define-public gmp-arm
+ (package (inherit gmp)
+ (name "gmp-arm")
+ (version "6.0.0a")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnu/gmp/gmp-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
+ (patches (list (search-patch "gmp-arm-asm-nothumb.patch")
+ (search-patch "gmp-arm-neon.patch")))))
+ (arguments '())))
+
(define-public mpfr
(package
(name "mpfr")
diff --git a/gnu/packages/patches/gmp-arm-neon.patch
b/gnu/packages/patches/gmp-arm-neon.patch
new file mode 100644
index 0000000..6c267f5
--- /dev/null
+++ b/gnu/packages/patches/gmp-arm-neon.patch
@@ -0,0 +1,16 @@
+Patch to correctly detect the neon architecture for multicore machines;
+taken from the trunk of the gmp mercurial repository.
+
+--- gmp-6.0.0.old/config.guess 2014-03-25 15:37:55.000000000 +0100
++++ gmp-6.0.0.new/config.guess 2015-07-03 09:03:15.009942296 +0200
+@@ -199,8 +199,9 @@
+ 0xc14) exact_cpu="armcortexr4";; # v7r
+ 0xc15) exact_cpu="armcortexr5";; # v7r
+ 0xc23) exact_cpu="armcortexm3";; # v7m
++ *) exact_cpu=$guess_cpu;;
+ esac
+- exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo
2>/dev/null`"
++ exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo
2>/dev/null | head -n 1 2>/dev/null`"
+ ;;
+
+ ia64*-*-*)
--
2.1.4