summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2020-11-16 10:26:46 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2020-11-16 10:26:46 +0100
commitb720cf90e77f3143d7e46f2d9b25ada0355f13f9 (patch)
tree17834aa77afccd69ca2f40cb6d8a99b3c52f8367
parentcbd104bf6fe9c66db6173952f42db8efe48cf39f (diff)
downloadguix-b720cf90e77f3143d7e46f2d9b25ada0355f13f9.tar.gz
utils: Add 'cxx-for-target'.
* guix/utils.scm (cxx-for-target): New procedure.
-rw-r--r--guix/utils.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index b816c355dc..a591b62f30 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -78,6 +78,7 @@
             target-arm?
             target-64bit?
             cc-for-target
+            cxx-for-target
 
             version-compare
             version>?
@@ -542,6 +543,11 @@ a character other than '@'."
       (string-append target "-gcc")
       "gcc"))
 
+(define* (cxx-for-target #:optional (target (%current-target-system)))
+  (if target
+      (string-append target "-g++")
+      "g++"))
+
 (define version-compare
   (let ((strverscmp
          (let ((sym (or (dynamic-func "strverscmp" (dynamic-link))