gnu: cross-base: Use the right dynamic linker name.
* gnu/packages/cross-base.scm (cross-gcc-arguments): Parametrize %CURRENT-TARGET-SYSTEM. * tests/monads.scm ("package-file + package->cross-derivation"): Replace "foo64-gnu" with "mips64el-linux-gnu".
This commit is contained in:
parent
cdb4b4b3ed
commit
b4469d8c12
2 changed files with 93 additions and 90 deletions
|
@ -69,13 +69,16 @@
|
|||
(define (cross-gcc-arguments target libc)
|
||||
"Return build system arguments for a cross-gcc for TARGET, using LIBC (which
|
||||
may be either a libc package or #f.)"
|
||||
;; Set the current target system so that 'glibc-dynamic-linker' returns the
|
||||
;; right name.
|
||||
(parameterize ((%current-target-system target))
|
||||
(substitute-keyword-arguments (package-arguments gcc-4.8)
|
||||
((#:configure-flags flags)
|
||||
`(append (list ,(string-append "--target=" target)
|
||||
,@(gcc-configure-flags-for-triplet target)
|
||||
,@(if libc
|
||||
'()
|
||||
`(;; Disable features not needed at this stage.
|
||||
`( ;; Disable features not needed at this stage.
|
||||
"--disable-shared" "--enable-static"
|
||||
|
||||
;; Disable C++ because libstdc++'s configure
|
||||
|
@ -160,7 +163,7 @@ may be either a libc package or #f.)"
|
|||
;; libgcc.a showing up as having an unknown architecture. See
|
||||
;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html>
|
||||
;; for instance.
|
||||
#f)))
|
||||
#f))))
|
||||
|
||||
(define* (cross-gcc target
|
||||
#:optional (xbinutils (cross-binutils target)) libc)
|
||||
|
|
|
@ -123,10 +123,10 @@
|
|||
|
||||
(test-assert "package-file + package->cross-derivation"
|
||||
(run-with-store %store
|
||||
(mlet* %store-monad ((file (package-file coreutils "bin/ls"
|
||||
#:target "foo64-gnu"))
|
||||
(xcu (package->cross-derivation coreutils
|
||||
"foo64-gnu")))
|
||||
(mlet* %store-monad ((target -> "mips64el-linux-gnu")
|
||||
(file (package-file coreutils "bin/ls"
|
||||
#:target target))
|
||||
(xcu (package->cross-derivation coreutils target)))
|
||||
(let ((output (derivation->output-path xcu)))
|
||||
(return (string=? file (string-append output "/bin/ls")))))
|
||||
#:guile-for-build (package-derivation %store %bootstrap-guile)))
|
||||
|
|
Reference in a new issue