marusich pushed a commit to branch wip-ppc64le
in repository guix.
commit 4bd672cb41f71a309566dde9397dab90a4389ab7
Author: Chris Marusich <[email protected]>
AuthorDate: Tue Feb 2 00:00:57 2021 -0800
utils: Add target-powerpc? procedure.
* guix/utils.scm (target-powerpc?): New exported procedure.
---
guix/utils.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/guix/utils.scm b/guix/utils.scm
index 96cd8c7..e7a7be4 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Efraim Flashner <[email protected]>
;;; Copyright © 2020 Maxim Cournoyer <[email protected]>
;;; Copyright © 2021 Simon Tournier <[email protected]>
+;;; Copyright © 2021 Chris Marusich <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -83,6 +84,7 @@
target-arm32?
target-aarch64?
target-arm?
+ target-powerpc?
target-64bit?
cc-for-target
cxx-for-target
@@ -555,6 +557,10 @@ a character other than '@'."
(%current-system))))
(or (target-arm32? target) (target-aarch64? target)))
+(define* (target-powerpc? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "powerpc" target))
+
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))