summary refs log tree commit diff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-07-20 23:34:17 +0200
committerLudovic Courtès <ludo@gnu.org>2021-07-21 15:45:36 +0200
commitfccc0275091af10a46471c68df525d19f446af9e (patch)
treee8bdb3f98533b683d01b33ae05efb3d4c620969e /gnu/packages/guile.scm
parentb15c3dd9b0e9cf6858f730e1d46c35ed9ab6a758 (diff)
downloadguix-fccc0275091af10a46471c68df525d19f446af9e.tar.gz
gnu: guile: Fix failing tests on IA32.
Fixes <https://issues.guix.gnu.org/49368>.

* gnu/packages/guile.scm (guile-3.0)[arguments]<#:configure-flags>:
  Add "-fexcess-precision=standard" to CFLAGS when
  (target-x86-32?) is true.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r--gnu/packages/guile.scm19
1 files changed, 14 insertions, 5 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index d78c57e88c..86621e4ca0 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
 ;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -316,11 +317,19 @@ without requiring the source code to be rewritten.")
     (arguments
      (substitute-keyword-arguments (package-arguments guile-2.2)
        ((#:configure-flags flags ''())
-        (let ((flags `(cons "--enable-mini-gmp" ,flags)))
-          ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
-          (if (hurd-target?)
-              `(cons "--disable-jit" ,flags)
-              flags)))
+        ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
+        `(cons* ,@(if (hurd-target?)
+                      '("--disable-jit")
+                      '())
+                ;; -fexcess-precision=standard is required when compiling for
+                ;; i686-linux, otherwise "numbers.test" will fail
+                ;; (see <https://issues.guix.gnu.org/49368> and
+                ;; <https://issues.guix.gnu.org/49659>).
+                ,@(if (target-x86-32?)
+                      '("CFLAGS=-g -O2 -fexcess-precision=standard")
+                      '())
+                "--enable-mini-gmp"
+                ,flags))
        ((#:phases phases)
         `(modify-phases ,phases
            (add-before 'check 'disable-stack-overflow-test