[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54239] [PATCH v3 01/10] guix: Add build-system transformation for t
From: |
Julien Lepiller |
Subject: |
[bug#54239] [PATCH v3 01/10] guix: Add build-system transformation for target. |
Date: |
Sat, 16 Jul 2022 21:47:58 +0200 |
* guix/build-system.scm (build-system-with-target): New procedure.
---
guix/build-system.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/guix/build-system.scm b/guix/build-system.scm
index 76d670995c..7d864423e3 100644
--- a/guix/build-system.scm
+++ b/guix/build-system.scm
@@ -18,6 +18,7 @@
(define-module (guix build-system)
#:use-module (guix records)
+ #:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:export (build-system
@@ -40,7 +41,8 @@ (define-module (guix build-system)
make-bag
- build-system-with-c-toolchain))
+ build-system-with-c-toolchain
+ build-system-with-target))
(define-record-type* <build-system> build-system make-build-system
build-system?
@@ -129,3 +131,20 @@ (define (lower* . args)
(build-system
(inherit bs)
(lower lower*)))
+
+(define (build-system-with-target bs target)
+ "Return a variant of @var{bs}, a build system, that user @var{target} instead
+of the default target."
+ (define lower
+ (build-system-lower bs))
+
+ (define (lower* . args)
+ (parameterize ((%current-target-system target))
+ (apply lower
+ (append
+ (strip-keyword-arguments (list #:target) args)
+ (list #:target target)))))
+
+ (build-system
+ (inherit bs)
+ (lower lower*)))
--
2.37.0
- [bug#54239] [PATCH] gnu: Add cross-clang., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 01/10] guix: Add build-system transformation for target.,
Julien Lepiller <=
- [bug#54239] [PATCH v3 03/10] gnu: llvm-9: Fix cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 04/10] gnu: Add cross-llvm., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 02/10] gnu: clang-runtime: Fix cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 06/10] gnu: libcxx: Allow cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 07/10] gnu: libcxxabi-6: Allow cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 08/10] gnu: Add libcxxabi-9., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 09/10] gnu: Add libcxx-12., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 10/10] gnu: Add libcxxabi-12., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 05/10] gnu: Add cross-clang., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH] gnu: Add cross-clang., Maxime Devos, 2022/07/19