mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
utils: Add 'cc-for-target'.
* guix/utils.scm (cc-for-target): New procedure.
This commit is contained in:
parent
f362b53c40
commit
fb9a57a8e6
1 changed files with 8 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
|||
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -78,6 +78,8 @@ (define-module (guix utils)
|
|||
target-aarch64?
|
||||
target-arm?
|
||||
target-64bit?
|
||||
cc-for-target
|
||||
|
||||
version-compare
|
||||
version>?
|
||||
version>=?
|
||||
|
@ -506,6 +508,11 @@ (define* (target-64bit? #:optional (system (or (%current-target-system)
|
|||
(%current-system))))
|
||||
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
|
||||
|
||||
(define* (cc-for-target #:optional (target (%current-target-system)))
|
||||
(if target
|
||||
(string-append target "-gcc")
|
||||
"gcc"))
|
||||
|
||||
(define version-compare
|
||||
(let ((strverscmp
|
||||
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
|
||||
|
|
Loading…
Reference in a new issue