guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/19: gnu: libsepol: Fix cross-compilation.


From: guix-commits
Subject: 04/19: gnu: libsepol: Fix cross-compilation.
Date: Mon, 3 Feb 2020 09:30:24 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 7981c0be07d4e7723c263bedc5ef258d814a0ffb
Author: Marius Bakke <address@hidden>
AuthorDate: Mon Jan 27 23:06:40 2020 +0100

    gnu: libsepol: Fix cross-compilation.
    
    * gnu/packages/selinux.scm (libsepol)[arguments]: Check
    for (%CURRENT-TARGET-SYSTEM) and adjust the "CC" flag accordingly.
---
 gnu/packages/selinux.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 49362d1..5c0cbfa 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 <address@hidden>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
-;;; Copyright © 2019 Marius Bakke <address@hidden>
+;;; Copyright © 2019, 2020 Marius Bakke <address@hidden>
 ;;;
 ;;; 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]