summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-04-12 12:09:29 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-04-12 17:01:13 +0300
commita55f64917dc9a56d5a95de625bc3092b625df0ed (patch)
treec7a232e42e3e02dba485eb06162b204c12ebdb4c
parent545aeb708a8ecae3414b6616295a754e5175418e (diff)
downloadguix-a55f64917dc9a56d5a95de625bc3092b625df0ed.tar.gz
gnu: selinux.scm: Use cc-for-target.
* gnu/packages/selinux.scm (libsepol, checkpolicy, policycoreutils)
[arguments]: Don't hardcode gcc.
-rw-r--r--gnu/packages/selinux.scm20
1 files changed, 5 insertions, 15 deletions
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