aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/selinux.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-27 23:07:23 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-02-03 15:29:15 +0100
commit2401678f56695b80b5a46d2aef931afcde278c2c (patch)
treec810c3c558abf7422471a43fbcbae6f83c1a3408 /gnu/packages/selinux.scm
parent7981c0be07d4e7723c263bedc5ef258d814a0ffb (diff)
downloadguix-2401678f56695b80b5a46d2aef931afcde278c2c.tar
guix-2401678f56695b80b5a46d2aef931afcde278c2c.tar.gz
gnu: checkpolicy: Fix cross-compilation.
* gnu/packages/selinux.scm (checkpolicy)[arguments]: Check for (%CURRENT-TARGET-SYSTEM) and adjust the "CC" flag accordingly.
Diffstat (limited to 'gnu/packages/selinux.scm')
-rw-r--r--gnu/packages/selinux.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 5c0cbfa639..1502d167c4 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -106,12 +106,17 @@ boolean settings).")
(arguments
`(#:tests? #f ; there is no check target
#: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 "LIBSEPOLA="
(assoc-ref %build-inputs "libsepol")
"/lib/libsepol.a")
- "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)