[PATCH] guix: utils: Add as-for-target.

DoneSubmitted by Antero Mejr.
Details
2 participants
  • Antero Mejr
  • Ludovic Courtès
Owner
unassigned
Severity
normal
A
A
Antero Mejr wrote on 25 Jun 23:30 +0200
(address . guix-patches@gnu.org)
20220625213032.2043-1-antero@mailbox.org
* guix/utils.scm (as-for-target): New function.
---
guix/utils.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (34 lines)
diff --git a/guix/utils.scm b/guix/utils.scm
index 745da98a79..4cfa9d863f 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 @@ (define-module (guix utils)
             target-riscv64?
             target-64bit?
             ar-for-target
+            as-for-target
             cc-for-target
             cxx-for-target
             ld-for-target
@@ -742,6 +744,11 @@ (define* (ar-for-target #:optional (target (%current-target-system)))
       (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")
-- 
2.36.1
L
L
Ludovic Courtès wrote on 4 Aug 11:12 +0200
(name . Antero Mejr)(address . antero@mailbox.org)(address . 56224@debbugs.gnu.org)
87tu6snzhz.fsf@gnu.org
Hi Antero,

Antero Mejr <antero@mailbox.org> skribis:

Toggle quote (2 lines)
> * guix/utils.scm (as-for-target): New function.

Out of curiosity, did you encounter packages needing it? (That hasn’t
been the case so far but maybe we were just lucky.)

Thanks,
Ludo’.
A
A
Antero Mejr wrote on 4 Aug 14:02 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 56224@debbugs.gnu.org)
1316727699.6232.1659614550379@office.mailbox.org
Attachment: file
L
L
Ludovic Courtès wrote on 5 Aug 00:00 +0200
(name . Antero Mejr)(address . antero@mailbox.org)(address . 56224-done@debbugs.gnu.org)
87mtcjk6so.fsf_-_@gnu.org
Hi,

Antero Mejr <antero@mailbox.org> skribis:

Toggle quote (5 lines)
> Yes, the hare programming language compiler package uses as-for-target. That package is a work in progress:
> https://issues.guix.gnu.org/55606
>
> as-for-target is also mentioned in a comment in rasperrypi.scm, in the raspi-arm64-chainloader package.

Alright, I see.

Applied, thanks!

Ludo’.
Closed
?