From a55f64917dc9a56d5a95de625bc3092b625df0ed Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 12 Apr 2021 12:09:29 +0300 Subject: gnu: selinux.scm: Use cc-for-target. * gnu/packages/selinux.scm (libsepol, checkpolicy, policycoreutils) [arguments]: Don't hardcode gcc. --- gnu/packages/selinux.scm | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'gnu/packages/selinux.scm') diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm index 7230b65f98..41b8fdcbe1 100644 --- a/gnu/packages/selinux.scm +++ b/gnu/packages/selinux.scm @@ -63,19 +63,14 @@ `(#:tests? #f ; tests require checkpolicy, which requires libsepol #:test-target "test" #:make-flags - (let ((out (assoc-ref %outputs "out")) - (target ,(%current-target-system))) + (let ((out (assoc-ref %outputs "out"))) (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") - (string-append "CC=" - (if target - (string-append (assoc-ref %build-inputs "cross-gcc") - "/bin/" target "-gcc") - "gcc")))) + (string-append "CC=" ,(cc-for-target)))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -105,17 +100,12 @@ boolean settings).") (arguments `(#:tests? #f ; there is no check target #:make-flags - (let ((out (assoc-ref %outputs "out")) - (target ,(%current-target-system))) + (let ((out (assoc-ref %outputs "out"))) (list (string-append "PREFIX=" out) (string-append "LIBSEPOLA=" (assoc-ref %build-inputs "libsepol") "/lib/libsepol.a") - (string-append "CC=" - (if target - (string-append (assoc-ref %build-inputs "cross-gcc") - "/bin/" target "-gcc") - "gcc")))) + (string-append "CC=" ,(cc-for-target)))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -376,7 +366,7 @@ tools, and libraries designed to facilitate SELinux policy analysis.") `(#:test-target "test" #:make-flags (let ((out (assoc-ref %outputs "out"))) - (list "CC=gcc" + (list (string-append "CC=" ,(cc-for-target)) (string-append "PREFIX=" out) (string-append "LOCALEDIR=" out "/share/locale") (string-append "BASHCOMPLETIONDIR=" out -- cgit v1.2.3