From: Marius Bakke <marius@gnu.org>
To: 41579@debbugs.gnu.org
Subject: [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target'.
Date: Thu, 28 May 2020 19:13:08 +0200 [thread overview]
Message-ID: <20200528171309.29346-1-marius@gnu.org> (raw)
In-Reply-To: <20200528171137.29146-1-marius@gnu.org>
* guix/utils.scm (cc-for-target): New procedure.
---
guix/utils.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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))
--
2.26.2
next prev parent reply other threads:[~2020-05-28 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 17:11 [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Marius Bakke
2020-05-28 17:13 ` Marius Bakke [this message]
2020-05-28 17:13 ` [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations Marius Bakke
2020-05-28 18:04 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Tobias Geerinckx-Rice via Guix-patches via
2020-05-28 18:43 ` [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Mathieu Othacehe
2020-05-29 13:58 ` bug#41579: " Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200528171309.29346-1-marius@gnu.org \
--to=marius@gnu.org \
--cc=41579@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.