mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-30 22:36:50 +01:00
gnu: gnumach-headers: Cross-build without relying on x86.
* gnu/packages/hurd.scm (gnumach-headers): Remove configure flags where we say the builder is running x86. * gnu/packages/cross-base.scm (cross-gnumach-headers): Work around limitation of build system, by manually changing the target host_cpu without relying on --host, because we don't have a working cross-compiler yet.
This commit is contained in:
parent
85ebfcf4ff
commit
c2bb342b5f
2 changed files with 19 additions and 10 deletions
|
@ -375,6 +375,24 @@ (define* (cross-gnumach-headers target
|
||||||
(inherit gnumach-headers)
|
(inherit gnumach-headers)
|
||||||
(name (string-append (package-name gnumach-headers)
|
(name (string-append (package-name gnumach-headers)
|
||||||
"-cross-" target))
|
"-cross-" target))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments gnumach-headers)
|
||||||
|
((#:phases phases #~%standard-phases)
|
||||||
|
#~(modify-phases #$phases
|
||||||
|
;; Cheat by setting the host_cpu variable manually, since using
|
||||||
|
;; --host= would require a working cross-compiler, which we don't
|
||||||
|
;; have yet.
|
||||||
|
(add-after 'unpack 'substitute-host-cpu
|
||||||
|
(lambda _
|
||||||
|
(substitute* "configure.ac"
|
||||||
|
(("AC_CANONICAL_HOST")
|
||||||
|
#$(string-append
|
||||||
|
"host_cpu="
|
||||||
|
(match target
|
||||||
|
((? target-x86-32?)
|
||||||
|
"i386")
|
||||||
|
((? target-x86-64?)
|
||||||
|
"x86_64")))))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(modify-inputs (package-native-inputs gnumach-headers)
|
(modify-inputs (package-native-inputs gnumach-headers)
|
||||||
(prepend xgcc xbinutils)))))
|
(prepend xgcc xbinutils)))))
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
;;; Copyright © 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
|
;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
|
||||||
|
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -75,16 +76,6 @@ (define-public gnumach-headers
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "make" "install-data")))
|
(invoke "make" "install-data")))
|
||||||
(delete 'build))
|
(delete 'build))
|
||||||
|
|
||||||
;; GNU Mach supports only IA32 currently, so cheat so that we can at
|
|
||||||
;; least install its headers.
|
|
||||||
,@(if (%current-target-system)
|
|
||||||
'()
|
|
||||||
;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
|
|
||||||
;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
|
|
||||||
'(#:configure-flags '("--build=i586-pc-gnu"
|
|
||||||
"--host=i686-linux-gnu")))
|
|
||||||
|
|
||||||
#:tests? #f))
|
#:tests? #f))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf automake texinfo-4))
|
(list autoconf automake texinfo-4))
|
||||||
|
|
Loading…
Reference in a new issue