aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-26 13:04:13 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-26 13:39:18 +0100
commita51c9c903f9db26a08672c7e19ddddeef1aee6b4 (patch)
tree86604b0adc05915c0c31a45cbf5a977aab8d2b5e
parent4d67659700798cd0ee8c966312abb4a2308ac636 (diff)
downloadpatches-a51c9c903f9db26a08672c7e19ddddeef1aee6b4.tar
patches-a51c9c903f9db26a08672c7e19ddddeef1aee6b4.tar.gz
gnu: rhash: Fix cross-compilation.
* gnu/packages/crypto.scm (rhash)[arguments]: In custom configure phase, set "--target" and "-cc" when cross-compiling.
-rw-r--r--gnu/packages/crypto.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 4e761de2ce..79472847d6 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -728,9 +729,16 @@ BLAKE.")
(replace 'configure
;; ./configure is not GNU autotools' and doesn't gracefully handle
;; unrecognized options, so we must call it manually.
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key native-inputs outputs #:allow-other-keys)
(invoke "./configure"
- (string-append "--prefix=" (assoc-ref outputs "out")))))
+ (string-append "--prefix=" (assoc-ref outputs "out"))
+ ,@(let ((target (%current-target-system)))
+ (if target
+ `((string-append "--target=" ,target)
+ (string-append "--cc="
+ (assoc-ref native-inputs "cross-gcc")
+ "/bin/" ,target "-gcc"))
+ '())))))
(add-before 'check 'patch-/bin/sh
(lambda _
(substitute* "Makefile"