summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-12-16 12:39:18 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-12-16 16:32:59 +0100
commit2e4c2a3ae9297e86f3665cbb89e6cb8113360f3a (patch)
treebaf187ecdd79c0c931d5c95a15be1c3f63138add /gnu/packages/linux.scm
parent0c25097e8bbf6f25c53106d7e5ba9ba3c5146b1b (diff)
downloadguix-patches-2e4c2a3ae9297e86f3665cbb89e6cb8113360f3a.tar
guix-patches-2e4c2a3ae9297e86f3665cbb89e6cb8113360f3a.tar.gz
gnu: iw: Fix cross-compilation.
* gnu/packages/linux.scm (iw)[arguments]: Set PKG_CONFIG and CC variables correctly for cross-compilation.
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fb9be39a31..a81905df7f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2098,8 +2098,18 @@ configuration and monitoring interfaces.")
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("libnl" ,libnl)))
(arguments
- `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "CC=gcc")
+ `(#:make-flags
+ (let* ((target ,(%current-target-system))
+ (gcc (if target (string-append target "-gcc") "gcc"))
+ (pkg-config (if target
+ (string-append target "-pkg-config")
+ "pkg-config")))
+ (list
+ (string-append "CC=" gcc)
+ (string-append "PKG_CONFIG="
+ (assoc-ref %build-inputs "pkg-config")
+ "/bin/" pkg-config)
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))))
#:phases (modify-phases %standard-phases (delete 'configure))))
(home-page "https://wireless.wiki.kernel.org/")
(synopsis "Tool for configuring wireless devices")