unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 27076@debbugs.gnu.org
Subject: bug#27076: [PATCH] build-system/cmake: Add support for cross compilation.
Date: Fri, 26 May 2017 10:21:05 +0200	[thread overview]
Message-ID: <87r2zcf2q6.fsf@elephly.net> (raw)
In-Reply-To: <20170525212655.18556-1-rekado@elephly.net>


Ricardo Wurmus <rekado@elephly.net> 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

  reply	other threads:[~2017-05-26  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 21:05 bug#27076: Cross-build support for cmake-build-system Ricardo Wurmus
2017-05-25 21:16 ` bug#27076: [PATCH] build-system/cmake: Add support for cross compilation Ricardo Wurmus
2017-05-25 21:26 ` Ricardo Wurmus
2017-05-26  8:21   ` Ricardo Wurmus [this message]
2017-05-28 19:57   ` Ludovic Courtès
2017-05-30 14:10     ` Ricardo Wurmus
2017-05-30 21:50       ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2zcf2q6.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=27076@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).