gnu: iproute: Fix cross compiling.
* gnu/packages/linux.scm (iproute)[arguments]: Set CC and HOSTCC in make-flags. Add custom phase to replace the value for PKG_CONFIG in hand-written configure script.
This commit is contained in:
parent
7d9d474dd2
commit
8c0751505b
1 changed files with 12 additions and 1 deletions
|
|
@ -2299,6 +2299,8 @@ that the Ethernet protocol is much simpler than the IP protocol.")
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
#:make-flags (let ((out (assoc-ref %outputs "out")))
|
#:make-flags (let ((out (assoc-ref %outputs "out")))
|
||||||
(list "DESTDIR="
|
(list "DESTDIR="
|
||||||
|
(string-append "CC=" ,(cc-for-target))
|
||||||
|
"HOSTCC=gcc"
|
||||||
(string-append "BASH_COMPDIR=" out
|
(string-append "BASH_COMPDIR=" out
|
||||||
"/etc/bash_completion.d")
|
"/etc/bash_completion.d")
|
||||||
(string-append "LIBDIR=" out "/lib")
|
(string-append "LIBDIR=" out "/lib")
|
||||||
|
|
@ -2314,7 +2316,16 @@ that the Ethernet protocol is much simpler than the IP protocol.")
|
||||||
;; Don't attempt to create /var/lib/arpd.
|
;; Don't attempt to create /var/lib/arpd.
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("^.*ARPDDIR.*$") ""))
|
(("^.*ARPDDIR.*$") ""))
|
||||||
#t)))))
|
#t))
|
||||||
|
(add-after 'unpack 'patch-configure
|
||||||
|
(lambda _
|
||||||
|
(let ((target ,(%current-target-system)))
|
||||||
|
(substitute* "configure"
|
||||||
|
(("pkg-config")
|
||||||
|
(if target
|
||||||
|
(string-append target "-pkg-config")
|
||||||
|
"pkg-config")))
|
||||||
|
#t))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("db4" ,bdb)
|
`(("db4" ,bdb)
|
||||||
("iptables" ,iptables)
|
("iptables" ,iptables)
|
||||||
|
|
|
||||||
Reference in a new issue