mbakke pushed a commit to branch core-updates
in repository guix.
commit 7981c0be07d4e7723c263bedc5ef258d814a0ffb
Author: Marius Bakke <[email protected]>
AuthorDate: Mon Jan 27 23:06:40 2020 +0100
gnu: libsepol: Fix cross-compilation.
* gnu/packages/selinux.scm (libsepol)[arguments]: Check
for (%CURRENT-TARGET-SYSTEM) and adjust the "CC" flag accordingly.
---
gnu/packages/selinux.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 49362d1..5c0cbfa 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <[email protected]>
;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
-;;; Copyright © 2019 Marius Bakke <[email protected]>
+;;; Copyright © 2019, 2020 Marius Bakke <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -63,14 +63,19 @@
`(#:tests? #f ; tests require checkpolicy, which requires libsepol
#:test-target "test"
#:make-flags
- (let ((out (assoc-ref %outputs "out")))
+ (let ((out (assoc-ref %outputs "out"))
+ (target ,(%current-target-system)))
(list (string-append "PREFIX=" out)
(string-append "SHLIBDIR=" out "/lib")
(string-append "MAN3DIR=" out "/share/man/man3")
(string-append "MAN5DIR=" out "/share/man/man5")
(string-append "MAN8DIR=" out "/share/man/man8")
(string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
- "CC=gcc"))
+ (string-append "CC="
+ (if target
+ (string-append (assoc-ref %build-inputs
"cross-gcc")
+ "/bin/" target "-gcc")
+ "gcc"))))
#:phases
(modify-phases %standard-phases
(delete 'configure)