aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntero Mejr <antero@mailbox.org>2022-06-25 21:30:32 +0000
committerLudovic Courtès <ludo@gnu.org>2022-08-05 00:14:29 +0200
commit68edaf467fccd93103f08a5a225f7b475454694b (patch)
treec114ac36398b4c8b6e2272e115426ecef54c7559
parentf9a267c6d266355b48bd12288f4414eaf4db8b33 (diff)
downloadguix-68edaf467fccd93103f08a5a225f7b475454694b.tar
guix-68edaf467fccd93103f08a5a225f7b475454694b.tar.gz
utils: Add as-for-target.
* guix/utils.scm (as-for-target): New function. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/utils.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 329ef62dde..b992b49815 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -103,6 +104,7 @@
target-riscv64?
target-64bit?
ar-for-target
+ as-for-target
cc-for-target
cxx-for-target
ld-for-target
@@ -742,6 +744,11 @@ architecture (x86_64)?"
(string-append target "-ar")
"ar"))
+(define* (as-for-target #:optional (target (%current-target-system)))
+ (if target
+ (string-append target "-as")
+ "as"))
+
(define* (cc-for-target #:optional (target (%current-target-system)))
(if target
(string-append target "-gcc")