guix-patches
[Top][All Lists]
Advanced

[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: Tue, 30 May 2017 16:10:17 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Ludovic Courtès <address@hidden> writes:

> 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>.

I’ll update the commit message to mention it.

>> +                  ;;  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?

Yes, sounds good.

> Otherwise LGTM!

Okay, I’ll push it to core-updates, because this results in a rebuild of
all packages using the cmake-build-system.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






reply via email to

[Prev in Thread] Current Thread [Next in Thread]