From c2bb342b5ff0ac15d6dc37a9ba8daeb8956237e1 Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Mon, 22 May 2023 11:04:13 +0200 Subject: 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. --- gnu/packages/cross-base.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gnu/packages/cross-base.scm') diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index e5fc4ba8b5..cdf642358d 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -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))))) -- cgit v1.2.3