gnu: cross-base: Make `glibc-dynamic-linker' do the right thing.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Determine SYSTEM based on (%current-target-system) when it's true. * gnu/packages/cross-base.scm (cross-gcc): Directly call (package-arguments gcc-4.7) from the body of `arguments'.
This commit is contained in:
parent
c8fa51f2d6
commit
e7133c7680
@ -131,7 +131,10 @@ check whether everything is alright."
|
|||||||
(propagated-inputs (map rewritten-input
|
(propagated-inputs (map rewritten-input
|
||||||
(package-propagated-inputs p)))))))
|
(package-propagated-inputs p)))))))
|
||||||
|
|
||||||
(define* (glibc-dynamic-linker #:optional (system (%current-system)))
|
(define* (glibc-dynamic-linker
|
||||||
|
#:optional (system (or (and=> (%current-target-system)
|
||||||
|
gnu-triplet->nix-system)
|
||||||
|
(%current-system))))
|
||||||
"Return the name of Glibc's dynamic linker for SYSTEM."
|
"Return the name of Glibc's dynamic linker for SYSTEM."
|
||||||
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
||||||
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
||||||
|
@ -70,12 +70,6 @@
|
|||||||
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
|
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
|
||||||
XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a
|
XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a
|
||||||
GCC that does not target a libc; otherwise, target that libc."
|
GCC that does not target a libc; otherwise, target that libc."
|
||||||
(define args
|
|
||||||
;; Get the arguments as if we were building for TARGET. In particular, we
|
|
||||||
;; want `glibc-dynamic-linker' to return the right thing.
|
|
||||||
(parameterize ((%current-system (gnu-triplet->nix-system target)))
|
|
||||||
(package-arguments gcc-4.7)))
|
|
||||||
|
|
||||||
(package (inherit gcc-4.7)
|
(package (inherit gcc-4.7)
|
||||||
(name (string-append "gcc-cross-"
|
(name (string-append "gcc-cross-"
|
||||||
(if libc "" "sans-libc-")
|
(if libc "" "sans-libc-")
|
||||||
@ -89,7 +83,7 @@ GCC that does not target a libc; otherwise, target that libc."
|
|||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
#:patches (list (assoc-ref %build-inputs "patch/cross-env-vars"))
|
#:patches (list (assoc-ref %build-inputs "patch/cross-env-vars"))
|
||||||
|
|
||||||
,@(substitute-keyword-arguments args
|
,@(substitute-keyword-arguments (package-arguments gcc-4.7)
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
`(append (list ,(string-append "--target=" target)
|
`(append (list ,(string-append "--target=" target)
|
||||||
,@(if libc
|
,@(if libc
|
||||||
|
Loading…
Reference in New Issue
Block a user