mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: glibc/hurd-headers: Properly cross-build.
* gnu/packages/base.scm (glibc/hurd-headers): Rely on cross-mig, and remove hardcoded configure flag `--host=i586-pc-gnu`. * gnu/packages/cross-base.scm (cross-kernel-headers*): Add `--host` and `--build` configure flags.
This commit is contained in:
parent
ff208b4b62
commit
85ebfcf4ff
2 changed files with 12 additions and 7 deletions
|
@ -22,6 +22,7 @@
|
||||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
|
;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
|
||||||
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
|
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
|
||||||
|
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1427,17 +1428,15 @@ command.")
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(modify-inputs (package-native-inputs glibc)
|
(modify-inputs (package-native-inputs glibc)
|
||||||
(prepend (if (%current-target-system)
|
(prepend (if (%current-target-system)
|
||||||
;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
|
(let* ((cross-base (resolve-interface '(gnu packages cross-base)))
|
||||||
;; hence this hack.
|
(cross-mig (module-ref cross-base 'cross-mig)))
|
||||||
(package (inherit mig)
|
(cross-mig (%current-target-system)))
|
||||||
(arguments `(#:system "i686-linux")))
|
|
||||||
mig))))
|
mig))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments glibc)
|
(substitute-keyword-arguments (package-arguments glibc)
|
||||||
;; We just pass the flags really needed to build the headers.
|
;; We just pass the flags really needed to build the headers.
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
`(list "--enable-add-ons"
|
`(list "--enable-add-ons"
|
||||||
"--host=i586-pc-gnu"
|
|
||||||
,@%glibc/hurd-configure-flags))
|
,@%glibc/hurd-configure-flags))
|
||||||
((#:phases _)
|
((#:phases _)
|
||||||
'(modify-phases %standard-phases
|
'(modify-phases %standard-phases
|
||||||
|
@ -1452,7 +1451,8 @@ command.")
|
||||||
(close-port
|
(close-port
|
||||||
(open-output-file
|
(open-output-file
|
||||||
(string-append out "/include/gnu/stubs.h"))))))
|
(string-append out "/include/gnu/stubs.h"))))))
|
||||||
(delete 'build))))))) ; nothing to build
|
(delete 'build))))) ; nothing to build
|
||||||
|
(supported-systems %hurd-systems)))
|
||||||
|
|
||||||
(define-public tzdata
|
(define-public tzdata
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
|
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
|
||||||
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
|
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -492,7 +493,11 @@ the base compiler. Use XBINUTILS as the associated cross-Binutils."
|
||||||
hurd "/include")))
|
hurd "/include")))
|
||||||
(for-each (cut setenv <> cpath)
|
(for-each (cut setenv <> cpath)
|
||||||
',%gcc-cross-include-paths)
|
',%gcc-cross-include-paths)
|
||||||
#t)))))))
|
#t)))))
|
||||||
|
((#:configure-flags flags)
|
||||||
|
`(cons* ,(string-append "--build=" (%current-system))
|
||||||
|
,(string-append "--host=" target)
|
||||||
|
,flags))))
|
||||||
|
|
||||||
(propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
|
(propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
|
||||||
("hurd-headers" ,xhurd-headers)))
|
("hurd-headers" ,xhurd-headers)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue