[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27076: [PATCH] build-system/cmake: Add support for cross compilation
From: |
Ludovic Courtès |
Subject: |
bug#27076: [PATCH] build-system/cmake: Add support for cross compilation. |
Date: |
Sun, 28 May 2017 21:57:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hi,
Ricardo Wurmus <address@hidden> skribis:
> * guix/build-system/gnu.scm: Export standard-cross-packages.
> * guix/build-system/cmake.scm (cmake-cross-build): New procedure.
> (lower): Add support for cross-builds.
> * guix/build/cmake-build-system.scm (configure): Handle "target" argument.
Awesome! This also fixes <https://bugs.gnu.org/26897>.
> + ;; Cross-build
> + ,@(if target
> + (list (string-append "-DCMAKE_C_COMPILER="
> + target "-gcc")
> + ;; XXX: Use "Windows" when this is a
> cross-build
> + ;; for Windows.
> + "-DCMAKE_SYSTEM_NAME=Linux")
> + '())
Should we check whether TARGET contains “mingw”, “linux”, or “gnu” and
adjust that accordingly?
Otherwise LGTM!
Thanks,
Ludo’.