* [PATCH] gnu: cross-base: Build the correct cross-mig.
@ 2015-06-16 22:10 Manolis Ragkousis
2015-06-17 19:33 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Manolis Ragkousis @ 2015-06-16 22:10 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 53 bytes --]
With this patch, cross-mig is built the correct way.
[-- Attachment #2: 0001-gnu-cross-base-Build-the-correct-cross-mig.patch --]
[-- Type: text/x-patch, Size: 6030 bytes --]
From eece3c8f30d0eb5ad939106e08e621120b83c3b6 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 16 Jun 2015 22:47:16 +0300
Subject: [PATCH] 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 e54bee4..6e9d544 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -310,10 +310,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 d6b58ed..43e8b1d 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
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gnu: cross-base: Build the correct cross-mig.
2015-06-16 22:10 [PATCH] gnu: cross-base: Build the correct cross-mig Manolis Ragkousis
@ 2015-06-17 19:33 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-06-17 19:33 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: Guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> From eece3c8f30d0eb5ad939106e08e621120b83c3b6 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Tue, 16 Jun 2015 22:47:16 +0300
> Subject: [PATCH] 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'.
Looks good to me! OK for wip-hurd.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-17 19:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16 22:10 [PATCH] gnu: cross-base: Build the correct cross-mig Manolis Ragkousis
2015-06-17 19:33 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.