From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFhrc-0007Ut-73 for guix-patches@gnu.org; Tue, 30 May 2017 10:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFhrS-0002mN-En for guix-patches@gnu.org; Tue, 30 May 2017 10:11:12 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFhrS-0002mJ-5E for guix-patches@gnu.org; Tue, 30 May 2017 10:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFhrR-0005Zh-Uo for guix-patches@gnu.org; Tue, 30 May 2017 10:11:01 -0400 Subject: bug#27076: [PATCH] build-system/cmake: Add support for cross compilation. Resent-Message-ID: References: <87h908ve95.fsf@elephly.net> <20170525212655.18556-1-rekado@elephly.net> <874lw4rby8.fsf@gnu.org> From: Ricardo Wurmus In-reply-to: <874lw4rby8.fsf@gnu.org> Date: Tue, 30 May 2017 16:10:17 +0200 Message-ID: <87bmqa4era.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27076@debbugs.gnu.org Ludovic Courtès writes: > Hi, > > Ricardo Wurmus 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 . 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