gnu: selinux.scm: Use cc-for-target.
* gnu/packages/selinux.scm (libsepol, checkpolicy, policycoreutils) [arguments]: Don't hardcode gcc.
This commit is contained in:
		
							parent
							
								
									545aeb708a
								
							
						
					
					
						commit
						a55f64917d
					
				
					 1 changed files with 5 additions and 15 deletions
				
			
		| 
						 | 
					@ -63,19 +63,14 @@
 | 
				
			||||||
     `(#:tests? #f ; tests require checkpolicy, which requires libsepol
 | 
					     `(#:tests? #f ; tests require checkpolicy, which requires libsepol
 | 
				
			||||||
       #:test-target "test"
 | 
					       #:test-target "test"
 | 
				
			||||||
       #:make-flags
 | 
					       #:make-flags
 | 
				
			||||||
       (let ((out (assoc-ref %outputs "out"))
 | 
					       (let ((out (assoc-ref %outputs "out")))
 | 
				
			||||||
             (target ,(%current-target-system)))
 | 
					 | 
				
			||||||
         (list (string-append "PREFIX=" out)
 | 
					         (list (string-append "PREFIX=" out)
 | 
				
			||||||
               (string-append "SHLIBDIR=" out "/lib")
 | 
					               (string-append "SHLIBDIR=" out "/lib")
 | 
				
			||||||
               (string-append "MAN3DIR=" out "/share/man/man3")
 | 
					               (string-append "MAN3DIR=" out "/share/man/man3")
 | 
				
			||||||
               (string-append "MAN5DIR=" out "/share/man/man5")
 | 
					               (string-append "MAN5DIR=" out "/share/man/man5")
 | 
				
			||||||
               (string-append "MAN8DIR=" out "/share/man/man8")
 | 
					               (string-append "MAN8DIR=" out "/share/man/man8")
 | 
				
			||||||
               (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
 | 
					               (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
 | 
				
			||||||
               (string-append "CC="
 | 
					               (string-append "CC=" ,(cc-for-target))))
 | 
				
			||||||
                              (if target
 | 
					 | 
				
			||||||
                                  (string-append (assoc-ref %build-inputs "cross-gcc")
 | 
					 | 
				
			||||||
                                                 "/bin/" target "-gcc")
 | 
					 | 
				
			||||||
                                  "gcc"))))
 | 
					 | 
				
			||||||
       #:phases
 | 
					       #:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
         (delete 'configure)
 | 
					         (delete 'configure)
 | 
				
			||||||
| 
						 | 
					@ -105,17 +100,12 @@ boolean settings).")
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:tests? #f ; there is no check target
 | 
					     `(#:tests? #f ; there is no check target
 | 
				
			||||||
       #:make-flags
 | 
					       #:make-flags
 | 
				
			||||||
       (let ((out (assoc-ref %outputs "out"))
 | 
					       (let ((out (assoc-ref %outputs "out")))
 | 
				
			||||||
             (target ,(%current-target-system)))
 | 
					 | 
				
			||||||
         (list (string-append "PREFIX=" out)
 | 
					         (list (string-append "PREFIX=" out)
 | 
				
			||||||
               (string-append "LIBSEPOLA="
 | 
					               (string-append "LIBSEPOLA="
 | 
				
			||||||
                              (assoc-ref %build-inputs "libsepol")
 | 
					                              (assoc-ref %build-inputs "libsepol")
 | 
				
			||||||
                              "/lib/libsepol.a")
 | 
					                              "/lib/libsepol.a")
 | 
				
			||||||
               (string-append "CC="
 | 
					               (string-append "CC=" ,(cc-for-target))))
 | 
				
			||||||
                              (if target
 | 
					 | 
				
			||||||
                                  (string-append (assoc-ref %build-inputs "cross-gcc")
 | 
					 | 
				
			||||||
                                                 "/bin/" target "-gcc")
 | 
					 | 
				
			||||||
                                  "gcc"))))
 | 
					 | 
				
			||||||
       #:phases
 | 
					       #:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
         (delete 'configure)
 | 
					         (delete 'configure)
 | 
				
			||||||
| 
						 | 
					@ -376,7 +366,7 @@ tools, and libraries designed to facilitate SELinux policy analysis.")
 | 
				
			||||||
     `(#:test-target "test"
 | 
					     `(#:test-target "test"
 | 
				
			||||||
       #:make-flags
 | 
					       #:make-flags
 | 
				
			||||||
       (let ((out (assoc-ref %outputs "out")))
 | 
					       (let ((out (assoc-ref %outputs "out")))
 | 
				
			||||||
         (list "CC=gcc"
 | 
					         (list (string-append "CC=" ,(cc-for-target))
 | 
				
			||||||
               (string-append "PREFIX=" out)
 | 
					               (string-append "PREFIX=" out)
 | 
				
			||||||
               (string-append "LOCALEDIR=" out "/share/locale")
 | 
					               (string-append "LOCALEDIR=" out "/share/locale")
 | 
				
			||||||
               (string-append "BASHCOMPLETIONDIR=" out
 | 
					               (string-append "BASHCOMPLETIONDIR=" out
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue