guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: wireless-tools: Fix cross-compilation.


From: guix-commits
Subject: 01/01: gnu: wireless-tools: Fix cross-compilation.
Date: Thu, 19 Dec 2019 09:38:38 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit a21b88f10cabd94636d72284c5b435ba814f125e
Author: Mathieu Othacehe <address@hidden>
Date:   Thu Dec 19 15:28:56 2019 +0100

    gnu: wireless-tools: Fix cross-compilation.
    
    * gnu/packages/linux.scm (wireless-tools)[arguments]: Replace 'configure 
phase
    to substitute CC, AR and RANLIB Makefile variables to suitable values when
    cross-compiling.
---
 gnu/packages/linux.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index bea10b1..8a02c35 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2831,8 +2831,20 @@ mapper.  Kernel components are part of Linux-libre.")
              (string-append "INSTALL_MAN=" %output "/share/man")
              (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
              "BUILD_STATIC=")
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key target #:allow-other-keys)
+             (when ,(%current-target-system)
+               ;; Cross-compilation: use the cross tools.
+               (substitute* (find-files "." "Makefile")
+                 (("CC = .*$")
+                  (string-append "CC = " target "-gcc\n"))
+                 (("AR = .*$")
+                  (string-append "AR = " target "-ar\n"))
+                 (("RANLIB = .*$")
+                  (string-append "RANLIB = " target "-ranlib\n"))))
+             #t)))
        #:tests? #f))
     (synopsis "Tools for manipulating Linux Wireless Extensions")
     (description "Wireless Tools are used to manipulate the now-deprecated



reply via email to

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