[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27076: [PATCH] build-system/cmake: Add support for cross compilation
From: |
Ricardo Wurmus |
Subject: |
bug#27076: [PATCH] build-system/cmake: Add support for cross compilation. |
Date: |
Fri, 26 May 2017 10:21:05 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Ricardo Wurmus <address@hidden> writes:
> diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
> index 25ac262d5..ee116c5a4 100644
> --- a/guix/build-system/cmake.scm
> +++ b/guix/build-system/cmake.scm
[…]
> + (bag
> + (name name)
> + (system system)
> + (target target)
> + (build-inputs `(,@(if source
> + `(("source" ,source))
> + '())
> + ,@`(("cmake" ,cmake))
> + ,@native-inputs
> + ,@(if target
> + ;; Use the standard cross inputs of
> + ;; 'gnu-build-system'.
> + (standard-cross-packages target 'host)
> + '())
> + ;; Keep the standard inputs of 'gnu-build-system'.
> + ,@(standard-packages)))
> + (host-inputs inputs)
> +
> + ;; The cross-libc is really a target package, but for bootstrapping
> + ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a
> + ;; native package, so it would end up using a "native" variant of
> + ;; 'cross-libc' (built with 'gnu-build'), whereas all the other packages
> + ;; would use a target variant (built with 'gnu-cross-build'.)
> + (target-inputs (if target
> + (standard-cross-packages target 'target)
> + '()))
This was the only change compared to the previous patch, which would set
“target-inputs” without checking if “target” is provided.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net