gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Update comment on where
to find shared linker name.
(make-raw-bag): Also use raw-build-guile3 when building for the 64bit Hurd.
* gnu/packages/cross-base.scm (cross-kernel-headers*): Use target-hurd?
instead of custom "i586..."  matching to also use xhurd-core-headers for
target-hurd64.
* gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc)
[native-inputs]: Move final-inputs before cross-packages.
(%binutils-static)[arguments]: When building for the 64bit Hurd, add
"lt_cv_prog_compiler_static_works=yes", "lt_cv_prog_compiler_static_works_CXX=yes"
to #:make-flags to convince to actually link the binaries statically.
(make-guile-static)[arguments]: When building for the 64bit Hurd, add
"lt_cv_prog_compiler_static_works=yes" to #:configure-flags to convince
libtool to actually link guile statically.
* guix/platforms/x86.scm (x86_64-gnu): New exported variable.
* guix/utils.scm (target-hurd64? system-hurd64?): New procedures.
This commit is contained in:
Janneke Nieuwenhuizen 2024-11-02 18:27:51 +01:00
parent ae2213ed98
commit 94dfb68d43
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
5 changed files with 46 additions and 13 deletions

View file

@ -145,7 +145,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
target
#:xbinutils (cross-binutils target)
#:libc (cross-bootstrap-libc target))))
`(("cross-gcc" ,(package
`(,@(%final-inputs)
;; As versions for gcc and cross-gcc can differ, make sure to have
;; cross-gcc behind gcc in CPLUS_INCLUDE_PATH.
("cross-gcc" ,(package
(inherit xgcc)
(search-paths
;; Ensure the cross libc headers appears on the
@ -154,8 +157,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(variable "CROSS_CPLUS_INCLUDE_PATH")
(files '("include")))
(package-search-paths gcc)))))
("cross-binutils" ,(cross-binutils target))
,@(%final-inputs)))
("cross-binutils" ,(cross-binutils target))))
`(("libc" ,(glibc-for-bootstrap glibc))
("libc:static" ,(glibc-for-bootstrap glibc) "static")
("gcc" ,(gcc-for-bootstrap glibc))
@ -395,10 +397,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
((#:configure-flags flags _ ...)
flags)))
#:make-flags
(match (memq #:make-flags (package-arguments binutils))
((#:make-flags flags _ ...)
flags)
(_ #~'()))
#~(append
#$(if (target-hurd64?)
#~'("lt_cv_prog_compiler_static_works=yes"
"lt_cv_prog_compiler_static_works_CXX=yes")
#~'())
#$(match (memq #:make-flags (package-arguments binutils))
((#:make-flags flags _ ...)
flags)
(_ #~'())))
#:strip-flags #~'("--strip-all")
#:phases
#~(modify-phases %standard-phases
@ -642,6 +649,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
#$@(if (target-hurd?)
#~("--disable-jit")
#~())
#$@(if (target-hurd64?)
#~("lt_cv_prog_compiler_static_works=yes")
#~())))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases