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:
Josselin Poiret 2023-05-22 11:04:13 +02:00
parent 85ebfcf4ff
commit c2bb342b5f
No known key found for this signature in database
GPG key ID: 505E40B916171A8A
2 changed files with 19 additions and 10 deletions

View file

@ -375,6 +375,24 @@ target that libc."
(inherit gnumach-headers)
(name (string-append (package-name gnumach-headers)
"-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
(modify-inputs (package-native-inputs gnumach-headers)
(prepend xgcc xbinutils)))))