summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-12-15 12:28:36 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-12-15 12:28:36 +0200
commit8c0751505be23640c6a789e10c9be3982be16d80 (patch)
tree21d611c96c8c57fcca4498071bd318c866628ff0 /gnu
parent7d9d474dd292884eb628231dbe34b743e6f9bd39 (diff)
downloadguix-8c0751505be23640c6a789e10c9be3982be16d80.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/linux.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0e9932785d..f76590ec96 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2299,6 +2299,8 @@ that the Ethernet protocol is much simpler than the IP protocol.")
        #:tests? #f
        #:make-flags (let ((out (assoc-ref %outputs "out")))
                       (list "DESTDIR="
+                            (string-append "CC=" ,(cc-for-target))
+                            "HOSTCC=gcc"
                             (string-append "BASH_COMPDIR=" out
                                            "/etc/bash_completion.d")
                             (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.
                       (substitute* "Makefile"
                         (("^.*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
      `(("db4" ,bdb)
        ("iptables" ,iptables)