diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-03-24 15:28:33 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-03-24 20:50:44 +0200 |
commit | 2aab587f842908a886e3bd08b028885dddd650e0 (patch) | |
tree | 87c0723a9ae2c69ab6920d90b6e87ad8510492fe /guix/utils.scm | |
parent | 5664bcdcb0e4c10dfe48dd5e4730fc3c746a21e2 (diff) | |
parent | 65c46e79e0495fe4d32f6f2725d7233fff10fd70 (diff) |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 96cd8c791e..7db9f52ff6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> +;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,6 +49,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module ((ice-9 iconv) #:prefix iconv:) + #:autoload (zlib) (make-zlib-input-port make-zlib-output-port) #:use-module (system foreign) #:re-export (<location> ;for backwards compatibility location @@ -83,6 +85,7 @@ target-arm32? target-aarch64? target-arm? + target-powerpc? target-64bit? cc-for-target cxx-for-target @@ -234,8 +237,9 @@ a symbol such as 'xz." (match compression ((or #f 'none) (values input '())) ('bzip2 (filtered-port `(,%bzip2 "-dc") input)) - ('xz (filtered-port `(,%xz "-dc" ,@(%xz-parallel-args)) input)) - ('gzip (filtered-port `(,%gzip "-dc") input)) + ('xz (filtered-port `(,%xz "-dc") input)) + ('gzip (values (make-zlib-input-port input #:format 'gzip) + '())) ('lzip (values (lzip-port 'make-lzip-input-port input) '())) ('zstd (values (zstd-port 'make-zstd-input-port input) @@ -307,9 +311,9 @@ program--e.g., '(\"--fast\")." (match compression ((or #f 'none) (values output '())) ('bzip2 (filtered-output-port `(,%bzip2 "-c" ,@options) output)) - ('xz (filtered-output-port `(,%xz "-c" ,@(%xz-parallel-args) - ,@options) output)) - ('gzip (filtered-output-port `(,%gzip "-c" ,@options) output)) + ('xz (filtered-output-port `(,%xz "-c" ,@options) output)) + ('gzip (values (make-zlib-output-port output #:format 'gzip) + '())) ('lzip (values (lzip-port 'make-lzip-output-port output) '())) ('zstd (values (zstd-port 'make-zstd-output-port output) @@ -555,9 +559,13 @@ 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"))) + (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64"))) (define* (cc-for-target #:optional (target (%current-target-system))) (if target |