Subject: [bug#49659] [PATCH core-updates] gnu: guile: Fix failing tests on i686-linux.

From: Maxime Devos <[email-masked]>
Date: Tue, 20 Jul 2021 13:27:12 +0200

i586-gnu might have the same issue.

* gnu/packages/guile.scm
  (guile-3.0)[arguments]<#:configure-flags>: Add
  "-fexcess-precision=standard" to CFLAGS.
---
 gnu/packages/guile.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index d78c57e88c..e1f6495837 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2018 Eric Bavier <[email-masked]>
 ;;; Copyright © 2019 Taylan Kammer <[email-masked]>
 ;;; Copyright © 2020, 2021 Efraim Flashner <[email-masked]>
+;;; Copyright © 2021 Maxime Devos <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -316,7 +317,10 @@ 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)))
+        ;; -fexcess-precision=standard is required when compiling for
+        ;; i686-linux, otherwise "numbers.test" will fail.
+        (let ((flags `(cons* "CFLAGS=-g -O2 -fexcess-precision=standard"
+                              "--enable-mini-gmp" ,flags)))
           ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
           (if (hurd-target?)
               `(cons "--disable-jit" ,flags)
-- 
2.32.0