mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
gnu: cross-binutils: Build with `--with-sysroot'.
This fixes resolution of DT_NEEDED entries in cross-built libraries. For instance, if ltdl.so needs libdl.so and has it in its RUNPATH, then libdl.so is searched for in the right place. * gnu/packages/cross-base.scm (cross-binutils): Pass `--with-sysroot=/no-such-path'.
This commit is contained in:
parent
4bfc4ea349
commit
47e74d6e9d
1 changed files with 15 additions and 2 deletions
|
@ -44,8 +44,21 @@ (define (cross p target)
|
||||||
`(cons ,(string-append "--target=" target)
|
`(cons ,(string-append "--target=" target)
|
||||||
,flags))))))
|
,flags))))))
|
||||||
|
|
||||||
(define cross-binutils
|
(define (cross-binutils target)
|
||||||
(cut cross binutils <>))
|
"Return a cross-Binutils for TARGET."
|
||||||
|
(let ((binutils (package (inherit binutils)
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments
|
||||||
|
binutils)
|
||||||
|
((#:configure-flags flags)
|
||||||
|
;; Build with `--with-sysroot' so that ld honors
|
||||||
|
;; DT_RUNPATH entries when searching for a needed
|
||||||
|
;; library. This works because as a side effect
|
||||||
|
;; `genscripts.sh' sets `USE_LIBPATH=yes', which tells
|
||||||
|
;; elf32.em to use DT_RUNPATH in its search list.
|
||||||
|
`(cons "--with-sysroot=/no-such-path"
|
||||||
|
,flags)))))))
|
||||||
|
(cross binutils target)))
|
||||||
|
|
||||||
(define* (cross-gcc target
|
(define* (cross-gcc target
|
||||||
#:optional (xbinutils (cross-binutils target)) libc)
|
#:optional (xbinutils (cross-binutils target)) libc)
|
||||||
|
|
Loading…
Reference in a new issue