summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-05-28 18:53:13 +0200
committerMarius Bakke <marius@gnu.org>2020-05-29 15:41:30 +0200
commitfb9a57a8e6a28093f5138a6c484442f8b3a8cd7e (patch)
tree2b88e988f9fd30236147e2de2e0f3b5085d74da6 /guix
parentf362b53c40b166b6e1fae1c38b00023d88e0cedd (diff)
utils: Add 'cc-for-target'.
* guix/utils.scm (cc-for-target): New procedure.
Diffstat (limited to 'guix')
-rw-r--r--guix/utils.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index d7b197fa44..69e3f0a934 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -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 @@
target-aarch64?
target-arm?
target-64bit?
+ cc-for-target
+
version-compare
version>?
version>=?
@@ -506,6 +508,11 @@ a character other than '@'."
(%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))