mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
gnu: cross-base: Remove unneeded 'let'.
This is a followup to102d307520
. * gnu/packages/cross-base.scm (cross-libc): Remove (let ((libc libc)) …). (cherry picked from commit524a4e357c
)
This commit is contained in:
parent
a533c5a183
commit
be1e842ad7
1 changed files with 57 additions and 57 deletions
|
@ -479,69 +479,69 @@ (define* (cross-libc target
|
||||||
(native-libc target libc
|
(native-libc target libc
|
||||||
#:xgcc xgcc
|
#:xgcc xgcc
|
||||||
#:xbinutils xbinutils)
|
#:xbinutils xbinutils)
|
||||||
(let ((libc libc))
|
(package
|
||||||
(package (inherit libc)
|
(inherit libc)
|
||||||
(name (string-append "glibc-cross-" target))
|
(name (string-append "glibc-cross-" target))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments
|
(substitute-keyword-arguments
|
||||||
`(;; Disable stripping (see above.)
|
`( ;; Disable stripping (see above.)
|
||||||
#:strip-binaries? #f
|
#:strip-binaries? #f
|
||||||
|
|
||||||
;; This package is used as a target input, but it should not have
|
;; This package is used as a target input, but it should not have
|
||||||
;; the usual cross-compilation inputs since that would include
|
;; the usual cross-compilation inputs since that would include
|
||||||
;; itself.
|
;; itself.
|
||||||
#:implicit-cross-inputs? #f
|
#:implicit-cross-inputs? #f
|
||||||
|
|
||||||
;; We need SRFI 26.
|
;; We need SRFI 26.
|
||||||
#:modules ((guix build gnu-build-system)
|
#:modules ((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
|
|
||||||
,@(package-arguments libc))
|
,@(package-arguments libc))
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
`(cons ,(string-append "--host=" target)
|
`(cons ,(string-append "--host=" target)
|
||||||
,(if (hurd-triplet? target)
|
,(if (hurd-triplet? target)
|
||||||
`(cons "--disable-werror" ,flags)
|
`(cons "--disable-werror" ,flags)
|
||||||
flags)))
|
flags)))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
(add-before 'configure 'set-cross-kernel-headers-path
|
(add-before 'configure 'set-cross-kernel-headers-path
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let* ((kernel (assoc-ref inputs "kernel-headers"))
|
(let* ((kernel (assoc-ref inputs "kernel-headers"))
|
||||||
(cpath (string-append kernel "/include")))
|
(cpath (string-append kernel "/include")))
|
||||||
(for-each (cut setenv <> cpath)
|
(for-each (cut setenv <> cpath)
|
||||||
',%gcc-cross-include-paths)
|
',%gcc-cross-include-paths)
|
||||||
(setenv "CROSS_LIBRARY_PATH"
|
(setenv "CROSS_LIBRARY_PATH"
|
||||||
(string-append kernel "/lib")) ; for Hurd's libihash
|
(string-append kernel "/lib")) ; for Hurd's libihash
|
||||||
#t)))
|
#t)))
|
||||||
,@(if (hurd-triplet? target)
|
,@(if (hurd-triplet? target)
|
||||||
'((add-after 'install 'augment-libc.so
|
'((add-after 'install 'augment-libc.so
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out")))
|
(let* ((out (assoc-ref outputs "out")))
|
||||||
(substitute* (string-append out "/lib/libc.so")
|
(substitute* (string-append out "/lib/libc.so")
|
||||||
(("/[^ ]+/lib/libc.so.0.3")
|
(("/[^ ]+/lib/libc.so.0.3")
|
||||||
(string-append out "/lib/libc.so.0.3"
|
(string-append out "/lib/libc.so.0.3"
|
||||||
" libmachuser.so libhurduser.so"))))
|
" libmachuser.so libhurduser.so"))))
|
||||||
#t)))
|
#t)))
|
||||||
'())))))
|
'())))))
|
||||||
|
|
||||||
;; Shadow the native "kernel-headers" because glibc's recipe expects the
|
;; Shadow the native "kernel-headers" because glibc's recipe expects the
|
||||||
;; "kernel-headers" input to point to the right thing.
|
;; "kernel-headers" input to point to the right thing.
|
||||||
(propagated-inputs `(("kernel-headers" ,xheaders)))
|
(propagated-inputs `(("kernel-headers" ,xheaders)))
|
||||||
|
|
||||||
;; FIXME: 'static-bash' should really be an input, not a native input, but
|
;; FIXME: 'static-bash' should really be an input, not a native input, but
|
||||||
;; to do that will require building an intermediate cross libc.
|
;; to do that will require building an intermediate cross libc.
|
||||||
(inputs '())
|
(inputs '())
|
||||||
|
|
||||||
(native-inputs `(("cross-gcc" ,xgcc)
|
(native-inputs `(("cross-gcc" ,xgcc)
|
||||||
("cross-binutils" ,xbinutils)
|
("cross-binutils" ,xbinutils)
|
||||||
,@(if (hurd-triplet? target)
|
,@(if (hurd-triplet? target)
|
||||||
`(("cross-mig"
|
`(("cross-mig"
|
||||||
,@(assoc-ref (package-native-inputs xheaders)
|
,@(assoc-ref (package-native-inputs xheaders)
|
||||||
"cross-mig")))
|
"cross-mig")))
|
||||||
'())
|
'())
|
||||||
,@(package-inputs libc) ;FIXME: static-bash
|
,@(package-inputs libc) ;FIXME: static-bash
|
||||||
,@(package-native-inputs libc)))))))
|
,@(package-native-inputs libc))))))
|
||||||
|
|
||||||
(define* (native-libc target
|
(define* (native-libc target
|
||||||
#:optional
|
#:optional
|
||||||
|
|
Loading…
Reference in a new issue