summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorFederico Beffa <beffa@fbengineering.ch>2016-10-17 09:01:11 +0200
committerFederico Beffa <beffa@fbengineering.ch>2016-10-19 08:44:11 +0200
commitf7616df4afc1b1c81d722d3beae2ca6830065f6f (patch)
tree16d2e752738cc7bc69488a26483799707988cceb /gnu
parent4b86dde0d6c7fd259d5a676114813bcbcaa9324b (diff)
downloadguix-f7616df4afc1b1c81d722d3beae2ca6830065f6f.tar.gz
gnu: chez-scheme: Fix i686 build.
* gnu/packages/scheme.scm (chez-scheme): Add 'configure-flags', generalize
  'configure' phase and simplify 'install-doc' phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/scheme.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index c461efb373..10368b2d15 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -645,6 +645,14 @@ threads.")
                   (guix build utils)
                   (ice-9 match))
        #:test-target "test"
+       #:configure-flags
+       (list ,(match (or (%current-target-system) (%current-system))
+                ("x86_64-linux" '(list "--machine=ta6le"))
+                ("i686-linux" '(list "--machine=ti3le"))
+                ;; FIXME: Some people succeeded in cross-compiling to
+                ;; ARM. https://github.com/cisco/ChezScheme/issues/13
+                (_
+                 '())))
        #:phases
        (modify-phases %standard-phases
          ;; Adapt the custom 'configure' script.
@@ -673,12 +681,9 @@ threads.")
                (substitute* (find-files "./c" "Mf-[a-zA-Z0-9.]+")
                  (("\\$\\{Kernel\\}: \\$\\{kernelobj\\} \\.\\./zlib/libz\\.a")
                   "${Kernel}: ${kernelobj}")
-                 (("ld -melf_x86_64 -r -X -o \\$\\{Kernel\\} \\$\\{kernelobj\\} \\.\\./zlib/libz\\.a")
-                  (string-append "ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} "
-                                 zlib "/lib/libz.a"))
-                 (("\\(cd \\.\\./zlib; CFLAGS=-m64 \\./configure --64)")
-                  (which "true"))
-                 (("(cd \\.\\./zlib; make)")
+                 (("ld ([-a-zA-Z0-9_${} ]+) \\.\\./zlib/libz\\.a" all args)
+                  (string-append "ld " args " " zlib "/lib/libz.a"))
+                 (("\\(cd \\.\\./zlib; ([-a-zA-Z0-9=./ ]+))")
                   (which "true")))
                (substitute* (find-files "mats" "Mf-.*")
                  (("^[[:space:]]+(cc ) *") "\tgcc "))
@@ -715,9 +720,7 @@ threads.")
                (system* "make" "docs")
                (with-directory-excursion "csug"
                  (substitute* "Makefile"
-                   (("/tmp/csug9") doc)
-                   (("^m = a6le")
-                    "m := $(shell echo '(machine-type)' | scheme -q)"))
+                   (("/tmp/csug9") doc))
                  (system* "make" "install")
                  (install-file "csug.pdf" doc))
                (with-directory-excursion "release_notes"