guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

09/17: gnu: cross-base: Build the correct cross-mig.


From: Manolis Fragkiskos Ragkousis
Subject: 09/17: gnu: cross-base: Build the correct cross-mig.
Date: Tue, 06 Oct 2015 17:44:25 +0000

phant0mas pushed a commit to branch wip-hurd
in repository guix.

commit 8a7db9a3495672453e01f8535fc024b0e58fdc9d
Author: Manolis Ragkousis <address@hidden>
Date:   Tue Jun 16 22:47:16 2015 +0300

    gnu: cross-base: Build the correct cross-mig.
    
    * gnu/packages/cross-base.scm (xmig): Pass '--target=' instead of
      '--host=' and set the CROSS_CPATH.
    * gnu/packages/hurd.scm (hurd-minimal): Move #:configure-flags
      from here...
      (hurd-headers): ...to here. Change '--build' to '--host'.
---
 gnu/packages/cross-base.scm |   13 ++++++--
 gnu/packages/hurd.scm       |   68 +++++++++++++++++++------------------------
 2 files changed, 39 insertions(+), 42 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f3eb775..27f4881 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -326,10 +326,15 @@ XBINUTILS and the cross tool chain."
     (package (inherit mig)
       (name (string-append "mig-cross"))
       (arguments
-       (substitute-keyword-arguments (package-arguments mig)
-         ((#:configure-flags flags)
-          `(cons ,(string-append "--host=" target)
-                 ,flags))))
+       `(#:phases (alist-cons-before
+                   'configure 'set-cross-headers-path
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (let ((mach (assoc-ref inputs "cross-gnumach-headers")))
+                       (setenv "CROSS_CPATH"
+                               (string-append mach "/include"))))
+                   %standard-phases)
+         #:configure-flags (list ,(string-append "--target=" target))
+         ,@(package-arguments mig)))
 
       (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)))
       (native-inputs `(("cross-gcc" ,xgcc)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index a2714f0..672df6b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -21,6 +21,7 @@
   #:use-module (guix download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages bison)
@@ -125,10 +126,17 @@ communication.")
                            ;; that.
                            ,@(if (%current-target-system)
                                  '()
-                                 '("--build=i686-pc-gnu"))
+                                 '("--host=i686-pc-gnu"))
 
                            ;; Reduce set of dependencies.
-                           "--without-parted")
+                           "--disable-ncursesw"
+                           "--disable-test"
+                           "--without-libbz2"
+                           "--without-libz"
+                           "--without-parted"
+                           ;; Skip the clnt_create check because it expects
+                           ;; a working glibc causing a circular dependency.
+                           "ac_cv_search_clnt_create=no")
 
        #:tests? #f))
     (home-page "http://www.gnu.org/software/hurd/hurd.html";)
@@ -147,42 +155,26 @@ Library and other user programs.")
        ("mig" ,mig)))
 
     (arguments
-     `(#:phases (alist-replace
-                 'install
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let ((out (assoc-ref outputs "out")))
-                     ;; We need to copy libihash.a to the output directory 
manually,
-                     ;; since there is no target for that in the makefile.
-                     (mkdir-p (string-append out "/include"))
-                     (copy-file "libihash/ihash.h"
-                                (string-append out "/include/ihash.h"))
-                     (mkdir-p (string-append out "/lib"))
-                     (copy-file "libihash/libihash.a"
-                                (string-append out "/lib/libihash.a"))
-                     #t))
-                 (alist-replace
-                  'build
-                  (lambda _
-                    (zero? (system* "make" "-Clibihash" "libihash.a")))
-                  (alist-cons-before
-                   'configure 'bootstrap
-                   (lambda _
-                     (zero? (system* "autoreconf" "-vfi")))
-                   %standard-phases)))
-       #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants
-                           ;; that.
-                           "--host=i686-pc-gnu"
-
-                           ;; Reduce set of dependencies.
-                           "--disable-ncursesw"
-                           "--disable-test"
-                           "--without-libbz2"
-                           "--without-libz"
-                           "--without-parted"
-                           ;; Skip the clnt_create check because it expects
-                           ;; a working glibc causing a circular dependency.
-                           "ac_cv_search_clnt_create=no")
-       #:tests? #f))
+     (substitute-keyword-arguments (package-arguments hurd-headers)
+       ((#:phases _)
+        '(alist-replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              ;; We need to copy libihash.a to the output directory manually,
+              ;; since there is no target for that in the makefile.
+              (mkdir-p (string-append out "/include"))
+              (copy-file "libihash/ihash.h"
+                         (string-append out "/include/ihash.h"))
+              (mkdir-p (string-append out "/lib"))
+              (copy-file "libihash/libihash.a"
+                         (string-append out "/lib/libihash.a"))
+              #t))
+          (alist-replace
+           'build
+           (lambda _
+             (zero? (system* "make" "-Clibihash" "libihash.a")))
+           %standard-phases)))))
     (home-page "http://www.gnu.org/software/hurd/hurd.html";)
     (synopsis "GNU Hurd libraries")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]