utils: Add 'cxx-for-target'.

* guix/utils.scm (cxx-for-target): New procedure.
This commit is contained in:
Danny Milosavljevic 2020-11-16 10:26:46 +01:00
parent cbd104bf6f
commit b720cf90e7
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -78,6 +78,7 @@ (define-module (guix utils)
target-arm?
target-64bit?
cc-for-target
cxx-for-target
version-compare
version>?
@ -542,6 +543,11 @@ (define* (cc-for-target #:optional (target (%current-target-system)))
(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))