[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v4 23/23] scripts: system: Add --target option.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v4 23/23] scripts: system: Add --target option. |
Date: |
Wed, 2 Oct 2019 11:59:04 +0200 |
* guix/scripts/system.scm (%options): Add target option,
(%default-options): ditto,
(process-action): Rename existing target variable to target-file and pass new
target variable to run-with-store procedure.
---
guix/scripts/system.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 27b014db68..d3e10b6dc7 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès
<address@hidden>
;;; Copyright © 2016 Alex Kost <address@hidden>
;;; Copyright © 2016, 2017, 2018 Chris Marusich <address@hidden>
-;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2017, 2019 Mathieu Othacehe <address@hidden>
;;; Copyright © 2018 Ricardo Wurmus <address@hidden>
;;; Copyright © 2019 Christopher Baines <address@hidden>
;;;
@@ -931,6 +931,8 @@ Some ACTIONS support additional ARGS.\n"))
--full-boot for 'vm', make a full boot sequence"))
(display (G_ "
--skip-checks skip file system and initrd module safety checks"))
+ (display (G_ "
+ --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\""))
(display (G_ "
-v, --verbosity=LEVEL use the given verbosity LEVEL"))
(newline)
@@ -1004,6 +1006,10 @@ Some ACTIONS support additional ARGS.\n"))
(lambda (opt name arg result)
(alist-cons 'system arg
(alist-delete 'system result eq?))))
+ (option '("target") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'target arg
+ (alist-delete 'target result eq?))))
(option '(#\r "root") #t #f
(lambda (opt name arg result)
(alist-cons 'gc-root arg result)))
@@ -1012,6 +1018,7 @@ Some ACTIONS support additional ARGS.\n"))
(define %default-options
;; Alist of default option values.
`((system . ,(%current-system))
+ (target . #f)
(substitutes? . #t)
(build-hook? . #t)
(print-build-trace? . #t)
@@ -1045,6 +1052,7 @@ resulting from command-line parsing."
((x . _) x)))
(expr (assoc-ref opts 'expression))
(system (assoc-ref opts 'system))
+ (target (assoc-ref opts 'target))
(os (ensure-operating-system
(or file expr)
(cond
@@ -1061,7 +1069,7 @@ resulting from command-line parsing."
(dry? (assoc-ref opts 'dry-run?))
(bootloader? (assoc-ref opts 'install-bootloader?))
- (target (match args
+ (target-file (match args
((first second) second)
(_ #f)))
(bootloader-target
@@ -1103,9 +1111,10 @@ resulting from command-line parsing."
(_ #f))
opts)
#:install-bootloader? bootloader?
- #:target target
+ #:target target-file
#:bootloader-target bootloader-target
#:gc-root (assoc-ref opts 'gc-root)))))
+ #:target target
#:system system))
(warn-about-disk-space)))
--
2.23.0
- [bug#36477] [PATCH v4 18/23] gexp: Use cross extensions when cross-compiling., (continued)
[bug#36477] [PATCH v4 17/23] gnu: cmake: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 14/23] gnu: guile-sqlite3: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 19/23] utils: Use target-aarch64? and target-arm? helpers., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 12/23] gnu: doxygen: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 20/23] build: vm: Fix arm32 support., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 21/23] system: vm: Add arm64 support., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 15/23] gnu: libnl: Move python outputs to separate packages., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 22/23] system: vm: Support cross-compilation., Mathieu Othacehe, 2019/10/02
[bug#36477] [PATCH v4 23/23] scripts: system: Add --target option.,
Mathieu Othacehe <=
[bug#36477] [PATCH v4 00/23] System cross-compilation, Mathieu Othacehe, 2019/10/18