guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: iproute: Fix cross compiling.


From: guix-commits
Subject: branch master updated: gnu: iproute: Fix cross compiling.
Date: Tue, 15 Dec 2020 05:29:27 -0500

This is an automated email from the git hooks/post-receive script.

efraim pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8c07515  gnu: iproute: Fix cross compiling.
8c07515 is described below

commit 8c0751505be23640c6a789e10c9be3982be16d80
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Dec 15 12:28:36 2020 +0200

    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.
---
 gnu/packages/linux.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0e99327..f76590e 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]