summaryrefslogtreecommitdiff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-03 21:26:24 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-03 22:31:15 +0200
commit4a740d0fec9ee3813417145816c521757cd1cc64 (patch)
tree0447506f87656364867e328b8d6e0bf6e5801b38 /gnu/packages/cross-base.scm
parent9bab6bea86e83c1aae355a7654263a87f0a4c130 (diff)
downloadpatches-4a740d0fec9ee3813417145816c521757cd1cc64.tar
patches-4a740d0fec9ee3813417145816c521757cd1cc64.tar.gz
gnu: cross-base: Use an 'ld' wrapper also when cross-compiling.
* gnu/packages/base.scm (make-ld-wrapper): Add #:target parameter and honor it. * gnu/packages/cross-base.scm (cross-gcc-arguments)[#:phases] <make-cross-binutils-visible>: Refer to the ld wrapper. (cross-gcc)[native-inputs]: Add "ld-wrapper-cross".
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm14
1 files changed, 11 insertions, 3 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index dbcc5bc268..565a4a8220 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -130,12 +130,16 @@ may be either a libc package or #f.)"
,target))
(binutils (string-append
(assoc-ref inputs "binutils-cross")
- "/bin/" ,target "-")))
+ "/bin/" ,target "-"))
+ (wrapper (string-append
+ (assoc-ref inputs "ld-wrapper-cross")
+ "/bin/" ,target "-ld")))
(for-each (lambda (file)
(symlink (string-append binutils file)
(string-append libexec "/"
file)))
- '("as" "ld" "nm"))
+ '("as" "nm"))
+ (symlink wrapper (string-append libexec "/ld"))
#t))
,phases)))
(if libc
@@ -214,7 +218,11 @@ GCC that does not target a libc; otherwise, target that libc."
,@(cross-gcc-arguments target libc)))
(native-inputs
- `(("binutils-cross" ,xbinutils)
+ `(("ld-wrapper-cross" ,(make-ld-wrapper
+ (string-append "ld-wrapper-" target)
+ #:target target
+ #:binutils xbinutils))
+ ("binutils-cross" ,xbinutils)
;; Call it differently so that the builder can check whether the "libc"
;; input is #f.