gnu: checkpolicy: Fix cross-compilation.

* gnu/packages/selinux.scm (checkpolicy)[arguments]: Check
for (%CURRENT-TARGET-SYSTEM) and adjust the "CC" flag accordingly.
This commit is contained in:
Marius Bakke 2020-01-27 23:07:23 +01:00
parent 7981c0be07
commit 2401678f56
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA

View File

@ -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)