From fc7cf0c1ecc1ab6d59bab0040be917d5900d98f1 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Tue, 2 Feb 2021 00:00:57 -0800 Subject: 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 21e3460b2c..fc57620319 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2018, 2020 Marius Bakke ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -79,6 +80,7 @@ target-arm32? target-aarch64? target-arm? + target-powerpc? target-64bit? cc-for-target cxx-for-target @@ -541,6 +543,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"))) -- cgit v1.2.3