diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-01-27 23:06:40 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-02-03 15:29:15 +0100 |
commit | 7981c0be07d4e7723c263bedc5ef258d814a0ffb (patch) | |
tree | 811c4b0cb223af87691ec8aa54959b52748a3c25 /gnu | |
parent | f847d9dcda9bf0efc169601ccb8a1f9546819275 (diff) | |
download | guix-7981c0be07d4e7723c263bedc5ef258d814a0ffb.tar.gz |
gnu: libsepol: Fix cross-compilation.
* gnu/packages/selinux.scm (libsepol)[arguments]: Check for (%CURRENT-TARGET-SYSTEM) and adjust the "CC" flag accordingly.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/selinux.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm index 49362d129b..5c0cbfa639 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 <rekado@elephly.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; 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) |